Closed grandizzy closed 1 year ago
lgtm (although I think the name of the PR is reversed -- we are ensuring that the debt is less than the deposit)
thanks, makes sense, I updated it
This PR appropriately restricts the HTP from being above the LUP && the debt exceeding deposit if a lender moves from a higher index to a lower index.
I suggest we add a simple test which proves this functionality is working as expected
yep, makes sense! mind to add such to existing PR? @ith-harvey
LGTM
The links that summarize the issue may die... please copy and paste the issue into the description directly
updated
Description of change
High level
moveQuoteToken
doesn't check if pool debt is not less than depositsremoveQuoteToken
after removing amount from deposit we revert ifHTP
>LUP
or pool debt exceeds depositsmoveQuoteToken
we revert ifHTP
>LUP
but don't check if pool debt exceeds deposits (unlikely but there's a chance when unutilized deposit fee is applied)Contract size
Pre Change
Post Change
Gas usage
Pre Change
Post Change