Skip to main content
POST
Redeems LP shares for the borrow asset at the current share price, which includes accrued interest. No approval is needed, so this is a single transaction signed by the provider. Any provider holding shares can redeem, including one that deposited before its market limited direct deposits to the operator wallet and registered vaults. A paused market does not block redemption.
shares is always parsed at 18 decimals, regardless of the market’s borrow asset. Unlike amount on Add Liquidity, it does not follow the borrow asset’s precision. Read a provider’s share balance from Get Provider Balance and pass it through unchanged.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.

Body Parameters

string
LP shares to redeem as a positive decimal string with up to 18 decimal places, for example "50000". Required when building calldata. The confirm call needs only txHash: the redeemed figure comes from the mined transaction, and a shares sent alongside is validated but not used.
string
Wallet holding the shares, and the wallet that will sign. Required when building calldata. Two checks run against it: the provider’s own share balance, and whether the pool can pay what those shares are worth. Neither can be asked without the address, so omitting it returns PROVIDER_REQUIRED.A redemption that fails either check is refused with INSUFFICIENT_SHARES or INSUFFICIENT_LIQUIDITY, instead of handing back calldata that reverts. Not needed on the confirm call, where the provider is taken from the mined transaction.
string
Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.

Response Fields

object
Withdrawal is bounded by uncommitted liquidity, not by share balance. A provider holding shares worth more than the pool’s idle balance cannot exit fully while borrowers hold the difference, and the contract reverts rather than partially filling. The market’s reserve ratio holds liquidity back from borrowing only, so a redemption can draw on the reserved slice. Check availableLiquidity on Get Market Metrics before redeeming a large position.

Error Codes

A redemption that reached the market through another contract confirms from the market’s LiquidityRemoved event in the receipt. Confirming with txHash can also return any transaction verification error.