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

remDIGG - Empty DIGG denominated Vault with 1 time minting and BrikedStrategy #35

Closed
GalloDaSballo opened this issue Jan 31, 2022 · 22 comments

Comments

@GalloDaSballo
Copy link
Collaborator

GalloDaSballo commented Jan 31, 2022

Strategy Review

https://snapshot.org/#/badgerdao.eth/proposal/0x8c814efa246058e85cc0166663c26918a4e5eca90308f9b77a4d8b97d54d9570

Description

Fork of remBADGER
One Time mint of 52.94 DIGG (9 decimals)

Code Link

https://github.com/GalloDaSballo/remDIGG/tree/1.0

Review By

  • Ongoing:
  • Completed:

Review by Security Board

Doesn't apply (no strategy)

TODO

[] Deploy and Verify
[] Mint and send to devMulti
[] Wireup for Prod
[] Setup restitutionController
[] Aidrop

@GalloDaSballo
Copy link
Collaborator Author

@shuklaayush @tabshaikh @sajanrajdev @jorijnsmit Please review and lmk what you think, changes are minimal and test is just one

@GalloDaSballo
Copy link
Collaborator Author

TODO Fix: Change the name of contracts to remDIGG

@GalloDaSballo
Copy link
Collaborator Author

@sajanrajdev
Copy link
Collaborator

Fork of remBADGER with nothing but the contract name and version changed.

Confirmed the want token to be DIGG.

Lifecycle test adjusted to reflect the actual amount of shares to be minted and the amount of DIGG to be seeded. The rest of the tests remained the same and all tests are passing:
image

@shuklaayush
Copy link

Lg. Not much to review. Might want to change the first letter in name/ticker to lowercase for consistency
image
image

@GalloDaSballo
Copy link
Collaborator Author

Update:

Lg. Not much to review. Might want to change the first letter in name/ticker to lowercase for consistency image image

Fixed casing:
https://github.com/GalloDaSballo/remDIGG/tree/rfc.2

@tabshaikh
Copy link

LGTM

@gosuto-inzasheru
Copy link

looks good based on diffs, only thing that changed is label changes.

concerns i had for boosting in regards to remdigg not rebasing vs digg rebasing can be solved outside of the contract.

@GalloDaSballo
Copy link
Collaborator Author

TODO:
[] Deploy and Verify
[] Mint and send to devMulti
[] Wireup for Prod
[] Setup restitutionController
[] Aidrop

@GalloDaSballo
Copy link
Collaborator Author

Will mint and send later, see Scripts to simulate operations:

  1. Setup with restitutionController
    https://github.com/GalloDaSballo/remDIGG/blob/main/scripts/1_production_deploy.py
  2. Setup of fees, mint and renounce to governance
    https://github.com/GalloDaSballo/remDIGG/blob/main/scripts/rem_badger_mint_and_renounce.py

@sajanrajdev @shuklaayush @tabshaikh Pls lmk what you think and I'll run it tomorrow!

@GalloDaSballo
Copy link
Collaborator Author

GalloDaSballo commented Feb 1, 2022

Deploy:
RemDIGG Logic: https://etherscan.io/address/0x776a1f1107f8f805cae0440d51b22ac33af3ee61#code
Vault Proxy was deployed at: 0x99F39D495C6A5237f43602f3Ab5F49786E46c9B0

BrikedStrategy Logic deployed at: 0xf3F6666949c5a0324d6575242e68c6Ca1097C38f
Strategy Proxy deployed at: 0x4055D395361E73530D43c9D4F18b0668fe4B5b91

@GalloDaSballo
Copy link
Collaborator Author

@sajanrajdev @shuklaayush @tabshaikh You can just run
https://github.com/GalloDaSballo/remDIGG/blob/main/scripts/rem_badger_mint_and_renounce.py

And verify it will:

  • Mint
  • Set fees to 0
  • Send minted tokens to devMulti
  • Set ownership to devMulti
    To confirm script works

@shuklaayush
Copy link

Lgtm. Script does what it's supposed to do
image

@sajanrajdev
Copy link
Collaborator

@GalloDaSballo @shuklaayush @tabshaikh, the controller wire-up script is ready for review: Badger-Finance/badger-multisig#73

@sajanrajdev
Copy link
Collaborator

@sajanrajdev @shuklaayush @tabshaikh You can just run https://github.com/GalloDaSballo/remDIGG/blob/main/scripts/rem_badger_mint_and_renounce.py

And verify it will:

  • Mint
  • Set fees to 0
  • Send minted tokens to devMulti
  • Set ownership to devMulti
    To confirm script works

Script LGTM. Mints, transfers shares to devMulti, sets fees to 0, renounces ownership and asserts all of the above plus the rest of the vault/strat parameters.
Trace:

Transaction sent: 0x2d2d9ad609a929ca7b3e529792b26f046e434f1d915413765d0bfd07fed7f53b
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 170
  RemDIGG.mintExtra confirmed - Block: 14120779   Gas used: 92810 (0.77%)

Transaction sent: 0x8a7c6d378a6f67da590e5869547684769d551dcd4b9bb6a6d2b740d3f303feee
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 171
  RemDIGG.transfer confirmed - Block: 14120780   Gas used: 52810 (0.44%)

Transaction sent: 0x24dc6a24ec9201dd5e2b47a9e5762591953d7e70be2fb8d79266309949ca3e1b
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 172
  BrikedStrategy.setPerformanceFeeGovernance confirmed - Block: 14120781   Gas used: 15136 (0.13%)

Transaction sent: 0x28158b37446e6d05c2095dc7286a1a2126773e675a51d60b6b8bea1a2c396985
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 173
  BrikedStrategy.setPerformanceFeeStrategist confirmed - Block: 14120782   Gas used: 15156 (0.13%)

Transaction sent: 0x47054cf2ee656fc59e011952f0f11a3c09c76ccfa02eb509d0a88d18aa24ea65
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 174
  BrikedStrategy.setWithdrawalFee confirmed - Block: 14120783   Gas used: 15157 (0.13%)

Transaction sent: 0xd5c364e09a3b3908f34a705a1fc3056967b0058c601989f14916bacd4280f786
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 175
  RemDIGG.setGovernance confirmed - Block: 14120784   Gas used: 31345 (0.26%)

Transaction sent: 0x56217a93b97634c2cf53874a594dd816acb53df1e77583dc129f7d7a8c7b9211
  Gas price: 0.0 gwei   Gas limit: 12000000   Nonce: 176
  BrikedStrategy.setGovernance confirmed - Block: 14120785   Gas used: 31294 (0.26%)

All Parameters checked!

@tabshaikh
Copy link

LGTM

@GalloDaSballo
Copy link
Collaborator Author

Update:
Changing script to use 18 decimals as the math was done that way

@GalloDaSballo
Copy link
Collaborator Author

GalloDaSballo commented Feb 2, 2022

Ran updated Script:
https://github.com/GalloDaSballo/remDIGG/blob/1.1/scripts/rem_badger_mint_and_renounce.py

The script is the same but uses 18 decimals instead of 9, also fixes the exact amount to mint

Result:
Transaction sent: 0x65a84dd48101048d9db1af9d947a24b2021ad144e415ebc1ceaf062b179e225c
Gas price: 117.647512363 gwei Gas limit: 112499 Nonce: 179
RemDIGG.mintExtra confirmed Block: 14127147 Gas used: 101158 (89.92%)

Transaction sent: 0x4f25a71d7670846ac3749de5b854dca769bc45085ef2fba4f6b7f3da6e40ce30
Gas price: 104.607748678 gwei Gas limit: 89581 Nonce: 180
RemDIGG.transfer confirmed Block: 14127157 Gas used: 75858 (84.68%)

Transaction sent: 0x91c352b69082fe6c63b4c42ef776fe74fb8337046f8c77e2892cc1be0c32b7a3
Gas price: 105.058473175 gwei Gas limit: 37836 Nonce: 181
RemDIGG.setGovernance confirmed Block: 14127160 Gas used: 34345 (90.77%)

@GalloDaSballo
Copy link
Collaborator Author

@sajanrajdev
Copy link
Collaborator

Confirmed script was adjusted to mint 52.9420355 with 18 decimals.

  • Shares were mint and transferred to the devMulti
  • Governance was delegated to the devMulti

@sajanrajdev
Copy link
Collaborator

Confirmed proxyAdmins for both remDIGG and the bricked strategy to be the devProxyAdmin (Timelock):
image

@GalloDaSballo
Copy link
Collaborator Author

Basically done, closing, re-open if we need further edits or checks

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

No branches or pull requests

5 participants