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

PositionManager frontend contract #116

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

noisekit
Copy link
Contributor

@noisekit noisekit commented Dec 19, 2024

  • Existing unit tests and e2e tests for closePosition are unchanged and full backward compatibility with existing implementation is preserved
  • Each method is intentionally separate even given overlapping functionality, we want a clear mapping between UI and contract and as minimal amount of contract logic as possible

PositionManager:

  • setupPosition: Creates new account, deposits collateral to the system and then delegates it to the pool
  • increasePosition: Deposits extra collateral to the system if needed and then delegates requested amount to the pool
  • decreasePosition: Removes requested amount of liquidity from the pool, requires debt repayment
  • closePosition: Removes all provided liquidity from the pool, requires full debt repayment
  • repay: Repays specified amount of debt, depositing any additional necessary amount of system stables to the system
  • clearDebt: Clears the debt to 0, repays positive debt or mints extra system stable in case of negative debt
  • ???

@noisekit noisekit self-assigned this Dec 19, 2024
Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
liquidity-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 7:25am

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.06%. Comparing base (3b76c57) to head (0e1c1b1).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
- Coverage   67.08%   67.06%   -0.02%     
==========================================
  Files         260      260              
  Lines        6358     6358              
  Branches     2055     2055              
==========================================
- Hits         4265     4264       -1     
- Misses       2093     2094       +1     

see 1 file with indirect coverage changes

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.

1 participant