-
Notifications
You must be signed in to change notification settings - Fork 58
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
add some new read-only functions to market and pool #2337
base: main
Are you sure you want to change the base?
Conversation
should make it much easier to understand the underlying computations that go behind capacity locked or similar issues in the future
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.
can we have some tests maybe?
they are forthcoming tomorrow, now that fix is in hand |
@@ -298,7 +298,14 @@ library Market { | |||
* | |||
*/ | |||
function isCapacityLocked(Data storage self) internal view returns (bool) { | |||
return self.creditCapacityD18 < getLockedCreditCapacity(self).toInt(); | |||
( |
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.
Does this update mean isCapacityLocked
now requires offchain price update?
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.
As this is an internal function we need to check which public methods get affected and start requiring offchain price updates attached. May break a lot of integrations.
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.
I recommend removing the fix from add some new read-only functions to market and pool
PR and making another one specifically for this fix.
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.
- Tests
- Removing the fix from this pr and submit it separately
- For the fix - list all the affected public methods that will flip from not requiring offhain price update
|
81ce94d
to
659899c
Compare
Used in liquidity ui |
lol ok well guess we need to add erc7412 to the liquidity ui for that call (really should be wrapped around all calls imo) |
No
Bad idea b cause that call is much heavier and harder to debug than plain call. |
should make it much easier to understand the underlying computations that go behind capacity locked or similar issues in the future
also fixes credit capacity locking with deposited collateral issue.