mrgnlabs/mrgn-ts

CONFUSION IN THE NEIGHBOURHOOD! Cannot withdraw MAX when borrowing 0.00??! 😲

Closed this issue · 0 comments

image

Several times a week I explain to a confused user why they cannot withdraw the full amount of collateral deposited, in the situation shown in the screenshot.

This is a two-part story:

  • users borrow X stSOL -> leave it running for a while, the borrowed amount staying in their wallet -> come back later, "max" repay, which repays X -> see a borrow of "0.00 stSOL". They did not look at the detail of the amounts involved, did not realize that an interest has been incurred, and that the actual owed amount is X + interest. The interest is simply < 0.00 stSOL which is displayed as "0.00" on our UI.
  • as long as a user has an active borrow, a volatility margin is applied to the "max withdrawable", to avoid failing txs du to price movement between last data fetch and tx execution

Both of these bits are currently implemented with... not great UX / clarity. BUT: together, they account for maybe the single most confusing part of the UI by discord tickets standards.