Skip to content

Cryptolyfe/Inflation_Rate_Coin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

Inflation Rate Coin or INFR

In the last year alone, inflation has risen by a staggering 7% according to the Consumer Price Index(CPI).

INFCoin, or Inflation Coin, uses the percent change (pct_change) of the CPI to adjust the amount of the holder's tokens. The tokens are added or subtracted monthly, depending on if inflation increases or decreases.

We created an ERC20 token that includes a check inflation function, that checks for the percent change in inflation(CPI) and then loops though an array of the current token holders, to add or subtract the tokens based on the inflation rate, to each token holder’s balance, essentially acting as a hedge against inflation.

INFR is currently a proof of concept, as we still need to add an oracle to check inflation programmatically instead of manually.

Update: COINBASE realeased the exact same concept over a year after this repo was published. They deemed the tokens "flat coins" and called it a "critical innovation"



To demonstrate:

First, we deployed the INFCoin sale. INFCoin sale is inherited from crowdsale. The CrowdSale contract uses the interface of ERC20 to sell the token, and for our token's unique requirement of storing every owner address in an array, we had to modify the ERC20 interface to implement a function for adding to that array.

INFCoin Deployer



Then, we deployed the contract for the crowdsale using the token sale address generated by the coin sale contract.

INFCoin Crowdsale w:Token sale address



Following this, we purchased 1 ether's worth of tokens on Ganache's local network which has been added to Metamask.

Buy Tokens at Ganache Address



Next, we deployed our INFCoin contract using our token address.

 INFCOIN contract w:token address



Once the INFCoin contract was deployed, we checked our Ganache account balance.

check balance of Ganache acct



In the next step we checked the inflation rate and then confirmed our tokens increased.

check inflation and check adjusted balance



Finally, we added INFCoin to our metamask wallet.

Add INF to Metamask



Inflation Coin is a store of value that hedges against inflation, by maintaining the purchasing power of your investment. Something your bank currently does not do!

Releases

No releases published

Packages

No packages published