Inspiration-
The mercenary liquidity problem: liquidity miners often find themselves jumping around different DEX's to find the highest rewards, and dumping the tokens quickly. This hurts both the DEX and the liquidity miners, when miners sell their tokens quickly the price goes down causing more miners to leave, which causes depleted liquidity and then the exchange is unusable. Olympus DAO tried to fix this problem but their solution has been a failure so far.
What it does-
Our solution to the mercenary liquidity problem is a locked liquidity protocol. Pretty much, a liquidity provider can create their own liquidity pool with as many token pairs as they want, where one side is a custom 'liquidity token', TKN, and the other side a valuable asset, and have it be locked for a duration of time. These liquidity pools will need to be of equal value relative to a base stablecoin (these are the original providerTokenAmounts), they also provide an "maturation date" (I'll explain this later). In return for providing these tokens, the liquidity provider receives 1000 TKN which they can sell on secondary markets, and 1 BPT (blend provider token), which can be used to recover the underlying assets after the maturation date. TKNs and BPTs can be sold/traded to anyone.
If somebody wants to add to this liquidity pool, they can add the same ratio of each of the tokens in the pool, they will then receive the corresponding amount of TKN and BPT.
For example:
John sends 2 MKR($4000), 360 UNI($4000), and 4000 USDC($4000), he receives 1000 TKN and 1 BPT
Marsha comes along and decides she wants to provide 1 MKR, 180 UNI, and 2000 USDC, she would receive (1/2 * 1000) = 500 TKN and (1/2 * 1) = 0.5 BPT (Marsha needs to do this before the "expiration date")
Timmy (stupid) comes along and decides to provide 0.25 MKR, 360 UNI, and 4000 USDC, he would only receive (0.25/2 * 1000) = 125 TKN, and (0.25/2 * 1) = 0.125 BPT. (Pretty much Timmy gets nothing for most of the UNI and USDC he sent)
To find TKN awarded: (lowestAmountToken / originalAmountOfThatToken) * 1000 = TKN
To find BPT awarded: (lowestAmountToken / originalAmountOfThatToken) * 1 = BPT
Exchange Rates:
TKNs: can only be "redeemed" to our contract BEFORE the "expiration date"
1 TKN = providerToken1.balance / TKN.totalSupply
1 TKN = providerToken2.balance / TKN.totalSupply
...
1 TKN = providerTokenN.balance / TKN.totalSupply
BPTs: can only be "redeemed" to our contract AFTER the "expiration date"
1 BPT = (providerToken1 / BPT.totalSupply) + (providerToken2 / BPT.totalSupply) + ... + (providerTokenN / BPT.totalSupply)
How we built it-
We used scaffold-eth for a boiler plate, and then created our smart contracts with solidity. We have 2 main smart contracts, MasterVault.sol and BlenderTokens.sol. MasterVault is where all the providerTokens are stored, TKN erc1155 address, BPT erc1155 address, along with a mapping takes in a tokenId (from erc1155) and tracks each in individual liquidity pool's corresponding token balances, expiration date, and some other info. Also in MasterVault are the createBasket, addToBasket, redeemTkn, and recoverLiquidity (BPT) functions. There are 2 instances of BlenderTokens (ERC1155) smart contracts, one for the TKN and one for BPT.
Challenges we ran into-
We had a wide variety of challenges from coming up with the tokenomics of our project to working with hardhat, which we were not too familiar with before this project. Trying to fork the mainnet locally to test and debug our smart contract specifically gave us troubles. Frontend development was also not the most smooth process either because we had only little experience with scaffold-eth and react coming in. Not to mention we arrived in New York 5 hours after we were supposed to due to airport delays and connecting flight issues, on top of that we lost a checked bag in the process.
Accomplishments that we're proud of-
We finished the solidity smart contract, we may not have been able to completely debug it but at least we finished it. We are proud of our idea overall as well, I think it is unique and could have some valuable use cases.
What we learned-
We all can definitely say that we learned a lot in the last couple days, from solidity to scaffold-eth and react to overcoming challenges out of our control. This has been an extremely valuable experience.
What's next for Blendr-
We are planning on implementing a secondary marketplace to list TKN and BPT.
Built With
- figma



Log in or sign up for Devpost to join the conversation.