-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1406 from Badger-Finance/feat/liquis-tcl
feat: enable liquis initial tcl logic
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |