[IP] eUSD 3.4.0 Upgrade

Summary

Upgrade all eUSD 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 eUSD 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 eUSD 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 eUSD 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 in favor of upgrading eUSD to the 3.4.0 release.
  • No, I am not in favor of upgrading eUSD to the 3.4.0 release.
0 voters
3 Likes

I support this proposal, I think having the latest update is an overall positive for eusd.

1 Like

I am in support of this proposal. Upgrading to latest infrastructure is both exciting and has the potential to offer new utility to eUSD token holders!

Can’t wait

1 Like