[IP] USD3 3.4.0 Upgrade

Summary

Upgrade all USD3 core contracts and assets from version 3.0.1 to version 3.4.0 and upgrade to new Governance and TimelockController instances via a spell contract.

Abstract

Currently USD3 is using version 3.0.1 of the Reserve Protocol. There isn’t necessarily a problem with remaining on this version, but there is an upgrade available that will make USD3 more efficient.

The proposed proposal, if enacted, would use a spell contract prepared by ABC Labs; a contract that will handle the majority of the onchain calls necessary to complete the upgrade. The spell contains 2 steps: (i) an upgrade step; and (ii) a cleanup step. The spell has been audited by ABC Lab’s security partner, Trust Security.

Spell: Upgrade3_4_0 | Address 0xb1df3a104d73ff86f9aaab60b491a5c44b090391 | Etherscan

Problem Statement

Currently, when upgrading any contract tied to the RToken it has to be done manually one at a time in individual governance proposals. The spell contract allows for all the contract addresses to be updated in one governance proposal.

Rationale

There are several improvements made by upgrading all USD3 core contracts and assets from version 3.0.1 to version 3.4.0. The biggest benefit has to do with RTokenAsset pricing which accounts for all balances of the RToken that are out on trade. Previously this has prevented RTokens from being used as collateral in lending protocols without an oracle.

The spell sets the trading delay to 0, bots seem to be more integrated into auction participation. Setting the trading delay to 0 encourages more participation from the MEV bots.

This upgrade also adds better pricing decay logic that would take over in the case that a chainlink oracle would go offline. Additionally, automatic StRSR drip and Furnace melt after revenue auction ends. Lastly, there are improvements made for mild gas optimizations.

Draft instructions have been provided here by ABC Labs:

Step 1 - Upgrade

To execute step 1 of the upgrade spell, RToken governance should prepare a proposal containing two calls:

  1. main.grantRole(0x4f574e4552000000000000000000000000000000000000000000000000000000, 0xb1df3a104d73ff86f9aaab60b491a5c44b090391)
  2. spell.castSpell1(0x0d86883FAf4FfD7aEb116390af37746F45b6f378)

As step 1 is executed the spell will revoke its access as well as rotate the TimelockController that admins each RToken deployment.

Step 2 has a number of prerequisites before execution

  1. it must be voted on in the new Governance contract deployed in step 1
  2. all reward token balances should be claimed
  3. all rebalancing auctions must run to completion
  4. all revenue auctions must run at least until all surplus balances are below the minTradeVolume

Step 2 - Cleanup

To execute step 2 of the upgrade spell, RToken governance should prepare a proposal containing two calls:

  1. main.grantRole(0x4f574e4552000000000000000000000000000000000000000000000000000000, 0xb1df3a104d73ff86f9aaab60b491a5c44b090391)
  2. spell.castSpell2(0x0d86883FAf4FfD7aEb116390af37746F45b6f378)

Risks

There are technical smart contract risks, but this is mitigated by the Trust Security Audit. By upgrading to the latest version of the Reserve Protocol, the risk lies in keeping the code the same and not moving to an improved version of the RToken.

  • Yes, I am for this proposal
  • No, I am against this proposal
0 voters
3 Likes

Let’s get USD3 onto 3.4.0!

2 Likes