3.2.0
This release makes bidding in dutch auctions easier for MEV searchers and gives new RTokens being deployed the option to enable a variable target basket, or to be "reweightable". An RToken that is not reweightable cannot have its target basket changed in terms of quantities of target units.
Upgrade Steps
Upgrade BasketHandler, BackingManager, and Distributor.
Call broker.setDutchTradeImplementation(newGnosisTrade)
with the new DutchTrade
contract address.
If this is the first upgrade to a >= 3.0.0 token, call *.cacheComponents()
on all components.
For plugins, upgrade all plugins that contain an appreciating asset (not FiatCollateral. AppreciatingFiatCollateral etc) OR contain multiple oracle feeds.
Core Protocol Contracts
New governance param added: reweightable
BackingManager
- Track basket nonce last collateralized at end of
settleTrade()
- Track basket nonce last collateralized at end of
BasketHandler
[+1 slot]- Restrict
redeemCustom()
to nonces afterlastCollateralized
- New
LastCollateralizedChanged()
event -- track to determine earliest basket nonce to use forredeemCustom()
- Add concept of a reweightable basket: a basket that can have its target amounts (once grouped by target unit) changed
- Add
reweightable()
view - Add
forceSetPrimeBasket()
to allow setting a new prime basket without normalizing by USD value - Alter
setPrimeBasket()
to enforce basket normalization for reweightable RTokens
- Restrict
BackingManager
- Minor gas optimization
Deployer
- New boolean field
reweightable
added toIDeployer.DeploymentParams
- New boolean field
Distributor
- Minor gas optimization
Plugins
Assets
- frax-eth: Add new
sFrxETH
plugin that leverages a curve EMA - stargate: Continue transfers of wrapper tokens if stargate rewards break
- All plugins with variable refPerTok(): do not revert refresh() when underlying protocol reverts
- All plugins with multiple chainlink feeds will now timeout over the maximum of the feeds' timeouts
- Add ORACLE_TIMEOUT_BUFFER to all usages of chainlink feeds
Facades
FacadeRead
- Use avg prices instead of low prices in
backingOverview()
andbasketBreakdown()
- Use avg prices instead of low prices in
Trading
-
DutchTrade
- Add new
bidTradeCallback()
function to allow payment of tokens at the end of the tx, removing need for flash loans. Example of how-to-use incontracts/plugins/mocks/DutchTradeRouter.sol
Facades
FacadeRead
- Add
maxIssuableByAmounts()
function to provide an estimation independent of account balances
- Add
- Add new