Getting started

Introduction

A Uniswap v4 fee that reads the perp market.

Aven is a Uniswap v4 hook on HyperEVM. Before every swap it reads Hyperliquid's perp market in the same block, and sets the LP fee from what it sees. When the pool is stale, the trade that closes the gap pays for it, and that fee goes to LPs.

In one line

Uniswap's VolatilePairHook learns from the pool's past. Aven reads the market's present.

Why it exists#

Prices move on the perp market first. An AMM pool only catches up when an arbitrageur trades it back, and that profit comes out of LPs. A flat fee can't tell that trade apart from any other. Aven can, because HyperEVM contracts read HyperCore prices directly.

What you can do here#

Design rules#

  • No owner, keeper, relayer, proxy or custody. Nothing to upgrade.
  • Every input is logged in FeeComputed, so anyone can recompute any fee.
  • A failed price read never reverts a swap. It charges the fallback fee.
  • Integer math only, identical in Solidity and TypeScript (10,000 vectors match).
Aven · MIT · ETHGlobal MumbaiEdit on GitHub ↗