Feeding Uniswap with Aave

AlexEuler
3 min readMar 21, 2023

--

Introduction

Have you ever wondered if it’s possible to enter Uniswap with only one token? Well, there’s a solution that does just that. By providing only ETH as liquidity and borrowing USDC using AAVE, you can maximize yields in the ETH/USDC Uniswap pool.

However, determining the exact amount of USDC to borrow can be tricky. That’s why in this article, I’ll walk you through the steps involved and explain how to calculate the optimal borrowing amount. With this strategy, you can effectively maximize your returns in the DeFi space.

How?

When providing liquidity to Uniswap, both ETH and USDC are required. However, by leveraging AAVE, we can borrow USDC and use it to add liquidity to the pool with only ETH.

The input parameters for this strategy include:

  • the initial ETH deposit (v)
  • the current Uniswap V3 price (p)
  • the lower bound of the Uniswap V3 price range (a)
  • the upper bound of the Uniswap V3 price range (b)
  • the health factor we want to maintain in Aave (h_f)
  • the liquidation threshold for the ETH collateral in Aave (L_t)

To determine the amount of ETH to deposit (c) into Aave v3, we use the following formula:

We then borrow b USDC using AAVE, where b is calculated as:

Finally, we add v-c ETH and b USDC to the Uniswap pool.

Why does it work?

The proportion of ETH and USDC in the Uniswap pool is determined by Uniswap itself based on the current price and price range. The ratio R of ETH to USDC in the pool is calculated as:

Using the formulas from earlier, we can show that:

This means that the ratio of ETH to USDC we are adding to the pool matches the ratio that Uniswap dictates, and we maintain our desired health factor in AAVE as well.

Conclusion

To sum up, this strategy allows bullish ETH holders to gain exposure to the ETH/USDC pool on Uniswap while achieving high yields and maintaining a healthy portfolio. By borrowing USDC using AAVE and providing only ETH as liquidity, this approach can help maximize returns in the DeFi space.

--

--

AlexEuler

Building Mellow protocol | Chartered Financial Analyst | Smart Contracts & Full Stack Dev | Math & Stochastic Analysis https://alexeuler.dev