We qualify for this bounty because we added the Cypher Onboarding SDK to tell the user that he needs USDC on Polygon Mumbai. Unfortunately we had to comment those lines of code for the submission because, as we told the team, the Cypher API did not have the version of USDC on Mumbai (Axelar USDC) that the user needs to use our dapp. However, as soon as we go to Mainnet, we'll uncomment the Cypher SDK lines of code.
We qualify for this bounty because our dapp allows you, in the frontend, to simulate your retirement using your USDC balance and normal DeFi yield. However, our app goes beyond that by allowing you to directly deposit in L1 vaults while only paying L2 fees. That's because we believe that it makes no sense for normal users to pay high L1 fees, especially when saving money every month for retirement.
We qualify for this because we use OpenZeppelin Defender to automate "launching the bus" (meaning bridging from L2 to L1) once a certain amount of USDC in the L2 has been reached (10,000 USDC currently).
We qualify for this bounty because we are using the Covalent Unified API to fetch the balances of our users. It allows putting more strain on our RPC while getting us data quickly.
We qualify for this challenge because, as we know, a lot of yield protocols are still on Ethereum L1 and will remain there for a long time for various reasons. However, with our project, currently deployed on Polygon Mumbai, those protocols are now available on Polygon PoS, which further increases the amount of opportunities on it.
We qualify for this bounty because we are using the Tenderly Web3 Gateway for Goerli.
We qualify for this challenge because we have deployed our PoolerL2 contract there to allow Base users to access L1 DeFi Vaults. Unfortunately, while our contract is live, the bridge that we use in this hackathon is not available yet but we are eager to integrate it when the time comes. However, we think our project is a perfect fit for a layer 2 as it greatly increases the amount of protocols accessible at a lower cost on Base.
We qualify for this challenge because we have deployed our PoolerL2 contract there to allow Scroll users to access L1 DeFi Vaults. Unfortunately, while our contract is live on Scroll, we still need to integrate it with the Scroll bridge, which we couldn't do during this hackathon, which makes the Scroll version of our dapp not completely working. However, we think our project is a perfect fit for Scroll because it brings L1 Vaults to the network, thus greatly improves investments available on Scroll.
We qualify for this bounty because we use Chainlink Automation to keep our protocol running in the worst case scenario; which is bridging once from the L2 to the L1, but getting stuck there because the initial bridgor has stopped bridging. Our Chainlink Automation Custom Logic is: if the "bus" is stuck (variable on an L1 contract) and more than 5 minutes have passed, then let Chainlink Automation bridge to unlock user funds. Chainlink Automation is a perfect fit for this exact use case as it allows users to have more peace of mind when their funds are being bridged.
We qualify for the Axelar bounty because the Axelar General Message Passing bridge is at the very core of our protocol. Indeed, our protocol's entire point is to bridge pooled liquidity from L2 onto L1; not only we bridge tokens but we also use messaging to know how many yield-bearing tokens we minted on the L1 so that we can mint the same amount on the L2 for the user. Therefore, we bridge in both ways, from L1 to L2 and L2 back to L1.
Our project is qualified for the DeFi Track because it allows anyone to use Ethereum L1 DeFi Vaults directly from other networks like L2s. People deposit funds in the L2, and it eventually gets bridged into the L1. It's a useful DeFi project in the sense that it broadens access to layer 1 regardless of fees.
Layer-2 scaling solutions are growing. With the Ethereum roadmap it is planed to move the execution to rollups, but a lot of DeFi opportunities are still only on the Ethereum mainnet. We propose a solution to allow DeFi users to take a position on the L1 directly from a L2.
The idea is to pool users together on the L2 and to bridge their funds together to the L1 to take the position. The bridging fees and L1 fees are collectivized and the users receive a L2 token representing their position on the L1.
"DeFi Pooling", in its current version for the Hackathon (of course constrained by time), it allows anyone to deposit USDC (the Axelar USDC version) in a Polygon Mumbai Smart Contract called PoolerL2
. A small fee is taken with each deposit and put in a "Fee Bucket"; that bucket get distributed to whoever calls PoolerL2.launchBus()
. This allows the protocol to run close to permissionlessly. At the core of the idea, users are exchanging time for money. Everyone gets access to L1 protocols while remaining on L2 and paying L2 fees.
When a bus is launched, the funds get bridged to Ethereum Goerli through Axelar and end up in PoolerL1
contract that will deposit the funds to the L1 protocol that the bus was targeting. The L1 protocol will mint yield-bearing tokens (so compatible with Compound, Yearn, Flux Finance, etc) that go to the PoolerL1
, and the exact number of these tokens gets minted on L2 to everyone who was in the bus; thus there is another bridge transaction going from L1 to L2 that contains this info. To make sure the bridgor is incentivized to make the roundtrip, they also get part of the Fee Bucket (paid on L2). At the end, users who deposited on L2 get a receipt token (at a rate of 1:1 to the L1 receipt token) they can burn to get their funds back. Every bus roundtrip handles both the deposits & withdrawals.
What if the second bridge TX doesn't go through?
In the normal situation, whoever launched the bus on L2, will also launch the bus on L1; but otherwise anyone can call the L1 bridge transaction to unlock the bus, and they'll get part of the fee bucket for it. However, even in the worst case scenario where no one bridges back and the fee bucket isn't enough to incentivize, we use a Chainlink Automation smart contract with some custom logic that will launch the bus on L1 if there's a bus stuck there for more than 5 minutes. That contract is already funded with some LINK but anyone can send more.
We also use OpenZeppelin Defender to automate launchBus()
on the L2 once 10,000 USDC have been deposited.
How does the frontend work?
We are using React with wagmi & Tailwind. For the nodes we are using Tenderly Web3 Gateway & Alchemy.
Plan your retirement
DeFi Vaults allows user to enter in new kinds of investments, some of which can help you plan your retirement. You can use this frontend to have an idea of how much you'd need to deposit to attain your goals.
### Deployments
The working MVP is deployed on Ethereum Goerli (for the PoolerL1 & GateL1) and Polygon Mumbai (for the PoolerL2 & GateL2).
Ethereum Goerli
PoolerL1: 0x2424e8421959f7e522afded0d607e60b30f6332d
GateL1: 0xb5949e4f80fbd364661c28f4fe3e0bac277706d9
Polygon Mumbai
PoolerL2: 0xdf004020f283b46c40ee67917d8e9468c5c652e4
GateL2: 0x935952478e46ea2cc65c87a9187d3d2f3dd05c24
We also deployed the PoolerL2 on Scroll and Base without the GateL2 because the bridge we used for this hackathon was not available on these L2s; but we're eager to make them fully functional.
Base Goerli
PoolerL2: 0x2B4446406Cf12aE8D5dc4E14Edd1fc06cE6f9815
GateL2 (WIP): 0x014Cc34DfFe4Ed166E8Cd2f6f78fFDAF0bdEba62
Scroll Alpha
PoolerL2: 0x8d7F472B95410F2e18A4348802a79e4d2ed76398
GateL2 (WIP): 0xf584d6b98aE9cA1dAD0d0b17422beEeF8745C1E7
Contract repository: https://github.com/LaGuerrePiece/defi-pooler
Frontend repository: https://github.com/weiwiz/defipooling
Roadmap:
With Chainlink Functions, we could monitor the gas price on the L1 to warn the bridgor on-chain before they launch the bus. We could send a JavaScript script that fetches the gas price in UDSC to a Chainlink Functions contract and then get that price on-chain with an oracle contract.
Use native Scroll and Base bridge
Create an AMM on L2 to allow users to enter and exit their position easily