the first AI integrated inside a uniswap v4 hook

a uniswap hook that actually learns.

Synapse pairs a fixed-supply token with a real machine-learning model living entirely in solidity storage, the first time AI logic ships inside a uniswap v4 hook. Before every swap on the SYN/ETH pool, a four-feature linear regressor reads current market state, scores how toxic the incoming flow looks, and the hook quotes a dynamic LP fee from that score. Anyone can submit a training step, and a gradient update that reduces validation error commits new weights and pays out ETH from the surcharge pool.

SYN supply -
total swaps observed -
training updates -
eth distributed -

what the hook does

Every swap on the SYN/ETH pool routes through a v4 hook. Before the trade, the hook builds a four-feature snapshot of recent market state, covering the size of the incoming swap, its direction, how recent the last trade was, and the moving average of net flow, and feeds that vector into a linear model whose weights are stored on chain. The model outputs a number between zero and one that maps onto a dynamic LP fee somewhere between 0.05% and 3%.

After the swap settles, the hook captures a 0.5% surcharge from the ETH side and routes it to the vault, where it splits into three pools, with 50% earmarked for trainer rewards, 30% accruing to SYN holders, and 20% set aside for a slow buy-and-burn. The hook also writes the swap into a 32-slot ring buffer so future training steps have something to learn from.

what training means

Anyone can call brain.train(epochSize). The contract takes one stochastic-gradient step on the model weights using a window of recent observations, then computes validation loss on a held-out slice both before and after the update. If the loss does not strictly decrease, the weights roll back and the call reverts. Adversarial training is therefore a no-op by construction, since only updates that genuinely improve predictive accuracy ever land. Callers whose update reduces loss earn ETH from the trainer pool, scaled by how much the loss dropped.

what the token is for

SYN is a fixed-supply ERC-20 that does two jobs at once. Holding it gives you a pro-rata share of the holder pool, paid out in native ETH and claimable any time. It also pairs with ETH on uniswap v4 with this hook attached, so every swap on the pair grows the trainer, holder, and burn pools simultaneously.

tokenomics

fee math