Badger-Finance / badger-strategies

5 stars 1 forks source link

[FTM] OxDAO oxd locker #44

Closed shuklaayush closed 2 years ago

shuklaayush commented 2 years ago

Strategy Review

Description

Lock oxd in OxDAO locker

Harvest rewards:

Code Link

https://github.com/shuklaayush/vested-oxd/tree/v0.1.1

Due Diligence Document

WIP

Review By

Test Checks (screen shot of all test passing)

image
GalloDaSballo commented 2 years ago

Notice: Cannot have a management fee. If you want to get a fee you have to take it on the harvest, we can come up with a way but this setup will make the token lose ppfs value over time which is not ideal

Everything else looks ok, and should work as long as the 0xd locker is exactly the same as the CVX one

Please do cleanup the repo and remove the stuff we never used

We should figure out onChain voting I guess

GalloDaSballo commented 2 years ago
Screenshot 2022-03-22 at 16 38 38

Tests are passing

sajanrajdev commented 2 years ago

Implementation mirrors the CVX locker core functions.

Locks OXD into OxDAO locker for voting. Receives OxSOLID rewards that are distributed in the form of bOxSOLID through harvest. Charges performance fees on bOxSOLID.

The default voting delegate is set to TechOps.

On-chain voting and bribes claiming mechanics are yet to be implemented.

Tests:

Testing notices:

Would recommend to remove all the un-used commented out functions for cleanliness.

All tests are passing: image

shuklaayush commented 2 years ago

Update:

Diff: https://github.com/shuklaayush/vested-oxd/compare/v0.0.2...v0.0.3

GalloDaSballo commented 2 years ago

Changes LG, hardcoded path for auto-compounding is most liquid and while a generalized solution would be cool, this is acceptable at this time

All tests are passing

Screenshot 2022-03-23 at 16 16 53

Sent this PR for syntax: https://github.com/shuklaayush/vested-oxd/pull/1

If PR is merged, i'd say go ahead and deploy

GalloDaSballo commented 2 years ago

@shuklaayush @sajanrajdev Hardcoded Voter https://github.com/GalloDaSballo/ftm-oxd-hardcoded-voter/tree/rfc.0

Will need us to setup a LP pool for the locker

Deploy Locker -> Use that address to setup LP Pool Use that in the hardcoded voter POOL variable Deploy rest

This allows to automatically vote for the pool

shuklaayush commented 2 years ago

Updated to re-lock autocompounded tokens at the end of the harvest https://github.com/shuklaayush/vested-oxd/compare/v0.0.3...v0.1.2

shuklaayush commented 2 years ago

Deployments

Vault: 0x96d4dBdc91Bef716eb407e415c9987a9fAfb8906 Strategy: 0x0c7E0807011A218d0F1A156D3965875ff233933E

Logics

Vault: 0x97b493b1bf0d1f226bae8de016f71b01645b648d Strategy: 0xba4f148D1Da479780fc0bDbc727E9E034DD5E1Ec

shuklaayush commented 2 years ago

Harvest tx https://ftmscan.com/tx/0xb8565a18ee522e1c2ea97847e6ee589f33a281e26eb6b4471516ab3690b15c0c

GalloDaSballo commented 2 years ago

Code LG

Check Hardcoded Voter: https://github.com/GalloDaSballo/ftm-oxd-hardcoded-voter/tree/rc.0

Screenshot 2022-03-24 at 18 25 38

Can deploy and then we just need: [X] delegate to voter [] give governance to multisig

sajanrajdev commented 2 years ago

Changes to the Locker Code LGTM:

Hardcoded Voter LGTM:

GalloDaSballo commented 2 years ago

Deployment:

HardcodedVoter Deployed at: 0xDC4fbbc2f2E78BFDb94391103f6532C00648B069

NOTE: Anyone can vote (useful to refresh on OXD) Only governance (multisig) can undo the vote

shuklaayush commented 2 years ago

Voter LGTM. Pretty straightforward - votes 100% for the hardocoded pool (bveOxd/oxd volatile pool)

shuklaayush commented 2 years ago

Delegated strategy vote to hardcoded voter https://ftmscan.com/tx/0x30127ed8c0707d1d85c62374ffbe4ad12ce0194290f53a641d549327293a6bfb

GalloDaSballo commented 2 years ago

Voter:

Vote has been cast: https://ftmscan.com/tx/0x8c79a9faff73f1889ba6e7d1250c24062f9f856b2a82b1f3d7ae27904e8e8b72

Voting properly happened on the VotingSnapshot

Screenshot 2022-03-24 at 19 10 49
GalloDaSballo commented 2 years ago

Checked Variables and LG now. Will go out of guarded launch shortly. Closing ticket