Documentation
EIDOLON is the "Undrainable Standard" for decentralized finance, a radical reimagining of liquidity provision on Uniswap V4.
Introduction
Traditional DEXs require users to deposit funds into smart contracts, creating massive "honeypots" (TVL) that attract hackers. In 2024 alone, billions were lost to contract exploits.
Eidolon eliminates this risk entirely by introducing Ghost Liquidity. Instead of depositing tokens, users sign off-chain "intents" that authorize liquidity provision only for specific conditions. These funds remain safely in the user's self-custody wallet, completely inaccessible to hackers.
verified_userThe Key Difference
At rest, the Eidolon smart contract is empty. There is zero TVL to steal. We move DeFi from "Trust Code" to "Trust Math".
⛽ Gasless Swaps
Eidolon introduces a Gasless Intent model. Users no longer need to hold native gas tokens or submit on-chain transactions to execute swaps.
Off-Chain Signature
Submit your trade intent by signing a message. This signature defines exactly what you want and is stored in our Relayer.
Zero Gas Barrier
Our executors (The Medium) pick up your intent, bundle it with liquidity, and pay the gas for the execution.
🪞 Mirror Positions
Traditional LPing requires buying tokens you might not want. Mirroring allows you to provide liquidity based on the assets you already hold.
- Provide single-sided liquidity with your existing WETH or USDC.
- Automatically match market demand using our JIT Materialization engine.
- Accrue fees directly back to your wallet without ever "staking" or "depositing".
# The Flash Flow
This diagram illustrates the lifecycle of a single trade. Notice how funds are only present in the Hook for the brief duration of the transaction block.
User Wallet
Signs Intent
Executor Bot
Pays Gas
EidolonHook
Validation
JIT Liquidity
Uniswap V4
Execution
Signature Verification
Hook verifies `Permit2 Witness` signature matches exact pool parameters.
JIT Materialization
Liquidity is pulled from user wallet ONLY for the exact duration of the swap.
Atomic Settlement
Principal + Yield works are returned to user in the same block. Zero TVL left behind.
1. Authorize
Users sign a cryptographic intent via our Permit2 Witness system. No gas, no deposit.
2. Execute
When a trade comes in, our Executor Bot triggers the transaction and pays the gas.
3. Materialize
The Eidolon Hook validates the signature and "materializes" liquidity milliseconds before the swap.
4. Settle
The swap executes, fees are earned, and principal + profit is atomically returned in the same block.
# Technical Schematics
Detailed system architecture and data models for advanced integration.
System Architecture
High-level view of the off-chain/on-chain interaction model.

Security Model
Permit2 Witness
The primary vector for DeFi drains is "approval abuse." Eidolon leverages Permit2 Witness signatures to solve this. Every signature is cryptographically bound to a specific `Witness` struct containing the `poolId` and the immutable `EidolonHook` address.
A signature intended for the ETH/USDC pool cannot be used to drain funds from any other pool.
Atomic Guard
To prevent reentrancy attacks or logic errors, the `EidolonHook` implements a strict check:
require(currentBalance >= initialBalance, "AtomicGuardViolation");If a swap would result in a user receiving less than they put in (principal loss), the entire transaction strictly reverts.
JIT Math & Precision
Liquidity calculations are performed using high-precision FixedPoint96 and FullMath libraries. This prevents common DeFi arithmetic errors such as overflows or rounding attacks that typically exploit small, frequently updated pools.
// high-precision liquidity calcuint128 liquidity = FullMath.mulDiv(amount, Q96, sqrtPrice);Integration & Tech Stack
Eidolon was built by fundamentally "hacking" the standard Liquidity Provision model on Uniswap V4.
- codeUniswap V4 HooksThe core enabler. We used `beforeSwap` to pull liquidity Just-In-Time (JIT) and `afterSwap` to return it atomically.
- memoryTransient Storage (EIP-1153)Used via the "Cancun" EVM version on Unichain/Sei V2 to allow cheap, temporary storage slots for our JIT accounting.
- terminalFoundry & ViemFully typed end-to-end development environment for maximum safety and correctness.
- settingsCentralized ConfigurationOne-click environment synchronization across the bot, frontend, and smart contract scripts using a unified `.env` model.