Closed ferostabio closed 1 year ago
Please test this PR on: https://v2-staging-412-dot-fuji-306908.ey.r.appspot.com
Some feedback on the changes:
MAX_COLLATERAL_WITHDRAW =
COLLATERAL_BALANCE -
(BORROW_BALANCE - PAYBACK_INPUT) / (MAX_LTV * COLLATERAL_PRICE)
BORROW_LIMIT =
(COLLATERAL_BALANCE + COLLATERAL_DELTA) * COLLATERAL_PRICE * MAX_LTV
COLLATERAL_DELTA = - COLATERAL_INPUT if we withdraw
COLLATERAL_DELTA = + COLATERAL_INPUT if we deposit
similar for BORROW_DELTA
On manage-position, we've put "i" with a tooltip next to the disabled chain. Can we put just the tooltip on hovering over the disabled dropdown? Here's the text for the tooltip:
When approving spending limit, change the button from "Approve" to "Approving ..." when the tx is pending.
@NikolaiYurchenko a little something about the recommended feature
@brozorec some stuff we need to continue with some of the items:
Add position
and remove position
.Tx History
Approval process
Borrow limit calculation After I tested it out again, I figured out that we shouldn't take into account the borrow balance and the borrow input. So here's how it should work. The calculation depends on whether we are adding position or removing position. In the first case, we have to add the collateral input, while in the second, we have to deduct it:
BORROW_LIMIT =
(COLLATERAL_BALANCE + COLLATERAL_INPUT) * COLLATERAL_PRICE * MAX_LTV
BORROW_LIMIT =
(COLLATERAL_BALANCE - COLLATERAL_INPUT) * COLLATERAL_PRICE * MAX_LTV
Recommended LTV in input
The max button when withdrawing doesn't work correctly, although I see the formula was implemented right. When COLLATERAL_BALANCE = 0.005 BORROW_BALANCE = 5.31 BORROW_INPUT = 0 COLLATERAL_PRICE = 1799 MAX_LTV = 75% then MAX = 0.005 - (5.31 - 0) / (0.75 * 1799) = 0.001066667 while I have
Could the issue be that maxLtv
isn't taken as a %?
Updates about some of the unresolved points in the first comment:
@NikolaiYurchenko Can you go through the feedback of @Markoyw from here and check if the comments about alignments, modals, font sizes and the other pure UI stuff are already handled?
borrow.store.ts:838 Uncaught (in promise) Unexpected undefined param
.
When I delete the last digit of the amount, it works
Wording “Add Position” and “Remove Position” // Wording 🤔?Connext explorer link appears too early (Dagiaro) // ResearchAdd contextualized placeholders in inputs, for example instead of displaying 0 when withdrawing, display “Type amount to withdraw” // Question