buttonwood-protocol / button-wrappers

Solidity code for the ButtonToken rebasing wrapper protocol
GNU General Public License v3.0
13 stars 10 forks source link

Add ButtonToken rebase functionality #2

Closed marktoda closed 3 years ago

marktoda commented 3 years ago

This commit updates the rebase functionality to snap to the total value of the underlying collateral, with unit value of $1. To do this, we remove some unnecessary features from uFragments - CPI, rebase dampening, time windows, and deviation thresholds. We add a reference to the underlying collateral token and, upon rebase, change _gonsPerFragment such that the total supply is equivalent to the total value of the underlying collateral tokens.