Skip to main content
Repay borrowed assets to reduce or close debt. Anyone can repay any account; overpayment refunds to the payer.

Repaying

  1. Identify account debt markets
  2. Authorize token transfer of the repay amount
  3. Call repay
  4. Confirm scaled debt decreased (events / views)

Call shape

See Withdraw and repay (dev) for the current controller signature and CLI examples.

Preconditions

  • Payer authorizes the token transfer to the pool
  • Debt position exists for the repaid asset / hub key (#120 otherwise)
  • Amounts must be strictly positive — unlike withdraw, zero is not a sentinel
  • A paused spoke asset blocks repay on that listing; a frozen one does not
  • Global protocol pause does not block repay

Tips

  • Repay improves health factor before you withdraw collateral
  • Liquidators use related paths; users usually prefer plain repay