|
| 1 | +--- |
| 2 | +eip: 7777 |
| 3 | +title: SuperFuse — Atomic Liquidity Booster |
| 4 | +author: Ali Boulkemh (@BoulkemhA) |
| 5 | +discussions-to: https://twitter.com/BoulkemhA |
| 6 | +status: Draft |
| 7 | +type: Standards Track |
| 8 | +category: ERC |
| 9 | +created: 2025-10-11 |
| 10 | +requires: ERC-20 |
| 11 | +--- |
| 12 | + |
| 13 | +## Simple Summary |
| 14 | +A new DeFi standard that allows atomic fusion of multiple liquidity operations — swapping, vault movement, and liquidity provision — in one secure transaction. |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Abstract |
| 19 | +**EIP-7777: SuperFuse** introduces a unified smart-contract interface that lets protocols and users execute complex DeFi flows atomically. |
| 20 | +It reduces gas costs and eliminates multi-transaction complexity while maintaining compatibility with ERC-20 and standard DEX routers. |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Motivation |
| 25 | +Most DeFi protocols require users to manually execute multiple steps: |
| 26 | +1. Withdraw tokens from a vault |
| 27 | +2. Swap tokens on a DEX |
| 28 | +3. Add liquidity or re-deposit into a vault |
| 29 | + |
| 30 | +This approach is inefficient and expensive. |
| 31 | +SuperFuse standardizes the process into one atomic transaction, improving composability, efficiency, and UX. |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## Specification |
| 36 | + |
| 37 | +### Interface |
| 38 | +```solidity |
| 39 | +function superFuse( |
| 40 | + address vault, |
| 41 | + address router, |
| 42 | + address tokenIn, |
| 43 | + address tokenOut, |
| 44 | + uint256 amountIn, |
| 45 | + uint256 minOut, |
| 46 | + address[] calldata path, |
| 47 | + bool fromVault, |
| 48 | + bool toVault, |
| 49 | + uint256 deadline |
| 50 | +) external nonReentrant; |
| 51 | +``` |
| 52 | + |
| 53 | +### Behavior |
| 54 | +1. If `fromVault` is true, withdraws from the vault. |
| 55 | +2. Executes token swap via the specified router using the provided path. |
| 56 | +3. Optionally deposits output into the vault if `toVault` is true. |
| 57 | +4. Emits structured events for transparency. |
| 58 | + |
| 59 | +### Events |
| 60 | +```solidity |
| 61 | +event SwapExecuted(address indexed user, address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOut); |
| 62 | +event VaultInteraction(address indexed vault, address indexed user, bool fromVault, bool toVault); |
| 63 | +``` |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## Rationale |
| 68 | +By merging vault, swap, and liquidity operations into one atomic action, |
| 69 | +SuperFuse simplifies DeFi interactions and allows developers to compose complex flows safely and cheaply. |
| 70 | +This pattern also enables on-chain strategies, smart wallets, and DeFi aggregators to become more gas-efficient. |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## Reference Implementation |
| 75 | +BNB Smart Chain Testnet deployment example: |
| 76 | + |
| 77 | +| Component | Address | |
| 78 | +|------------|----------| |
| 79 | +| Router | `0x9ac64cc6e4415144c455bd8e4837fea55603e5c3` | |
| 80 | +| Vault | `0x0000000000000000000000000000000000000000` | |
| 81 | +| TokenA | `0xYourTokenAAddress` | |
| 82 | +| TokenB | `0xYourTokenBAddress` | |
| 83 | +| SuperFuse | `0xYourSuperFuseAddress` | |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +## Security Considerations |
| 88 | +- Implements ReentrancyGuard protection. |
| 89 | +- Relies only on verified DEX router contracts. |
| 90 | +- Deadline parameter prevents delayed execution. |
| 91 | +- Requires token approval for ERC-20 transfers. |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## Backward Compatibility |
| 96 | +Fully compatible with existing ERC-20 tokens and Uniswap-style routers. |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +## Copyright |
| 101 | +Copyright and related rights waived via |
| 102 | +[CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/). |
0 commit comments