Skip to main content

Repay a loan

1

Open Repay Loan

On Margin, open the Repay Loan tab, or click Repay next to a debt in the Positions table or on Portfolio (it opens this tab with that asset selected).
2

Choose the asset

The tab shows your exact on-chain debt for that asset, interest included.
3

Choose the source

MB repays from the tokens already in your margin account. WB repays from your wallet.
4

Enter the amount

Type an amount or use the % chips. 100% is a full repay: it closes the debt position entirely.
5

Pay

Check the before → after preview and click Pay Now.
A full repay from MB is often a little short. Interest keeps accruing, so the borrowed tokens in your margin account are usually slightly less than the debt. A full repay needs the debt plus a small (0.2%) buffer for interest that accrues while the transaction lands. If the margin account doesn’t have it, the tab tells you and suggests repaying from your wallet (WB) instead.

Flash repay

Flash repay (on the Margin positions header and in the Repay tab) unwinds the whole account for you, in steps: Each step is its own transaction and wallet approval, with progress shown as it goes. You don’t have to watch it: close the window (×, Escape or a click outside) and it keeps running as a small card at the bottom right with the current step and a progress bar. View opens the full window again; once it finishes, the card shows Done or the error and can be closed. It is not one atomic transaction. Every step re-reads the chain first, so if a run stops half-way you simply run it again and it continues with whatever is left. It never repays more than you owe; if the account can’t cover its debt, the swap step stops and shows the shortfall.

After repaying

When all debt is repaid the health factor reads No debt. Your collateral stays in the margin account; withdraw it with Transfer Collateral → WB.