D4X meets BLP
A fully new type of leverage pools BLP for the spot margin trading protocol d4x.io utilizes overcollateralized borrowing from AAVE and GHO - Borrowed Leverage Pool (BLP)
Screenshots





Problem Statement
We have introduced a new type of leverage pools for the spot margin trading protocold4x.iocalled Borrowed Leverage Pool (BLP).BLP offers lenders the opportunity to keep their funds in their preferred currency while simultaneously participating in the earnings from various other Auto Leverage Pools (ALP) at d4x.io.The concept of BLP and its development are entirely the products of the creative brainstorming sessions at the LFGHO Hackathon!For instance, a lender could deposit ETH (or even stETH) into the BLP to earn APY from all the ALPs of d4x.io, which typically only permit investments in a specific currency (for example, APL in GHO).In the scenario where BLP provides leverage in GHO, the BLP sends ETH to AAVE as a collateral supply, borrows GHO, and then forwards the borrowed GHO to D4X to earn interest from traders.The Decentralized Liquidation Engine (LE) controls the risks of margin calls for D4X and AAVE simultaneously.D4X App for Hackathon https://d4x-lfgho-hackathon.vercel.app/Notion Hackathon Docshttps://sagart.notion.site/sagart/LFGHO-Hackathon-84b1fe479e4341e39c5b8f6566613b75P.S. For a better understanding ofd4x.ioat all and ALP, refer to their documentation atdocs.d4x.io.
Solution
During the Hackathon, our team accomplished the following:We developed new BLP contracts.We implemented several integration functions in the main protocol.We deployed the entire http://d4x.io/ protocol on the Sepolia testnetWe initiated all necessary testnet simulation servers.We deployed the front end on Vercel.Schemes https://sagart.notion.site/Schemas-c621201e931546f18f231a22c3580812Tech stack:We use EVM-compatible networksSmart contracts are written in Solidity 0.8.9Smart contracts are deployed to Sepolia Testnet especially for LFGHOFront-end is written in Next JsFront-end is deployed on VercelWe used TheGraphWe used the Rainbow kit for connect walletsOracles by ChainlinkAutomation by Chainlink Keeper, GelatoIntegrated with different DEXes - Uniswap for LFGHOIntegrated with external lending protocols - AVVE for BLP (at the hackathon) and AAVE for additional lending on the basis of the D4X Protocol
Hackathon
LFGHO
2024
Contributors
- sneltyn
5 contributions
- alexdefender
2 contributions