Skip to content

3.1.0

Compare
Choose a tag to compare
@tbrent tbrent released this 30 May 19:37
f112c1d

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() with price() 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 of price().high to compute maximum sell amounts
  • BasketHandler
    • Replace use of lotPrice() with price() everywhere
    • Minor gas optimizations to status tracking and custom redemption math
  • Broker [+1 slot]
    • Cache rToken address and add cacheComponents() helper
    • Allow reportViolation() to be called when paused or frozen
    • Disallow starting dutch trades with non-RTokenAsset assets when lastSave() != block.timestamp
  • Distributor
    • Call RevenueTrader.distributeTokenToBuy() before distribution table changes
    • Call StRSR.payoutRewards() or Furnace.melt() after distributions
    • Minor gas optimizations
  • Furnace
    • Allow melting while frozen
  • Main
    • Remove furnace.melt() from poke()
  • RevenueTrader
    • Replace use of lotPrice() with price() everywhere
    • Ensure settleTrade cannot be reverted due to tokenToBuy distribution
    • Ensure during manageTokens() that the Distributor is configured for the tokenToBuy
  • StRSR
    • Use correct era in UnstakingStarted event
    • Expose draftEra via getDraftEra() view

Facades

  • FacadeMonitor
    • Add batchAuctionsDisabled() view
    • Add dutchAuctionsDisabled() view
    • Add issuanceAvailable() view
    • Add redemptionAvailable() view
    • Add backingRedeemable() view
  • FacadeRead
    • Add draftEra argument to pendingUnstakings()
    • Remove .melt() calls during pokes

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
    • MakerefPerTok() smoother during event of hard default
    • Check for defaultThreshold > 0 in constructors
    • Add 9 more decimals of precision to reward accounting (some wrappers excluded)
  • 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 during refresh()
  • 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