One-tap, one-signature exit from any DeFi position - loans, LP, staking, tokens - all to USDC
The problem Exiting DeFi today is slow and risky. To reach cash you have to repay loans, withdraw collateral, pull liquidity, and swap every token one by one - 15-20+ transactions and signatures. The market moves while you are still clicking, and users get stuck half-exited.
What BFB does BFB is a one-tap panic button. Users connect a wallet, BFB scans the whole portfolio, shows a guaranteed-minimum USDC quote, and exits everything in one signature. A single atomic transaction flashloan-repays the Aave loan from its own collateral, sells the collateral, unwinds Uniswap V3 LP positions, and sweeps the remaining tokens - all to USDC, with 0 upfront capital. It handles loans, collateral, Uniswap V3 LPs, liquid staking tokens, and loose tokens. In a real mainnet test, a ~$23 portfolio (Aave debt + Uniswap V3 LP + tokens) closed to USDC in a single signature.
Live demo: https://backstop-next-gules.vercel.app
Stack BFB runs on LI.FI's Composer SDK. The whole exit compiles into one atomic program executed by the Composer VM through a per-user CREATE3 proxy: flashloan -> aave.repay (mode exact, onBehalfOf the signer) -> aToken transferFrom (after the repay, so Aave's finalizeTransfer health-factor check passes) -> lifi.zap withdraw -> lifi.swap -> flashloanRepay. Aave v3 supplies the flashloan that repays the variable debt and is repaid from the freed collateral, so the user needs 0 upfront capital. For Uniswap V3 we pull the position NFT, run decreaseLiquidity + collect, then swap the freed tokens; the amounts are pre-quoted off-chain via simulateContract. Swaps route through Uniswap and an on-chain-AMM allow-list.
The single signature comes from Dynamic + EIP-5792 wallet_sendCalls over EIP-7702: a type-0x4 transaction delegates the EOA to a smart account that runs the full 8-9-call batch (approvals + flashloan exit + sweep + LP unwind) atomically, with a graceful fallback to sequential transactions on non-5792 wallets. Alchemy drives wallet scanning, token pricing, and on-chain position detection (Aave reserves multicall, UNDERLYING_ASSET_ADDRESS round-trip). viem signs client-side; Next.js serverless route handlers build the transaction.
Hacky part Pre-existing positions can't be replayed in the server simulator (the EOA-to-proxy approval is only signed at execution), so they compile under allow-revert with run.assumptions for the swap legs, pinned to an on-chain-AMM allow-list because RFQ/signature DEXs revert when replayed. The hardest part was bundling a 3-protocol unwind (Aave + Uniswap V3 LP + token sweeps) into one EIP-7702 signature, with the flashloan funded entirely by the position's own collateral.

