3.1.0
This is a minor release that improves asset pricing and adds other QoL improvements to the core contracts and plugins.
Upgrade Steps
Upgrade all core contracts and all assets. Most ERC20s do not need to be upgraded. Use Deployer.deployRTokenAsset() to create a new RTokenAsset instance. This asset should be swapped too.
ERC20s that do need to be upgraded:
- Morpho
- Convex
- CompoundV3
Then, call Broker.cacheComponents().
Finally, call Broker.setBatchTradeImplementation(newGnosisTrade).
Core Protocol Contracts
BackingManager[+2 slots]- Replace use of
lotPrice()withprice()everywhere - Track
tokensOuton trades and account for during collateralization math - Call
StRSR.payoutRewards()after forwarding RSR - Make
backingBuffermath precise - Add caching in
RecollateralizationLibP1 - Use
price().lowinstead ofprice().highto compute maximum sell amounts
- Replace use of
BasketHandler- Replace use of
lotPrice()withprice()everywhere - Minor gas optimizations to status tracking and custom redemption math
- Replace use of
Broker[+1 slot]- Cache
rTokenaddress and addcacheComponents()helper - Allow
reportViolation()to be called when paused or frozen - Disallow starting dutch trades with non-RTokenAsset assets when
lastSave() != block.timestamp
- Cache
Distributor- Call
RevenueTrader.distributeTokenToBuy()before distribution table changes - Call
StRSR.payoutRewards()orFurnace.melt()after distributions - Minor gas optimizations
- Call
Furnace- Allow melting while frozen
Main- Remove
furnace.melt()frompoke()
- Remove
RevenueTrader- Replace use of
lotPrice()withprice()everywhere - Ensure
settleTradecannot be reverted due totokenToBuydistribution - Ensure during
manageTokens()that the Distributor is configured for thetokenToBuy
- Replace use of
StRSR- Use correct era in
UnstakingStartedevent - Expose
draftEraviagetDraftEra()view
- Use correct era in
Facades
FacadeMonitor- Add
batchAuctionsDisabled()view - Add
dutchAuctionsDisabled()view - Add
issuanceAvailable()view - Add
redemptionAvailable()view - Add
backingRedeemable()view
- Add
FacadeRead- Add
draftEraargument topendingUnstakings() - Remove
.melt()calls during pokes
- Add
Plugins
Assets
- ALL
- Deprecate
lotPrice() - Alter
price().lowto decay downwards to 0 over the price timeout - Alter
price().highto decay upwards to 3x over the price timeout - Move
ORACLE_TIMEOUT_BUFFERinto code, as opposed to incorporating at the deployment script level - Make
refPerTok()smoother during event of hard default - Check for
defaultThreshold > 0in constructors - Add 9 more decimals of precision to reward accounting (some wrappers excluded)
- Deprecate
- compoundv2: make wrapper much more gas efficient during COMP claim
- compoundv3 bugfix: check permission correctly on underlying comet
- curve: Also
refresh()the RToken's AssetRegistry duringrefresh() - convex: Update to latest approved wrapper from Convex team
- morpho-aave: Add ability to track and handout MORPHO rewards
- yearnv2: Use pricePerShare helper for more precision
Governance
- Add a minimum voting delay of 1 day
Trading
GnosisTrade- Add
sellAmount() returns (uint192)view
- Add