Skip to content
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/cli cdp management #19

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Conversation

petrovska-petro
Copy link
Collaborator

close #7

run, sample:

brownie run scripts/cdp_management_lens.py --network sepolia-fork main 0x491657f0b1e70fB175B3d079b26EcC962AfFEA6C

@sajanrajdev
Copy link
Collaborator

@petrovska-petro seems like this PR includes the changes from the UniV3 helpers. Do you want to rebase to that branch or perhaps claw back the UniV3 changes?

@sajanrajdev
Copy link
Collaborator

Review

Introduces a script that using an address as input, outputs all of the active CDPs owned by the address with the following details for each: CDP ID, Collateral, Debt, ICR, cdp collateral vs total cdp's owned (%) and cdp debt vs total cdp's owned (%). In addition, it outputs the current ICR and price as observed by the system in real time.

LGTM

  • Clean and concise output:
    image
  • Confirmed its accuracy:
    image

Will just wait on fixes to wrong base before approving.

@petrovska-petro petrovska-petro changed the base branch from main to feat/univ3-helpers February 5, 2024 09:02
@petrovska-petro
Copy link
Collaborator Author

@sajanrajdev base has being changed

@sajanrajdev sajanrajdev merged commit 23a70be into feat/univ3-helpers Feb 12, 2024
@sajanrajdev sajanrajdev deleted the feat/cli-cdp-management branch February 12, 2024 18:07
_,
_,
_,
) = safe.ebtc.cdp_manager.Cdps(cdp_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we might use getSyncedCdpCollShares() & getSyncedCdpDebt()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce scripts to support CDP Management
3 participants