Inspiration
The project started from a frustrating realization: why is the "Buy, Borrow, Die" strategy reserved for billionaires with private bankers? Larry Ellison and Elon Musk live on credit lines backed by their assets to avoid capital gains tax, while keeping their upside exposure. In DeFi, we have the assets (ETH/BTC) and the rails (Aave), but retail users face the terrifying "Cliff Risk" of liquidation. A flash crash can wipe out their life savings. We wanted to build a "CFO in your pocket" that allows anyone to monetize their crypto wealth safely, transforming a high-risk gamble into a managed financial strategy.
What it does
BBDFi is a non-custodial borrowing assistant on Base that wraps Aave V3 lending with a proprietary Solvency Engine. Deposit & Borrow: Users deposit WBTC/WETH and borrow USDC via Circle. The Margin Shield: Unlike standard frontends, BBDFi simulates and (in our roadmap) executes a Put Spread Hedge strategy. Zero-Liquidation Impact: If the market crashes and hits the liquidation threshold, our "Smart Ratio" algorithm ensures the option payout exactly compensates for the equity lost in the liquidation process.
How we built it
We utilized a hybrid stack to merge financial engineering with robust on-chain execution: The Chain: Built on Base for low fees and fast execution, essential for managing collateral health. Frontend: Next.js 14 with OnchainKit (Coinbase) to provide a seamless "Smart Wallet" experience. Lending Protocol: Integrated directly with Aave V3 on Base for the underlying credit markets. Risk Engine: We developed a simulation engine (Python/Streamlit prototype) that utilizes the Black-Scholes model to price options (simulating Deribit data) and calculate the optimal hedge ratio. Signals: We integrated Polymarket prediction data to act as an early warning system for macro-downside probability. The Math of Safety (Smart Ratio)The core innovation is calculating the Hedge Ratio ($H_r$). Standard hedging (1 option per 1 unit of collateral) fails with Put Spreads because gains are capped. We solve for $H_r$ such that:$$Payout_{max} = Equity_{risk}$$$$H_r \times (K_{long} - K_{short}) = (Collateral \times Price_{liq}) - Debt$$This ensures that even in a total market collapse, the user's net worth remains positive.
Challenges we ran into
The Solvency Math: Determining the exact "Equity to Protect" was complex. We had to model the "Gap Risk"—the moment where the loan is liquidated versus where the hedge pays out. We solved this by implementing a "Buffer Strike" logic (buying protection 3% above the liquidation price).
UX Complexity: Explaining "Delta," "LTV," and "Put Spreads" to retail users is hard. We abstracted this into a simple "Safe Mode" toggle that handles the complexity under the hood.
Accomplishments that we're proud of
We are proud to have turned a theoretical institutional strategy into a functional dApp on Base. We successfully integrated Circle for the borrowing loop and proved mathematically that a user can survive a liquidation event without financial ruin.
What we learned
We learned that Base is the perfect environment for "Life Finance" applications due to its speed and cost efficiency. We also learned that leverage isn't inherently bad; it's just dangerous without dynamic hedging.
What's next for BBDFi
Smart Vaults: Automating the hedge execution via smart contracts (moving from simulation to on-chain execution). Tax Tooling: Adding a module to estimate tax savings vs. selling assets. Mainnet Launch: Deploying the full "Solvency Engine" to Base Mainnet.
Log in or sign up for Devpost to join the conversation.