one hook,six layers.

uniswap v4 hook layers on elysium. pools stack them, every swap pays the builders who wrote them.

……$LAMINA soon
run a swap

a v4 pool gets one hook. lamina fills it with a stack

beforeSwap, afterSwap, afterSwapReturnsDeltaaddress ends in 00c4
6layers in a stack
300,000gas for the whole stack
12 bpsroyalty cap per swap
10,000$LAMINA to list a layer
5%burned per failed run

run a swap through the stack

$25,000
drift feebeforeSwap2 bps royalty
let px = obs(30)
let vol = stdev(moves(px)) * sqrt(60)
let fee = clamp(500 + vol * 400_000, 500, 10_000)
return { fee }
veil guardbeforeSwap3 bps royalty
let fill = walk(swap.side, swap.usd)
let impact = abs(fill.avg / mid() - 1) * 10_000
let ok = fill.full && impact < 25
let fee = impact > 5 ? impact * 40 : 0
return { ok, fee }
plumb oraclebeforeSwap1 bps royalty
let gap = abs(mid() / oracle() - 1) * 10_000
let ok = gap < 30
return { ok }
ebb rebateafterSwap2 bps royalty
let bid = depth('bid', 10)
let ask = depth('ask', 10)
let helps = (swap.side == 'buy') == (ask > bid)
let rebate = helps ? stack.fee * 0.2 : 0
return { rebate }

build the next layer.

read the docs