Launch states
Every Makx launch moves through a time-based state machine determined byprepaidUntil — the timestamp up to which rent has been prepaid.
Phase 1 — Active
The launch is active whenprepaidUntil > block.timestamp + gracePeriod.
What you can do:
- Trade — pool is fully active on Uniswap V4.
- Claim fees —
claimFees()andcollectLPFees()are available. - Extend —
depositRent(launchId)adds more prepaid seconds at the currentfeeRateBps. - Repay bond —
repayBond(launchId)reducesbondAmountand lowersfeePerSecond.
Phase 2 — Grace Period
Entered whenprepaidUntil ≤ block.timestamp + gracePeriod.
- Fee claims (
claimFees,collectLPFees) are blocked. Accrued fees are preserved, not lost. - Rent extensions (
depositRent) are still allowed — the creator must pushprepaidUntilfar enough forward to exit the grace period. - Liquidation is not yet available.
Phase 3 — Liquidation Zone
Entered whenprepaidUntil ≤ block.timestamp + liquidationThreshold.
liquidationThreshold is always ≤ gracePeriod. Once inside this zone, any address may call liquidate(launchId).
The liquidation zone is a subset of the grace period — fee claims remain blocked.
Phase 4 — Liquidated
liquidate() was called. The protocol:
- Withdraws the LP NFT from Uniswap V4 — receives ETH and tokens.
- Repays
bondAmountETH to the vault. - Sends surplus ETH (above bond) to the liquidator, minus
adminLiquidationFeeBps. - Sends all accumulated hook fees to the liquidator.
- Sends all recovered tokens to the liquidator.
- Sets launch status to
Liquidated.
Phase 5 — Repaid (alternative terminal state)
If the creator callsrepayBond() enough times to reduce bondAmount to zero, the launch transitions to Repaid. No further rent is owed. The LP remains active but the vault no longer has exposure — the position is now fully the creator’s.
Key timestamps
| Variable | Meaning |
|---|---|
prepaidUntil | Timestamp through which rent is prepaid |
gracePeriod | Seconds before expiry when fee claims freeze |
liquidationThreshold | Seconds before expiry when liquidation opens (≤ gracePeriod) |
minRentalDuration | Minimum seconds that must be prepaid at launch |