{"id":22831154,"url":"https://github.com/OuailTayarth/StableFutureProtocol","last_synced_at":"2025-10-21T04:30:47.453Z","repository":{"id":222390893,"uuid":"756546343","full_name":"BjornBuug/StableFutureProtocol","owner":"BjornBuug","description":"StableFuture is a DeFi protocol that enables users to provide liquidity in rETH, borrow assets, and trade leveraged positions","archived":false,"fork":false,"pushed_at":"2024-07-31T08:20:20.000Z","size":7498,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-12T20:19:19.176Z","etag":null,"topics":["chainlink","ethereum","rocketpool","solidity","solidity-contracts"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BjornBuug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-12T21:22:07.000Z","updated_at":"2024-10-31T19:15:48.000Z","dependencies_parsed_at":"2024-07-31T09:41:17.005Z","dependency_job_id":"8998935e-db2a-4711-b755-af0e9f62ee51","html_url":"https://github.com/BjornBuug/StableFutureProtocol","commit_stats":null,"previous_names":["ouailt/stablefutureprotocol","bjornbuug/stablefutureprotocol"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornBuug%2FStableFutureProtocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornBuug%2FStableFutureProtocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornBuug%2FStableFutureProtocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornBuug%2FStableFutureProtocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BjornBuug","download_url":"https://codeload.github.com/BjornBuug/StableFutureProtocol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237431118,"owners_count":19308948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chainlink","ethereum","rocketpool","solidity","solidity-contracts"],"created_at":"2024-12-12T20:19:26.791Z","updated_at":"2025-10-21T04:30:42.392Z","avatar_url":"https://github.com/BjornBuug.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StableFuture Protocol\n\n## About the Project\n\nStableFuture is a DeFi protocol that enables users to provide liquidity, borrow assets, and trade leveraged positions. Key features include:\n\n- Liquidity providers can deposit rETH(Rocket Pool ETH) and receive SFR tokens\n- Traders can open leveraged long positions on rETH\n- NFT representation of trading positions\n- Points system for borrowers based on position size\n- Dual oracle system using Pyth network and Chainlink for accurate rETH pricing\n- Liquidity providers earn yields on staked rETH and collect protocol fees\n\nThe 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.\n\n## External Integrations\n\n### [Rocket Pool Protocol](https://rocketpool.net/)\nStableFuture integrates with Rocket Pool, utilizing rETH tokens as the main asset for liquidity provision and trading.\n### [Pyth Network](https://pyth.network/)\n### [Chainlink Oracles](https://chain.link/)\n\n## Actors\n\n* **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.\n* **Leverage Traders**: Users who open leveraged long positions on rETH, using their deposited rETH as collateral and borrowing additional rETH from the protocol.\n* **Keepers**: External actors who can run liquidation processes to ensure the timely closure of underwater positions, protecting the protocol and liquidity providers.\n\n## Protocol Flow to Open Long Position as Leverage Trader\n\n1. **Deposit rETH as Collateral**: Trader deposits rETH from their wallet as security for the leverage trade.\n2. **Borrowing rETH for Leverage**: Trader chooses a leverage ratio (e.g., 2x, 5x) to borrow additional rETH.\n3. **Opening the Long Position**: Total position (original rETH plus borrowed rETH) is used to open a long position.\n4. **Receive an NFT**: Trader receives an NFT representing their trade.\n5. **Gain Points**: Trader earns points based on the borrowed amount (\"additionalSize\") when opening the leverage position.\n6. **Adjust Position**: Trader can modify the trade, updating the NFT representing their position.\n7. **Close Position**: Trader can close the trade and withdraw collateral (paying fees).\n8. **Liquidation**: If the trade hits the liquidation price, the position is automatically closed, and the trader loses their collateral.\n\n\n## Foundry Test\n\nTo set up and run tests for StableFuture:\n\n1. Follow the [instructions](https://book.getfoundry.sh/getting-started/installation.html) to install [Foundry](https://github.com/foundry-rs/foundry).\n2. Clone and install dependencies: git submodule update --init --recursive\n\nNote: I'm actively working on building comprehensive test coverage for all aspects of the StableFuture protocol. Updates will be provided as development progresses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOuailTayarth%2FStableFutureProtocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOuailTayarth%2FStableFutureProtocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOuailTayarth%2FStableFutureProtocol/lists"}