2.0.0
tbrent
released this
28 Mar 23:10
·
1390 commits
to master
since this release
The "all clear" milestone release. This is the first release that received any public use at all.
- Bump solidity version to 0.8.17
- Support multiple beneficiaries via the
FacadeWrite
- Add
RToken.issueTo(address recipient, uint256 amount, ..)
andRToken.redeemTo(address recipient, uint256 amount, ..)
to support issuance/redemption to a different address thanmsg.sender
- Add
RToken.redeem*(.., uint256 basketNonce)
to enable msg sender to control expectations around partial redemptions - Add
RToken.issuanceAvailable()
+RToken.redemptionAvailable()
- Add
FacadeRead.primeBasket()
+FacadeRead.backupConfig()
views - Many external libs moved to internal
- Switch from price point estimates to price ranges; all prices now have a
low
andhigh
. Impacted interface functions:IAsset.price()
IBasketHandler.price()
- Replace
IAsset.fallbackPrice()
withIAsset.lotPrice()
. The lot price is the current price when available, and a fallback price otherwise. - Introduce decaying fallback prices. Over a finite period of time the fallback price goes to zero, linearly.
- Remove
IAsset.pricePerTarget()
from asset interface - Remove rewards earning and sweeping from RToken
- Add
safeMulDivCeil()
toITrading
traders. Use when overflow is possible from 2 locations: - Introduce config struct to encapsulate Collateral constructor params more neatly
- In general it should be easier to write Collateral plugins. Implementors should only ever have to override 4 functions:
tryPrice()
,refPerTok()
,targetPerRef()
, andclaimRewards()
. - Add
.div(1 - maxTradeSlippage)
to calculation ofshortfallSlippage
in RecollateralizationLib.sol:L188. - FacadeRead:
- remove
.pendingIssuances()
+.endIdForVest()
- refactor calculations in
basketBreakdown()
- remove
- Bugfix: Fix claim rewards from traders in
FacadeAct
- Bugfix: Do not handout RSR rewards when no one is staked
- Bugfix: Support small redemptions even when the RToken supply is massive
- Bump component-wide
version()
getter to 2.0.0 - Remove non-atomic issuance
- Replace redemption battery with issuance and redemption throttles
amtRate
valid range:[1e18, 1e48]
pctRate
valid range:[0, 1e18]
- Fix Furnace/StRSR reward period to 12 seconds
- Gov params:
- --
rewardPeriod
- --
issuanceRate
- ++
issuanceThrottle
- ++
redemptionThrottle
- --
- Events:
- --
RToken.IssuanceStarted
- --
RToken.IssuancesCompleted
- --
RToken.IssuancesCanceled
Issuance( address indexed recipient, uint256 indexed amount, uint192 baskets )
->Issuance( address indexed issuer, address indexed recipient, uint256 indexed amount, uint192 baskets )
Redemption(address indexed recipient, uint256 indexed amount, uint192 baskets )
->Redemption(address indexed redeemer, address indexed recipient, uint256 indexed amount, uint192 baskets )
- ++
RToken.IssuanceThrottleSet
- ++
RToken.RedemptionThrottleSet
- --
- Allow redemption while DISABLED
- Allow
grantRTokenAllowances()
while paused - Add
RToken.monetizeDonations()
escape hatch for accidentally donated tokens - Collateral default threshold: 5% -> 1% (+ include oracleError)
- RecollateralizationLib: Tighter basket range during recollateralization. Will now do
minTradeVolume
-size auctions to fill in dust rather than haircut. - Remove StRSR.setName()/setSymbol()
- Prevent RToken exchange rate manipulation at low supply
- Prevent StRSR exchange rate manipulation at low supply
- Forward RSR directly to StRSR, bypassing RSRTrader
- Accumulate melting on
Furnace.setRatio()
- Payout RSR rewards on
StRSR.setRatio()
- Distinguish oracle timeouts when dealing with multiple oracles in one plugin
- Add safety during asset degregistration to ensure it is always possible to unregister an infinite-looping asset
- Fix
StRSR
/RToken
EIP712 typehash to use release version instead of "1" - Add
FacadeRead.redeem(IRToken rToken, uint256 amount, uint48 basketNonce)
to return the expected redemption quantities on the basketNonce, or revert - Integrate with OZ 4.7.3 Governance (changes to
quorum()
/tproposalThreshold()
)