Inspiration

Half of DeFi’s TVL is locked in DEX’s LP tokens.

We burned our nuts to come up with an idea to use this massive illiquid market as collateral while somehow utilizing its LP profits to make a zero-fee lending protocol.

Amid our conquest, we made a groundbreaking discovery: that most liquidity providers result in a net loss while providing liquidity, ironically because IL losses are greater than fee profits.

As a result, we came up with this crazy idea that can extract IL from the LP tokens and make it into PROFIT rather than a loss. We call this concept “Impermanent Profit(IP).”

What it does

LP SMITH is a lending protocol that allows users to deposit LP tokens as collateral and borrow ERC20 tokens with zero interest.

In a traditional structure, the lenders earn interest profits from the borrowers. In LP SMITH, the lenders earn "Impermanent Profit(IP)" from the LP tokens deposited by the borrowers.

As soon as the borrower deposits the LP tokens(USDC-ETH LP), SMITHY(LP SMITH’s smart contract) breaks them up into their underlying assets(USDC and ETH). When the borrowers request to withdraw their LP tokens, SMITHY will meld them together into their original form(USDC-ETH LP).

The reason why LP SMITH does this is because, in contrast to the common belief that liquidity provision makes profits, the larger majority of liquidity providers end up with a net loss because Impermanent Loss(IL) is greater than trading fee profits. In other words, holding the underlying assets separately is more profitable than staking the LP tokens. Thus, when SMITHY breaks and holds the LP tokens as separate underlying assets(no profit/loss), it makes a net profit compared to holding the LP token(loss). This net profit is "Impermanent Profit." As such, although borrowers can borrow after depositing collateral with no interest, their collateral(LP tokens) is actually making an "Impermanent Profit" to pay to the lenders.

How we built it

LP SMITH has two major users: Borrower and Lender.

Borrowers deposit LP tokens from AMMs(Uniswap, Sushiswap, Quickswap, etc) as collateral and borrow ERC20 tokens. Upon deposit, SMITHY breaks up the LP tokens to its underlying assets.

Borrowers can request an immediate withdrawal on their collateral LP tokens after repaying any asset borrowed. Upon request, SMITHY re-mints the LP tokens from its underlying assets. Borrowers receive the same number of LP tokens they had initially deposited while the value of each LP token will have risen due to having accrued trading fees from their source AMMs.

Lenders deposit ERC20 tokens to the lending pool and receive smTokens that represent a share of the lending pool. These smTokens rise in value based on IP from the LP tokens. smTokens are minted and burnt upon supply and withdrawal of ERC20 tokens from LP SMITH.

If IL becomes considerably large compared to the LP token's potential trading fee profits, the protocol re-mints the LP tokens to realize IP. This way, LP SMITH can maximize IP to pay out to Lenders.

Challenges we ran into

Continuous Value Accrual in smTokens

Problem

The value of the smToken will not be continuous if profits occur only at the LP token withdrawal. Such non-continuity will allow attackers to front-run the smToken price for discrepancies arising from unrealized IP. Such front-running will disable smToken holders from earning profits even if LP depositors are making unrealized losses.

Solution

Therefore, unrealized IP must be continuously reflected in smToken's value. We made a formula that is used to calculate the exchange rate between smToken and its underlying asset t in real-time. (Check out our gitbook link)

Accomplishments that we're proud of

Solving the LP token Price Manipulation Problem

Problem

Oracles cannot provide price feeds for all LP tokens because the prices of the same LP token from two different exchanges are different. Further, estimating the LP token price by using the pool price may expose the protocol to LP token price manipulation attacks.

Solution

To avoid such attacks while retrieving the proper prices of LP tokens, a hybrid LP token valuation model estimates the proper LP token price by referencing both the pool size and the oracle price feed instead of the pool price.

Formulating the Concept of “Impermanent Profit”

Impermanent Profit(IP) is the opposite concept of IL. Because LP SMITH breaks up the LP tokens and holds the underlying assets separately, it not only avoids the losses from IL but rather makes them into profits from IP.

According to an academic paper published by Bancor, total fees accrued on Uniswap V3 for the first 138 days since inception was $199.3 million compared to the IL suffered which was $260.1 million. Thus, liquidity providers would have been better off by $60.8 million if they simply HODLed. In other words, LP SMITH could have made an IP of $60.8 million by separately holding the underlying assets.

Taking into consideration that the average TVL for V3 was $1.6 billion at the time, such IP would have generated 3.75%(60.8m/1.6b) profit during this period (or 9.9% APR). Further taking into consideration that V3's TVL has more than doubled while trading volumes are still similar, the loss amount caused by IL has also more than doubled. As increasing IL opens more opportunities for IP, the market is becoming more suitable for LP SMITH.

What we learned

We learned how lending protocols function by studying AAVE’s structure. It was a great experience to build a big project in few days.

What's next for LP Smith

Support Uniswap V3 NFT as Collateral

We will bring in the big market by supporting Uniswap V3’s LP NFT as collateral. We expect to see strong demand especially from V3 users to have a because their concentrated liquidity aggravates the rate of loss caused by IL. Since Uniswap V3 has a TVL of over $4 billion and LPs that suffer critical IL problems, we expect LP SMITH’s TVL and its lenders’ profit generated from IP to grow at an expedited pace.

Embedding AAVE at layer0

We’re planning to integrate liquidity of LP SMITH’s whole lending pool to AAVE’s lending pool. After the integration, borrowers of LP SMITH will be able to borrow every tokens listed on AAVE including reserves that LP SMITH doesn’t own. Also, lenders will be able to earn additional AAVE’s lending interest while receiving IPs from LP SMITH.

Built With

Share this project:

Updates