Skip to content

AnirudhHack/Torch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Torch

image

Torch is a protocol that amplifies sUSDe yields through intelligent leverage strategies (recursive borrowing strategy), turning the base 29% APY into up to 81% APY. Torch currently has 1 sUSDe vault deployed on eth forknet. Built specifically for the Ethena ecosystem and sUSDe holders, Torch represents the next evolution in yield optimization for Internet Money.

🏆 Hackathon Tracks inegration

The project is eligible for following track as it increases the ethena's sUSDe holders apy from 29 % to 81 % using recursive borrowing strategy.

  1. Most Innovative Use of sUSDe Rewards

  2. Best Overall Application

Here is the sUSDe integration (below integration shows that a sUSDe vault is built that increases sUSDe position APY) SO below is the vault implementation:

contract SUSDEVault is FlashLoanSimpleReceiverBase, ERC20, IERC4626, ReentrancyGuard, AaveHelperBase, UniswapV3HelperBase{

// Vault.sol
contract SUSDEVault is IERC4626 {
    address public immutable asset; // sUSDe
    // Amplifies sUSDe yield from 29% to 81.62% APY
}

Here the underly asset in vault is sUSDe:

address public immutable asset; // sUSDe
asset = "0x9d39a5de30e57443bff2a8307a4256c8797a3497"

vault Deposit and withdraw page:

image

Dapp Deployment link

https://torch-dapp.vercel.app/

Video Demo

https://drive.google.com/file/d/1ES5or3WSMR4jhV_tbXidfCRf7XLWBPkR/view?usp=sharing

Vault Strategy

This vault implements a recursive borrowing strategy to amplify your sUSDe yields through Aave. Here is how it works:

  1. Your sUSDe is supplied to Aave as collateral
  2. We borrow WETH against your sUSDe position (up to the optimal LTV)
  3. The borrowed WETH is swapped back to sUSDe
  4. The new sUSDe is re-supplied to Aave
  5. Steps 2-4 are repeated until reaching target leverage

Contract Flow Overview:

Users can deposit sUSDe tokens into the vault The governance can manage leveraged positions on Aave using flash loans Users can withdraw their share of assets

Deposit Flow:

image

  1. User approves vault to spend their sUSDe tokens
  2. Vault pulls sUSDe tokens from user
  3. Calculates shares based on total assets
  4. Mints vault tokens (shares) to receiver

Rebalance Flow (Only Governance can execute):

image

  1. Takes WETH flash loan
  2. Swaps WETH → USDT → sUSDe
  3. Supplies sUSDe to Aave
  4. Borrows WETH from Aave
  5. Repays flash loan with borrowed WETH

Withdraw Flow:

  1. Burns user's vault tokens (shares)
  2. Calculates assets to return based on shares
  3. Swaps sUSDe to WETH with slippage protection
  4. Transfers WETH to receiver

withdrawFromAave Flow (Only Governance can execute):

The withdrawFromAave function is typically used in scenarios where the vault needs to reduce its position on Aave, either to return assets to users or to adjust its leverage. It ensures that the vault can manage its assets efficiently while maintaining the necessary liquidity and leverage levels.

  1. Repay Borrowed WETH
  2. Withdraw sUSDe from Aave

Vault APY calculation

Understanding Leverage from LTV

LTV (Loan-to-Value) = 72%

This means:

  • For every 100 sUSDe deposited
  • You can borrow up to 72 USD worth of assets
  • In our case, we borrow WETH

2. Maximum Leverage Calculation

Where:

  • LTV (Loan-to-Value) = 72% for sUSDe on Aave V3

APY Amplification

1. Base Yield Components

Base sUSDe APY = 29%
WETH Borrow Cost on Aave = 2.69%

2. Leveraged Yield Calculation

For 3x Leverage:

image

Components:
- Base sUSDe APY: 29%
- Target Leverage: 3x
- WETH Borrow APY: 2.69%

About

Supercharge Your sUSDe Yields on ethena

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published