Inspiration
DEFI has revolutionized the Decentralized Economy, from AMMs to Lending protocols that create wealth through on-chain investments. But the current DEFI solutions particularly AMMs have the issue of underutilized liquidity. The majority of the funds invested into AMMs remain Idle only a fraction of these funds are used for Trades.
This has provided an opportunity to create a DEFI protocol that is both an AMM and a Lending protocol, a protocol that provides double income for Liquidity Providers. In Liquidity, LPs earn from swap fees as well as interest from loans. Generating more income for them.
What it does
Liquidity is a revolutionary DEFI solution, it is both an AMM and a Lending pool, it creates extra value for Liquidity Providers as they earn from both Trading Fees and Interest rates on loans.
- Token Swaps
- Lending and Borrowing from the AMM pool with any of the pair as collateral
- Lending and Borrowing from AMM pool with LP token as collateral
- TWAP oracles.
How we built it
Hardhat: For writing & deploying Solidity Smart contracts
Frontend: React, Tailwindcss, Connect Kit for handling wallet connections, Viem for writing to the blockchain, and Wagmi for reading the start of the smart contacts
Protocol: The DEX is a modification of Uniswap V2, and the Fee allocation mechanism is gotten from GOAT trading V1 Protocol. The TWAP is the Uniswap Moving Average TWAP
Challenges we ran into
Building a TWAP Oracle was challenging as it was my first time building something like that.
Accomplishments that we're proud of
- Token Swaps in a Decentralized and Permissionless manner
- With Liquidity capital will be efficiently utilized.
- With Liquidity Loans, will be available for every token because Liquidity is Permissionless.
- In Liquidity, LPs can use their LP tokens to collect loans, without affecting their Fee Allocation
What we learned
Working on this project increased my Knowledge and understanding of how AMM works.
What's next for Liquidity?
Liquidity code will be improved on, we will introduce concentrated Liquidity for better efficiency for LPs.
Contract Addresses
- LSwapPairModule#LSwapPair - https://sepolia-blockscout.lisk.com/address/0xacC3d06091e917E07a4624F2105d23D02567CdCD
- LFactoryModule#LFactory - https://sepolia-blockscout.lisk.com/address/0x8e2ccA81ffB9e4a7Bc801211549E1Cb26D68fE6A
- LFactoryModule#LRouter - https://sepolia-blockscout.lisk.com/address/0x32474d32c04fa606B660EE20f1203211C8487785
- LFactoryModule#LSlidingWindowOracle - https://sepolia-blockscout.lisk.com/address/0xF80Af2b1d9b1dd7c342aD9d1bd4E79531c181269
Test Coins
- DAIModule#MockERC20 - https://sepolia-blockscout.lisk.com/address/0x3adaCF4fd3429D9fa273EC3AeBc41A552755efa5
- TWBTCModule#MockERC20 - https://sepolia-blockscout.lisk.com/address/0xCf3Ad432BC895A74D167Ec3F64eE0E6917f54Ca5
- USDCModule#MockERC20 - https://sepolia-blockscout.lisk.com/address/0x9f9d91d8fed9d1dAB6f03C2750B383C4ED1555db
- USDTModule#MockERC20 - https://sepolia-blockscout.lisk.com/address/0x6f550848C38fFA83eB832ee661A45318a4814f3c
Log in or sign up for Devpost to join the conversation.