EigenLayer: Integrated as an AVS for the Coincidence of Wants batch matching system. The EigenLayer operator runs at 0x2f131a86C5CB54685f0E940B920c54E152a44B02 and is authorized to create batch loans on DebtHook, enabling Coincidence of Wants (CoW) matching for debt orders to achieve optimal interest rate discovery through 5-minute batch windows.
Circle: The protocol uses USDC for liquidation proceeds distribution and supports the USDC Paymaster integration for gas-free transactions. Integrated through USDC as the primary lending currency in the protocol. All loans are denominated in USDC, with borrowers receiving USDC against their ETH collateral and repaying in USDC.
DebtHook - Protocolo de Préstamos DeFi
DebtHook Protocol: Our take on DeFi Lending
https://www.loom.com/share/a828f1f6cc26479b80f5de13a860d2a1?sid=5141bc0b-f284-4208-b3c9-88707ddd301d
One of the questions that got me into developing DeFi is, how are we measuring implicit rates from the market? Having a Fixed Term market, feels like a primitive to price discovery, as supply and demand will tell us how to price this positions. We’re able to do that with a modern and simple Lending Protocol, with no partial liquidations and no weird payoffs, but very simple and explicit ones. Additionally, peer-to-peer lending often results in suboptimal interest rates due to fragmented liquidity and lack of price discovery mechanisms. We were inspired by Uniswap v4's hook architecture to solve these problems by embedding liquidations directly into the swap flow for the biggest per-volume pair, ETH/USDC, making them atomic and MEV-protected while leveraging existing DEX liquidity, leveraging hook architecture, we make a better case for mitigating MEV extraction, leaving that value to users. The EigenLayer integration further optimizes the lending market by batching orders to discover fair interest rates through a Coincidence of Wants mechanism, creating a more efficient and user-friendly lending experience.
The main long term Impact I aspire to, is price discovery of interest rates native to DeFi.
DebtHook uniquely embeds liquidations directly into Uniswap v4's swap execution flow through hooks, eliminating separate liquidation transactions and MEV extraction opportunities while reducing gas costs by ~40%.
The protocol's dual innovation combines atomic, MEV-protected liquidations with EigenLayer-powered batch matching for interest rate optimization, creating the first lending protocol that protects both borrowers from predatory liquidations and lenders from suboptimal rates.
This will significantly improve capital efficiency in DeFi lending, reduce value extraction by MEV bots (estimated $100M+ annually across DeFi), and enable smaller participants to access fair lending markets previously dominated by sophisticated actors, ultimately democratizing access to efficient, transparent lending infrastructure.
The most challenging aspect was optimizing the contract to fit as a valid Uniswap v4 hook, as I'm new to optimization I might be leaving a lot on the table that can be done.
Implementing atomic liquidations within the swap flow required management of transient storage and gas optimization to ensure the entire operation remained efficient.
Additionally, coordinating the three-layer architecture (Uniswap hooks, EigenLayer AVS, and Supabase off-chain infrastructure) while maintaining security and decentralization principles presented complex integration challenges, particularly in ensuring the batch matching system could operate trustlessly while still providing optimal interest rate discovery.