Badger-Finance / badger-strategies

5 stars 1 forks source link

[FTM] Strategy OXD Staker #45

Closed sajanrajdev closed 2 years ago

sajanrajdev commented 2 years ago

Strategy Review

Description

Template for a basic OxDAO LP staking strategy. This strat should:

Code Link

https://github.com/sajanrajdev/strategy-oxd-staker/tree/v0.0.1

Due Diligence Document (Link, but could also just be a .md file in repo)

This document evaluates the protocols that are interacted with as strategy positions.

Deployed Contract (If present)

Review By

Review by Security Board

Test Checks (screen shot of all test passing):

image

There was a runtime error when running tests/functional/test_does_it_print.py::test_is_profitable running it separately got it to pass: image

sajanrajdev commented 2 years ago

Changes notice:

New release: https://github.com/sajanrajdev/strategy-oxd-staker/releases/tag/v0.0.2

All tests are passing: image

GalloDaSballo commented 2 years ago

Changes LG.

Ported over the optimal LP math which at this time is good, having peer reviewers over this and next week to break it

sajanrajdev commented 2 years ago

Adapted the if else statement to check between Solidly's quote and the expected bveOXD to be obtained from depositing on the locker directly. Will go for whatever is best.

All tests are passing (three failed because of rpc and passed when ran indpendently): image image image image

Release: https://github.com/sajanrajdev/strategy-oxd-staker/releases/tag/v0.0.3

GalloDaSballo commented 2 years ago

LGTM

sajanrajdev commented 2 years ago

Contract deployed and setup for USC/DEI as follows:

Logic: 0x21431450e93Caa23Fd139DeF3a8424721A9cc72a
TheVault Logic: 0x97b493B1BF0D1f226BaE8DE016F71B01645B648D

USDC/DEI

Want: 0x5821573d8F04947952e76d94f3ABC6d7b43bF8d0
Vault: 0xcd1e62b390373fcFeA87Dd06E2497Fdc907935fA
Strategy: 0x834354fddade934b6b90046EB70CD3c20f3401d1

Txs: Vault init: https://ftmscan.com/tx/0xf973300bf4cc424fa6358ea05f1f511ba99b7c19cb346a0f6b7228118676a576 Strat init: https://ftmscan.com/tx/0xdc69d5a89a3b9f0fe9072e583f2e2948acefe585fe9525e563cce19c23283041 setStrategy: https://ftmscan.com/tx/0xdcad8df24878697d9684391159e264c0d4c654d6c2fb0c09a4e6da0592993e2a

Vault added to the registry: https://ftmscan.com/tx/0x43b844d98b09bc78c3141c22b6171d94a54098987fed8dd0949450b612214172

GalloDaSballo commented 2 years ago

LG

Would like to see an harvest as well as setting guestList

Beside that LGTM

sajanrajdev commented 2 years ago

Guestlist:

Logic: 0x7354D5119bD42a77E7162c8Afa8A1D18d5Da9cF8

Contract: 0x04E472ecf9a751D1D108066F73bC6A0C78098919 User Cap: (4258800970071 100,000)/8.5 = 50103540824364705 Total Cap: (4258800970071 3000,000)/8.5 = 1503106224730941176 Reference: https://ftmscan.com/tx/0xf7468d5d69d70a26c3fd48377d702d1f4e84f51748017fc25ed052b620423301

setGuestlist: https://ftmscan.com/tx/0x4e48d4df6989869bd540e23f78567741e4014206950ca795587780e53c800897 transferOwnership: https://ftmscan.com/tx/0x6b59ca37d422cfb59da788bed5367b64a912ab85906cb434aad7ad17eecb375f

sajanrajdev commented 2 years ago

Earn: https://ftmscan.com/tx/0x12897882d612051bdaffd0fbc23e59fc42a136dc2317f370a3cfe579a2967322 Harvest 1: https://ftmscan.com/tx/0xefe29f0e4894ef882ace9139e4903f86d6c173ec1cd2895d2e309d8903556f84 Harvest 2: https://ftmscan.com/tx/0xe5d62ffb0db9f842806fd8001523487afdf256b523ec203436f84f460c1523fb Harvest 3: https://ftmscan.com/tx/0xd5c07e20c2a75ee600c7a5da46145ec985f46a3d19fc591f97a4441b5ab94871

sajanrajdev commented 2 years ago

Governance delegation: https://ftmscan.com/tx/0xf63ab618386b44821167da57b2cb4388c642248b547030321fde3d423ee0e82d