@bastionswap
BastionSwap — escrow-native DEX built as a Uniswap V4 Hook
How it works at the Hook level:
beforeAddLiquidity: Registers issuer, enforces min 1 ETH initial liquidity, validates base token whitelist (ETH/WETH/USDC). All issuer LP additions are tracked under escrow.
beforeRemoveLiquidity: Issuer LP removal is restricted by lock-up + linear vesting. General LPs pass through freely — no restrictions.
beforeSwap/afterSwap: Snapshots issuer balance before swap, compares after. Detects dumps routed through any router or aggregator. Collects 1% insurance fee on buy swaps.
On trigger: EscrowVault calls forceRemoveIssuerLP() → seized tokens + ETH are sent to InsurancePool → holders claim proportional compensation via Merkle proof.
Key design choice: escrow doesn't custody assets. It only controls LP removal permissions. The Hook enforces everything at the PoolManager level — protection works regardless of which frontend or aggregator routes the swap.
Live on Base Sepolia testnet: bastionswap.xyz