Skip to content

Commit

Permalink
Merge pull request #1406 from Badger-Finance/feat/liquis-tcl
Browse files Browse the repository at this point in the history
feat: enable liquis initial tcl logic
  • Loading branch information
petrovska-petro authored Sep 28, 2023
2 parents c41b4db + 5907cfb commit b37731c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions helpers/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@
"vlLIQ": "0x748A0F458B9E71061ca0aC543B984473F203E1CB",
"claim_zap": "0xad161b8bEb5bf2Af9cDA30E3988B13F62E70431B",
"liq_vested_escrow": "0xf97964749b52c55d64E971571E1370b2618B718f",
"rewards_pool_309720_332580": "0xB99ca33d35Ea7B520EC779F001C0C0b971aAb395",
},
"paladin": {
"quest_board_veliq": "0xcbd27bf506aB5580Ef86Fe6a169449bc24Be471B",
Expand Down
39 changes: 39 additions & 0 deletions scripts/badger/liquis_tcl_strategy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from great_ape_safe import GreatApeSafe
from helpers.addresses import r


def main(pendant_bunni_gauge_rewards=True):
vault = GreatApeSafe(r.badger_wallets.treasury_vault_multisig)
vault.init_liquis()
vault.init_bunni()
vault.init_balancer()

# tokens
weth = vault.contract(r.treasury_tokens.WETH)
lit = vault.contract(r.bunni.LIT)
liq = vault.contract(r.treasury_tokens.LIQ)

# balancer pool
bpt_lit_weth = vault.contract(r.balancer.B_80LIT_20_WETH)

# rewards pool
reward_pool = vault.contract(r.liquis.rewards_pool_309720_332580)

# snap
vault.take_snapshot(tokens=[weth, vault.bunni.olit, lit, liq])

# liquis rewards claim
reward_pool.getReward()

if pendant_bunni_gauge_rewards:
vault.bunni.claim_rewards(r.bunni.badger_wbtc_bunni_gauge_309720_332580)

vault.bunni.exercise_olit()

# swap lit -> weth
lit_balance = lit.balanceOf(vault)
vault.balancer.swap(lit, weth, lit_balance, pool=bpt_lit_weth)

# TBD: processing of LIQ rewards

vault.post_safe_tx()

0 comments on commit b37731c

Please sign in to comment.