myelin
Robinhood Chain
Docs: Overview

Myelin documentation

Myelin is a Uniswap v4 hook that sets the fee of every swap with a neural network running inside the swap. These pages explain how to use it, how it works, how to check it and how to build with it.

What it does

Before a swap, the hook reads what the pool remembers about its recent price moves (eight integers), asks a model of 289 parameters how far the price is likely to move in the next minute, and turns the answer into a fee: higher when the pool is likely to move, lower when it is calm, never below 0.05% or above 0.41%. After the swap, if the price really moved, it updates its memory. Part of the fee (10% in this deployment) goes to a Treasury that has no owner and uses it to buy back and burn a token.

Everything happens on-chain, in the same transaction as the swap. The fee needs no server, no oracle and no keeper, nothing has an admin key, and every fee it has ever set can be recomputed by anyone from public data. Only the buyback needs someone to call it: anyone can, and a keeper script in the repository does.

Where to start

Key facts

NetworkRobinhood Chain (chain id 4663)
Hook0xe98beA64f59d1Fd4C73df53B22C6439B601AB0c4
Model0xF5400cC2836D462605b5d7877b2C26F3f134E87e
Fee range0.05% (floor) to 0.41% (cap); a static pool charges one fee at all times
Treasury share10% of every fee, fixed at deployment (the hook accepts at most 20%)
Model8 → 16 → 8 → 1, 289 parameters, integer arithmetic, 21,890 gas per prediction
Changeable by anyone?No. No owner, no upgrade path: a new version is a new hook at a new address
LicenseMIT

All pages

Use it

How it works

Trust

  • Verify everything: Check the contracts, the model and every swap yourself.
  • Backtest results: What we measured on 735,161 real swaps, including what did not work.
  • Shadow mainnet: What Myelin would have charged on real mainnet pools, and how to read it.
  • Risks: What can go wrong, in plain words.
  • Status: What is done, what is checked and what is not.

Build

Reference

  • Glossary: Ticks, basis points, hooks and the other words.