Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compound Integration upgrade #95

Merged
merged 1 commit into from
Aug 7, 2020
Merged

Compound Integration upgrade #95

merged 1 commit into from
Aug 7, 2020

Conversation

superduck35
Copy link
Contributor

@superduck35 superduck35 commented Jul 28, 2020

Upgrade type: PROXY CONTRACT UPGRADE
Affected file: CompoundIntegration.sol
Proxy address: 0xd55684f4369040c12262949ff78299f2bc9db735
New version: 1.1

Description

Upgrades the Compound Integration, addressing some UX problems.

  • New function collectRewardToken allows the mStable Governor to collect the $COMP airdrops
  • Withdrawing minute amounts of underlying causes withdraw to fail if the cToken and Underlying have different decimals. There is now logic to ensure that if cTokensToRedeem == 0, then just skip the redemption
  • checkBalance now just calculates using the exchangeRate, instead of spending 80,000 gas to check the balanceOfUnderlying. This massively reduces gas costs for deposits into the Savings Contract

Deployment plan

  • Write and comprehensively test the upgrade
  • Get external PR review
    • 1st approval
    • 2nd approval
  • Final manual check
  • Deploy CompoundIntegration v1.1 to Ropsten/Mainnet
  • Use 'DiffChecker' to validate the prev and future contracts once verified
  • Call proposeUpgrade on the DelayedProxyAdmin with implementation addresses
  • Verify upgrade is present in ProxyAdmin and addresses match up
  • Accept on Ropsten and test
  • Wait 1 week
  • Accept on Mainnet FORK by unlocking the gov address
    • Test collecting the COMP
    • Test withdrawing minute amount
    • Test SavingsDeposit, interest collection etc
  • Accept on Mainnet

Mainnet Details

Deployed address: 0xd4c14e145111e28a7694612978b9f5e9684afffa
AcceptUpgrade date:

Ropsten Details

Deployed address: 0x4d6b9c28b3c420a0c70ea8bbe085349b73e444e1
AcceptUpgrade date:

Copy link

@haythemsellami haythemsellami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@superduck35 superduck35 merged commit 8bf9944 into master Aug 7, 2020
@superduck35 superduck35 deleted the compound-upgrade branch August 7, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants