-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: prep separate directory for seeding with sims #38
Conversation
details on the requirements for each week can be found at: https://discord.com/channels/1011322803414388897/1218208598199500870/1219585892973281361 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
- Adds wsteth and reth to the repo, addresses confirmed
- Creates prep script to consolidate the treasury's rETH into stETH and create the pool (confirmed eBTC address)
- Creates scripts to seed the pool by batches with amounts according to treasury decision (left a comment)
- Adds simulations for the full cycle
Only comment is that once the CDP is created on week1, the following weeks should use the same CDP
as discussed w/ @sajanrajdev we will split this pr into separate pr's. the focus on this one is uniquely the prep for swapping into the collateral and pool creation cmd:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script was modified:
- Limits amount of rETH to be swapped for stETH to ~800 (uses CG's spot to estimate amount of rETH to add)
- Modifies the top-up portion of the script so that the original CDP is adjusted in order to borrow the eBTC required for the top-ups. It first tops-up collateral and then borrows more debt while preserving the target ICR (200%) - LGTM (Note: For the future, we should incorporate the
adjustCdpWithColl
function so that we can do this two actions in one transaction). - Simulations show effective pool creation, eBTC borrowing and minting of positions (seeding) - LGTM
- Passing target ICR to function as 2e18 (200%) as expected by functions - LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to have support for ebtc liquidity initialization in uniswap v3
@@ -1582,9 +1582,7 @@ def cdp_withdraw_debt(self, cdp_id, debt_withdrawable_amount): | |||
sync_tcr = self.cdp_manager.getSyncedTCR(feed_price) | |||
assert sync_tcr > self.CCR | |||
|
|||
# verify: existing debt in cdp id is greater than amount to wd | |||
debt_before = self.cdp_manager.getCdpDebt(cdp_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might use cdp_manager.getSyncedCdpDebt()
for debt_before
|
Run sim: