Implement rebase function for Tokenized Carbon Credit Smart Contract.
When changing the status of one Vintage and if needed to update the total supply of this Vintage, be able to modify proportionally the supply of this Vintage in the wallet of users.
Additional context
Rebase tokens are a type of cryptocurrency that adjusts their supply.
Rebase tokens achieve price stability through a process known as a "rebase," which is triggered at regular intervals (e.g., every 24 hours). During a rebase, the supply of the token is adjusted based on a predetermined formula.
**AMPL**: The unit of account ERC-20 token. AMPL's price targets the CPI adjusted 2019 USD, but the number of AMPL tokens in user wallets automatically increases or decreases based on demand.
The Ampleforth Protocol automatically expands or contracts the quantity of tokens in user wallets based on price. Except the number of AMPL tokens in your wallet increases when there's more demand and decreases when there's less demand.
Elastic Supply Policy
Expansion: When the price_exchange_rate of AMPL > 1 2019 USD the market is indicating there is more demand than supply. In response the Ampleforth protocol automatically and proportionally increases the quantity of tokens in user wallets, gradually bringing price down to its target.
Contraction: When the price_exchange_rate of AMPL is < 1 2019 USD the market is indicating there is more supply than demand. In response the Ampleforth protocol automatically and proportionally decreases the quantity of tokens in user wallets, gradually bringing price up to its target.
Rebase function :
To execute this process efficiently, we avoid generating a transaction for each wallet. Instead, Ampleforth
balances are internally represented by a hidden internal denomination. All external interfaces to the system
reference the external denomination, while all internal operations reference the hidden internal denomination.The conversion rate between the hidden internal denomination and the external denomination is controlled
by an exchange rate that equals hiddenSupply/uFragmentSupply. This coefficient of expansion,
sometimes referred to as the splitRatio, is represented rationally as the quotient of two numbers in the codebase.
Description
Implement rebase function for Tokenized Carbon Credit Smart Contract. When changing the status of one Vintage and if needed to update the total supply of this Vintage, be able to modify proportionally the supply of this Vintage in the wallet of users.
Additional context
Rebase tokens are a type of cryptocurrency that adjusts their supply.
**AMPL**
: The unit of account ERC-20 token. AMPL's price targets the CPI adjusted 2019 USD, but the number of AMPL tokens in user wallets automatically increases or decreases based on demand.The Ampleforth Protocol automatically expands or contracts the quantity of tokens in user wallets based on price. Except the number of AMPL tokens in your wallet increases when there's more demand and decreases when there's less demand.
Elastic Supply Policy
Expansion: When the
price_exchange_rate
of AMPL >1 2019 USD
the market is indicating there is more demand than supply. In response the Ampleforth protocol automatically and proportionally increases the quantity of tokens in user wallets, gradually bringing price down to its target.Contraction: When the
price_exchange_rate
of AMPL is <1 2019 USD
the market is indicating there is more supply than demand. In response the Ampleforth protocol automatically and proportionally decreases the quantity of tokens in user wallets, gradually bringing price up to its target.Rebase function : To execute this process efficiently, we avoid generating a transaction for each wallet. Instead, Ampleforth
balances are internally represented by a hidden internal denomination. All external interfaces to the system
reference the external denomination, while all internal operations reference the hidden internal denomination.The conversion rate between the hidden internal denomination and the external denomination is controlled
by an exchange rate that equals hiddenSupply/uFragmentSupply. This coefficient of expansion,
sometimes referred to as the splitRatio, is represented rationally as the quotient of two numbers in the codebase.
About the Ampleforth Protocol
Webographie
https://cryptonews.com/exclusives/rebase-tokens.htm#:~:text=What%20Are%20Rebase%2FElastic%20Tokens,the%20time%20of%20their%20creation.
https://www.ampleforth.org/
Ampleforth Whitpaper
https://github.com/ampleforth/ampleforth-contracts
https://github.com/ampleforth/ampleforth-contracts/blob/master/contracts/WAMPL.sol