Withdrawal Incident Analysis

Key Takeaways

  • implements a dynamic cash reserve algorithm that deposits about 90% of stablecoins (USDT/USDC) to YFI yield pool to earn interest.
  • YFI yield pool’s current strategy deposits all USDT to Aave V1
  • Current Aave V1 USDT pool lends almost all USDT out with utility rate (borrow/deposit) > 99%, resulting in failure of Smoothy withdrawal of USDT if the amount is large.
  • Although the current stable borrow APR of Aave V1 USDT is > 69%, the average stable borrow APR is about 8%, which means that the low borrow APR cannot effectively push borrowers to repay USDT.
  • Further, although a borrower’s stable borrow APR can be forcibly increased by rebalancing, there seems to exist an exploit so that a whale can always circumvent the high stable borrow APR and enjoy the low stable borrow APR by repaying and borrowing a large amount of USDT repeatedly.

Incident Summary launched a stablecoin swap pool on BSC on Mar. 29, 2021, with an extra SMTY incentive. After that, a significant amount of stablecoins including USDT is moved from ETH pool to BSC pool, resulting in a large amount of withdrawal. However, after withdrawing about 20M USDT, community members found that USDT cannot be withdrawn from the pool.

Analysis implements a dynamic cash reserve algorithm in order to maximize LP return while maintaining a low swap gas fee — a unique feature of Smoothy.

  • The cash reserve is greater than 20%; or
  • There is insufficient cash reserve to complete the swap.
  • If the cash reserve is greater than 20% of the token, 10% will be retained as cash, and the rest of the cash reserve is deposited into the underlying protocol to earn interest; or
  • If the cash reserve is insufficient to complete the swap, extra tokens are withdrawn from the underlying protocol so that 10% of the token becomes reserved cash after the swap.
  • 99.99% (utility rate) of USDT are lent out with only 16,321.89 USDT available for withdrawal. This means any withdrawal > 16,321.89 USDT will fail!
  • Due to the high utility rate, the APY for both stable borrowing and variable borrow are >= 65%, which is much greater than deposit APY 11.73%.
  • The high borrow APY should push the borrowers to repay USDT to prevent being liquidated. However, it seems to be not happening.
  • Further, we notice that 94.28% of the borrows are stable borrowing
Query Result from Aave Contract
  • First, the whitepaper tells us that “stable borrow rate” does NOT impact existing stable rate positions. This means that early stable borrower’s rates may be significantly lower than the current stable borrow rate.
Stable Borrow Rate Calculation from Aave Whitepaper
Source Code of Aave Lending Pool

Special Thanks

We would like to appreciate an anonymous community member to figure out the mismatch between the current and average stable borrow rate and discuss the rebalance method.