What is a liquidation?
When a token creator stops paying rent and the launch crosses theliquidationThreshold, any address can call liquidate(launchId). This closes the position, repays the vault, and distributes remaining value to the liquidator.
Liquidation is permissionless — no special role required, no whitelist. Anyone who calls it first gets the reward.
Liquidator reward
The liquidator receives:- Surplus ETH — All ETH in the LP above
bondAmount, minusadminLiquidationFeeBpsprotocol cut. - Accumulated hook fees — All creator hook fees that were locked during the grace period.
- All pool tokens — Every token recovered from the LP withdrawal.
Liquidation process
- Validates:
status == ActiveANDprepaidUntil ≤ block.timestamp + liquidationThreshold. - Withdraws the LP NFT from Uniswap V4 — YieldPad receives ETH and tokens.
- Sends
bondAmountETH back to the vault viavault.repay(). - Sends surplus ETH (ETH recovered − bondAmount) to liquidator, minus protocol cut.
- Sends
launchFeeBalance(hook fees) to liquidator. - Sends all recovered tokens to liquidator.
- Sets
status = Liquidated.
Why bond principal is always safe
The vault’s LP position holds 100% of the initial ETH liquidity and 100% of the token supply at launch. Because tokens can only enter the pool by depositing ETH (via buys), the ETH in the pool can only be greater than or equal tobondAmount:
Why liquidate?
The incentive scales with how well a token performed. A popular token with significant trading volume accumulates:- ETH surplus from buyers who haven’t sold (ETH in pool > bondAmount)
- Hook fees from every swap
Preventing liquidation
As the creator, you prevent liquidation by staying out of the grace period:- Call
depositRent(launchId)to extendprepaidUntilbefore entering the grace period. - Call
repayBond(launchId)to reduce your bond and lower your ongoingfeePerSecond. - Fully repay the bond (
repayBonduntilbondAmount = 0) to reachRepaidstatus — no more rent required.