A Uniswap V4 hook implementing privacy-preserving batch auctions using time-locked intents to reduce MEV and improve execution quality.
Chain - Sepolia
- POOL_MANAGER = 0x8C4BcBE6b9eF47855f97E675296FA3F6fafa5F1A
- DRAND_ORACLE = 0xf7801a6025b2d2d6e2b22895bf928f84bcefb9d7
- TLIS_HOOK = 0xF1CB36943FF487579B02BC2CAcA1a20e071DC0C0
- TEST_USDC = 0xEC476a01F537992aD68D8C16AAcc12a214f05dAC
- TEST_WETH = 0x7D07C0A8a726aa9c30d5477F15Aa1D0B8532c589
- MODIFY_LIQUIDITY_ROUTER = 0xc5595C6011523D9AF9C01242F35fb683C3DE8731
The TLIS Hook allows users to submit encrypted trading intents that are collected into batches and executed after a time delay. This design prevents front-running, reduces sandwich attacks, and enables better price discovery through batch settlement.
- Privacy Through Time-Locking: Encrypted intents prevent MEV exploitation
- Batch Processing: 5-minute collection windows for better price discovery
- Keeper System: Priority execution with economic incentives
- Fee Distribution: 50% of fees to executors, protocol sustainability
forge buildforge test --match-path test/TLISHook.t.sol -vvvUsers submit encrypted intents → Batched for 5 minutes → Time-locked for 1 minute → Keeper priority execution → Open execution → Settlement
function submitIntent(PoolKey calldata poolKey, bytes calldata encryptedData)
external payable returns (bytes32 intentHash)Fee: 0.001 ETH
function executeBatch(PoolId poolId, uint256 batchId) externalExecutes batch after unlock time. Keepers get priority in first minute.
function registerKeeper() external payableMinimum bond: 0.1 ETH
BATCH_DURATION: 5 minutesEXECUTION_DELAY: 1 minuteMIN_KEEPER_BOND: 0.1 ETHBATCH_FEE: 0.001 ETH
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>$ cast <subcommand>$ forge --help
$ anvil --help
$ cast --help