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
tokensOut
on trades and account for during collateralization math - Call
StRSR.payoutRewards()
after forwarding RSR - Make
backingBuffer
math precise - Add caching in
RecollateralizationLibP1
- Use
price().low
instead ofprice().high
to 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
rToken
address 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
settleTrade
cannot be reverted due totokenToBuy
distribution - Ensure during
manageTokens()
that the Distributor is configured for thetokenToBuy
- Replace use of
StRSR
- Use correct era in
UnstakingStarted
event - Expose
draftEra
viagetDraftEra()
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
draftEra
argument topendingUnstakings()
- Remove
.melt()
calls during pokes
- Add
Plugins
Assets
- ALL
- Deprecate
lotPrice()
- Alter
price().low
to decay downwards to 0 over the price timeout - Alter
price().high
to decay upwards to 3x over the price timeout - Move
ORACLE_TIMEOUT_BUFFER
into code, as opposed to incorporating at the deployment script level - Make
refPerTok()
smoother during event of hard default - Check for
defaultThreshold > 0
in 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