Liquidation
How Liquidation Works
In a swap, both parties post collateral to guarantee they can pay the obligations from their side of the trade. The buyer's collateral is sized to cover the maximum payment they could owe over the term, calculated from the swap rate and the length of the swap — not from the notional amount.
On top of that collateral, the buyer prefunds a small liquidation bounty at the moment they open the swap. The bounty is a percentage of their required collateral, set per market by the liquidationIncentive parameter and capped at 5%. So a buyer whose maximum payment obligation is $5,000 posts $5,000 in collateral plus a bounty of up to $250, for a total of up to $5,250 pulled from their wallet at entry (alongside the protocol fee).
The bounty is refundable. It's held separately from the collateral that backs your payments, and if your swap is never liquidated it comes back to you in full when the swap settles at expiry. You only forfeit it if you're actually liquidated.
When does a position become liquidatable?
A position becomes liquidatable when one side's collateral can no longer cover the payment it already owes on accrued interest up to right now.
This is worth being precise about: liquidation is evaluated on accrued payments, not projected ones. Where the rate might go between now and expiry is irrelevant to whether you can be liquidated today. A swap is only liquidatable when one side's collateral is mathematically insufficient at this moment.
Who can liquidate?
Anyone. Liquidation is permissionless — there is no whitelist and no privileged liquidator role. Whoever calls liquidateSwap on an underwater position becomes the liquidator and collects the reward.
Where that reward comes from depends on which side went underwater:
Buyer-side liquidation — the liquidator receives the buyer's prefunded liquidation bounty.
Pool-side liquidation — the liquidator receives
liquidationIncentive × poolCollateralBacking, drawn from the LP collateral reserved for that swap.
At most one side is liquidated per call. The other side receives its normal settlement.
What happens when you're liquidated
The swap closes immediately. Your remaining collateral, after the liquidator's reward is paid out, transfers to the counterparty. In the example above, being liquidated means losing the $250 bounty on top of settling what you owed.
Importantly, this works symmetrically. The LP pool faces liquidation on exactly the same terms as the buyer — if the pool's backing for a swap can't cover what the pool owes, the pool gets liquidated and the buyer is made whole. Neither side gets preferential treatment.
Your maximum loss on a swap is what you posted. Because each swap is independently collateralized and settlement caps each side's payment at its own collateral, you can never end up owing more than you put in.
Last updated