RugSafe is a cutting-edge multichain protocol designed to address and mitigate rug-pull risks in decentralized finance (DeFi). By transforming rugged tokens into opportunities, the protocol leverages cryptographic security measures, economic incentives, and innovative mechanisms to protect users while creating new financial instruments. RugSafe redefines recovery and resilience in DeFi, enabling users to secure their assets, recover losses, and engage in advanced financial operations.
| Status Type | Status |
|---|---|
| Development Build | |
| Issues | |
| Last Commit | |
| License |
RugSafe integrates recovery mechanisms and financial instruments to empower DeFi users:
- Vault Mechanism: Securely deposit rugged tokens to receive anti-coins, which inversely correlate to the token’s value.
- Perpetual Contracts: Advanced trading instruments with collateralized leverage and robust liquidation processes.
- Decentralized Exchange (DEX): Facilitates trading of rugged tokens, anti-coins, and other ecosystem assets.
- Rug Detection: Real-time mechanisms to identify and mitigate potential rug pulls.
- Anti-Coin Dynamics: Implements an inverse logarithmic pegging model to stabilize and hedge rugged token value declines.
- Token Recovery: Deposit rugged tokens to mint anti-coins.
- Anti-Coins: Inversely pegged to rugged tokens, offering protection and stability.
- Secure Registry: Vaults are tracked across blockchains in a unified registry.
- Leverage Trading: Open long or short positions with collateralized assets.
- Liquidation Mechanisms: Secure systems to manage under-collateralized positions.
- Advanced Collateral Management: Add or adjust collateral dynamically.
- Trading Infrastructure: Swap rugged tokens, anti-coins, and stable assets.
- Market Stability: Enforces inverse logarithmic pegging between rugged tokens and anti-coins.
- Liquidity Incentives: Rewards liquidity providers for maintaining balanced markets.
- Liquidity Monitoring: Detects sudden liquidity changes signaling potential rug pulls.
- Proactive Interventions: Executes protective actions such as front-running or sandwiching to secure assets.
- Mitigation Systems: Allows users to define automated intents for managing risky positions.
This repository focuses on the Solana implementation of the RugSafe protocol, specifically the Vaults and Perpetuals programs:
- Vaults Program: Secure rugged token deposits and issue anti-coins.
- Perpetuals Program: Enable leveraged trading and advanced position management.
For details on these modules, see below.
- Deposit: Secure rugged tokens in vaults.
- Withdraw: Retrieve deposited assets.
- Anti-Coin Issuance: Mint anti-coins to hedge rugged token losses.
- Open Positions: Initiate leveraged trades (long or short).
- Manage Collateral: Dynamically adjust collateral.
- Liquidation Rules: Enforce safeguards for under-collateralized positions.
To get started, ensure you have the following tools installed:
- Rust: Install Rust
- Solana CLI: Install Solana CLI
This repository uses a workspace to manage the rugsafe-perps and rugsafe-vaults programs. The Makefile provides convenient targets to streamline development.
.
├── Makefile
├── Cargo.toml
├── rugsafe-perps
├── rugsafe-vaults
├── tests
└── README.mdBuild the programs:
$ make devRun integration tests:
$ make tWe welcome contributions to RugSafe! Join our community and help shape the future of DeFi:
- Discord: Join our community
- Telegram: Join the chat
RugSafe is released under the GPL License.
Note: This repository is under active development and may undergo significant changes. For a detailed understanding of RugSafe, refer to our white paper.
