Skip to content

Conversation

@shahthepro
Copy link
Collaborator

@shahthepro shahthepro commented Dec 27, 2022

Related PR: #1207

Deployed contracts:

Name Address
MorphoAaveStrategy 0xC72bda59E382be10bb5D71aBd01Ecc65aa16fD83
MorphoAaveStrategyProxy 0x79F2188EF9350A1dC11A062cca0abE90684b0197

Governance Proposal ID: 42 To be Cancelled

Governance Proposal ID: 43

Note: Had to change MAINNET_DEPLOYER in hardhat.config.js file to an address that I have access to before I could run the deployment. Since the governance is transferred anyway, I believe the deployer address should have no significance.


If you made a contract change, make sure to complete the checklist below before merging it in master.

Refer to our documentation for more details about contract security best practices.

Contract change checklist:

  • Code reviewed by 2 reviewers.
  • Copy & paste code review security checklist below this checklist.
  • Unit tests pass
  • Slither tests pass with no warning
  • Echidna tests pass if PR includes changes to OUSD contract (not automated, run manually on local)

@DanielVF
Copy link
Contributor

Yes, I have to change MAINNET_DEPLOYER for each deployment that I make.

@DanielVF
Copy link
Contributor

DanielVF commented Dec 27, 2022

  • Deployed contract verified code (and dependancies) match the final PR commit's code
  • The transactions that interacted with the newly deployed contract match the deploy script.
  • Governance proposal matches the deploy script
  • Smoke tests pass after fork test execution of the governance proposal
  • Update Docs

Deployed contract matches

🟥 [Edit: 🟩 Fixed] The proxy source code is not verified yet. 0xa97F983EEaa74B92a6475c71838D04238DDA394D

Governance Proposal

from world import *
v = governor.getActions(41)
[print(v[0][i],v[1][i],v[2][i],) for i in range(0, len(v)+1)]

Smoke Tests

from world import *

MORPHO_AAVE_STRAT = '0xa97f983eeaa74b92a6475c71838d04238dda394d'
sim_governor_execute(42)

# -----

before = vault_core.totalValue()
vault_admin.reallocate(MORPHO_COMP_STRAT, MORPHO_AAVE_STRAT, [USDC], [1e6 * 1e6], {'from': STRATEGIST})
after = vault_core.totalValue()
print("Profit In", c18(after-before))

vault_admin.reallocate(MORPHO_AAVE_STRAT, MORPHO_COMP_STRAT, [USDC], [1e6 * 1e6], {'from': STRATEGIST})
after2 = vault_core.totalValue()
print("Profit Almost Full Cycle", c18(after2-before))

vault_admin.withdrawAllFromStrategy(MORPHO_AAVE_STRAT, {'from': STRATEGIST})
after3 = vault_core.totalValue()
print("Profit Full Cycle", c18(after3-before))

@DanielVF DanielVF changed the title Deploy Morpho Aave strategy Deploy 46 - Morpho Aave strategy Jan 3, 2023
Copy link
Contributor

@DanielVF DanielVF left a comment

Choose a reason for hiding this comment

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

Deploy process review complete, though we shouldn't merge until the underlying contract PR has been reviewed.

@shahthepro shahthepro changed the title Deploy 46 - Morpho Aave strategy Deploy 47 - Morpho Aave strategy Jan 4, 2023
@shahthepro
Copy link
Collaborator Author

@DanielVF I had to redeploy the contracts due to a code change. We should also cancel the previous proposal 42, the new proposal ID is 43. Have updated the PR description with the new addresses and proposal ID. Would you mind reviewing them again?

@sparrowDom
Copy link
Member

sparrowDom commented Jan 4, 2023

Both the original PR and this deploy one look good. I have:

this makes the fork environment identify the proposal and execute it:

Running 047_morpho_aave_strategy deployment...
Found proposal id: 43 on forked network. Executing proposal containing deployment of: 047_morpho_aave_strategy
INFO: Impersonated Guardian at 0xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d899
INFO: Proposal 43 queued
INFO: Advancing time by 48 hours + 1 second for TimeLock delay.
INFO: Proposal 43 executed
047_morpho_aave_strategy deploy done.

and run all the fork tests on top of that and they passed:
Screenshot 2023-01-04 at 20 05 11

Code verification
MorphoAaveStrategyProxy deployed at 0x79F2188EF9350A1dC11A062cca0abE90684b0197 has the exact code as in our codebase. And points to implementation address: 0xC72bda59E382be10bb5D71aBd01Ecc65aa16fD83

MorphoAaveStrategy implementation contract deployed at 0xC72bda59E382be10bb5D71aBd01Ecc65aa16fD83 has the exact code as in our codebase.

Governance proposal #43

Id Contract Function CallData
1 0x79F2...4b0197 (MorphoAaveStrategyProxy) claimGovernance() 0x
2 0xE75...C02F70(VaultProxy) approveStrategy(address) (ok - MorphoAaveStrategyProxy address)0x00000000000000000000000079f2188ef9350a1dc11a062cca0abe90684b0197
3 0x21Fb...6c89(HarvesterProxy) setSupportedStrategy(address,bool) (ok - MorphoAaveStrategyProxy address, and true)0x00000000000000000000000079f2188ef9350a1dc11a062cca0abe90684b01970000000000000000000000000000000000000000000000000000000000000001
4 0x79F...b0197 (MorphoAaveStrategyProxy) setHarvesterAddress(address) (ok harvester address)0x00000000000000000000000021fb5812d70b3396880d30e90d9e5c1202266c89

Copy link
Member

@sparrowDom sparrowDom left a comment

Choose a reason for hiding this comment

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

All checks out good job @shahthepro

@sparrowDom sparrowDom merged commit 19009a4 into shah/morpho-aave Jan 4, 2023
@sparrowDom sparrowDom deleted the shah/morpho-aave-deploy branch January 4, 2023 20:31
sparrowDom pushed a commit that referenced this pull request Jan 4, 2023
* checkpoint

* Revert dep on BaseCompoundStrategy

* Update tests

* prettier

* Use migration ID 046

* lint

* lint

* Address review comments

* Also, update `_checkBalance` method

* Remove unused import

* Update migration ID

* Deploy 47 - Morpho Aave strategy (#1209)

* Deploy Morpho Aave strategy

* Update deployment files

* prettify
@DanielVF
Copy link
Contributor

DanielVF commented Jan 5, 2023

✅ Second deploy looks good.

  • Deployed contract verified code (and dependancies) match the final PR commit's code
  • The transactions that interacted with the newly deployed contract match the deploy script.
  • Governance proposal matches the deploy script
  • Smoke tests pass after fork test execution of the governance proposal
  • Update Docs

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.

4 participants