Glossary
The words used in these docs, in plain language. If one is missing, it is a bug in the docs.
- Adverse selection
- The loss a liquidity provider takes to traders who know the price is about to move. They buy at the old price, just before it goes up, or sell just before it goes down. It is the main cost of providing liquidity, and what a dynamic fee tries to charge for.
- Basis point (bps)
- One hundredth of a percent: 100 bps is 1%. Uniswap v4 counts fees in hundredths of a basis point, so
3000is 30 bps, which is 0.30%. - Burn
- To destroy tokens, so that the supply goes down. A burned token cannot be sent, sold or recovered.
- Buyback
- To use funds to buy a token on the market. The Myelin Treasury buys the project token with the fees it has collected, and burns what it buys.
- Claim (ERC-6909)
- A receipt inside Uniswap v4’s pool manager that says “this address is owed this much of this token”. Myelin mints its fee share to the Treasury as claims, in the same transaction as the swap, so the hook itself never holds a token.
- Concentrated liquidity
- Liquidity that works only inside a price range you choose. It earns more fees per dollar while the price is inside the range, and nothing while it is outside.
- Dynamic fee
- A pool whose fee is not fixed: a hook sets it on every swap. In Uniswap v4 such a pool carries a flag (0x800000) in its key.
- Exponential moving average
- An average that gives more weight to recent values. It is updated with one multiplication and one addition, so it can be kept in a few bits and updated cheaply on every observation.
- Golden vector
- A test case with its correct answer, produced by the reference implementation. Myelin’s contract and its TypeScript copy must reproduce every golden vector bit for bit.
- Hook
- A contract a Uniswap v4 pool calls at set moments, such as before and after a swap. Myelin is a hook that sets the fee before each swap and, when the price has really moved, updates its memory after it.
- Impermanent loss
- The difference between holding two tokens in a pool and holding them in a wallet, when their relative price has changed. It is a loss compared with holding, and it becomes real when you take your liquidity out at a different price.
- Keeper
- A script or service that calls a contract function when it is due. The fee of a Myelin pool needs none. The Treasury’s buyback is called by anyone, nothing calls it by itself, and the repository has a keeper that does.
- Liquidity provider (LP)
- Someone who puts tokens into a pool so that others can trade against them, and earns the fees.
- LP net
- What liquidity providers keep of a swap in the backtest: the fee, minus what traders who knew the price would move took from them, in basis points of volume. Higher is better.
- Markout
- A way to measure adverse selection: value a trade at the price some time later (60 seconds in the backtest) and see how much the other side lost.
- Model hash
- The keccak256 fingerprint of the model’s weights file, stored in the model contract. If the file changes by one bit, the hash changes. See Verify everything.
- Neural network
- A function made of layers of weighted sums with a simple bend between them. Myelin’s has three layers and 289 numbers, and uses whole numbers only.
- Observation
- A swap that changes Myelin’s memory: the pool’s tick is at least 3 ticks from the tick of the last observation, and the block is later than that observation’s. Any other swap leaves the memory as it was. A swap of one wei, a flicker between two ticks and a burst inside one second are not observations.
- Oracle
- A contract that records a price over time. Myelin’s model reads no oracle. The Treasury’s price oracle is a hook of the buyback pools that records each pool’s price before the first swap of every second.
- Permit2
- A contract from Uniswap that lets you approve a token once and then authorise each trade with a signature that expires. A wallet asks you to sign it the first time you swap a token.
- Pool manager
- The single contract that holds every Uniswap v4 pool and its tokens. Hooks, routers and position managers all talk to it.
- Position manager
- The contract that mints liquidity positions as NFTs and adds or removes liquidity for you.
- Price impact
- How far your own trade moves the price. A bigger trade in a smaller pool moves it more. It is separate from the fee.
- Shadow
- Myelin’s model and policy replayed over real swaps of pools that do not use it: for each swap, the fee it would have charged next to the fee that was paid. Read only. See Shadow mainnet.
- Slippage
- The difference between the price you expected and the price you got. A slippage tolerance is the most you accept before the swap is cancelled.
- Static fee
- A fee that never changes. The common kind of pool.
- Tick
- A step of the price in a Uniswap pool: each tick is a 0.01% change, since price = 1.0001tick. “The pool moved 7 ticks” means it moved by about 0.07%. Positions are placed between ticks.
- Tick spacing
- How far apart the ticks you may use for a position are. A pool with a spacing of 60 lets positions start and end only on multiples of 60 ticks.
- Time-weighted average price (TWAP)
- The average of a pool’s price over a window of time, weighted by how long each price lasted. The Treasury never pays more than about 3% above the buyback pool’s average price of the last 30 minutes; that average cannot be moved inside one transaction.
- Transient storage
- Memory that lasts for one transaction and is then cleared. Uniswap v4 uses it for accounting, and Myelin uses it to hand the quote from before the swap to after it.
- Treasury
- The contract that receives Myelin’s share of every fee. It has no owner. Anyone can make it buy the project token and burn it, within set limits. See Treasury, buyback and burn.
- Universal Router
- Uniswap’s router: one contract that carries out swaps (and other steps) described in a list of commands. The swap panel uses it.
- Verified contract
- A contract whose source code has been published on the block explorer and compiled to exactly the code on the chain, so that anyone can read what it does.
- Volatility
- How much, and how fast, a price moves. Myelin’s model predicts a measure of it for the next minute.