StableFuture is a DeFi protocol that enables users to provide liquidity, borrow assets, and trade leveraged positions. Key features include:
- Liquidity providers can deposit rETH(Rocket Pool ETH) and receive SFR tokens
- Traders can open leveraged long positions on rETH
- NFT representation of trading positions
- Points system for borrowers based on position size
- Dual oracle system using Pyth network and Chainlink for accurate rETH pricing
- Liquidity providers earn yields on staked rETH and collect protocol fees
The protocol offers a way for users to earn passive income and for traders to leverage their positions and earn Yield in the Perpetual Futures Market.
StableFuture integrates with Rocket Pool, utilizing rETH tokens as the main asset for liquidity provision and trading.
- Liquidity Providers: Users who deposit rETH into the protocol and receive SFR tokens in return. They earn yields on their staked rETH and collect fees from the protocol's operations.
- Leverage Traders: Users who open leveraged long positions on rETH, using their deposited rETH as collateral and borrowing additional rETH from the protocol.
- Keepers: External actors who can run liquidation processes to ensure the timely closure of underwater positions, protecting the protocol and liquidity providers.
- Deposit rETH as Collateral: Trader deposits rETH from their wallet as security for the leverage trade.
- Borrowing rETH for Leverage: Trader chooses a leverage ratio (e.g., 2x, 5x) to borrow additional rETH.
- Opening the Long Position: Total position (original rETH plus borrowed rETH) is used to open a long position.
- Receive an NFT: Trader receives an NFT representing their trade.
- Gain Points: Trader earns points based on the borrowed amount ("additionalSize") when opening the leverage position.
- Adjust Position: Trader can modify the trade, updating the NFT representing their position.
- Close Position: Trader can close the trade and withdraw collateral (paying fees).
- Liquidation: If the trade hits the liquidation price, the position is automatically closed, and the trader loses their collateral.
To set up and run tests for StableFuture:
- Follow the instructions to install Foundry.
- Clone and install dependencies: git submodule update --init --recursive
Note: I'm actively working on building comprehensive test coverage for all aspects of the StableFuture protocol. Updates will be provided as development progresses.