myelin
Robinhood Chain
Docs: Verify everything

Verify everything

Myelin does not ask you to trust it. Everything it claims can be checked from public data, with tools you already have. This page lists each check, in the browser and in a terminal.

In your browser

The Verify page does two things on its own and a third on request:

  1. The model is the published oneIt reads the model’s hash from the contract, downloads the public weights file, computes its keccak256 in your browser and compares the two. They match, or the page says they do not.
  2. The contracts are what they sayThe hook’s address carries exactly the permission bits it needs, and its fee limits, policy and share are read straight from the contract.
  3. Every swap recomputesOn request: it reads the ticks and the block times of every swap of the pool, replays them through a TypeScript copy of the state machine (in which a swap enters the memory only if it moved the tick far enough, in a later second, exactly as in the hook), the model and the policy, and compares each input, model output and fee with what the hook logged. It also checks the fee the pool manager applied against the total fee minus the Treasury’s share.

In a terminal

You need Foundry’s cast. Nothing here depends on this website.

The model is pinned to the weights file

The hash stored in the model contract
cast call 0xF5400cC2836D462605b5d7877b2C26F3f134E87e "modelHash()(bytes32)" --rpc-url https://rpc.mainnet.chain.robinhood.com
The hash of the published weights file (download /weights_v2.json)
cast keccak "0x$(xxd -p weights_v2.json | tr -d '\n')"

Both print 0xdb65e9809561114b90777e78e007b7098f9db6a90fb299b564300bd73f2eedb6.

Run the model yourself

A free view call: eight inputs in, one number out
cast call 0xF5400cC2836D462605b5d7877b2C26F3f134E87e "predict(int256[8])(int256)" "[12,1212,339,86,-324,1,4,3181]" --rpc-url https://rpc.mainnet.chain.robinhood.com

Nothing is changeable

The fee limits, policy and share are immutables of the hook
for f in FEE_MIN FEE_MAX FEE_FALLBACK FEE_SLOPE SLOPE_SHIFT PRED_THRESHOLD PROTOCOL_SHARE; do echo -n "$f "; cast call 0xe98beA64f59d1Fd4C73df53B22C6439B601AB0c4 "$f()(uint256)" --rpc-url https://rpc.mainnet.chain.robinhood.com; done
The hook has no owner: this call fails because the function does not exist
cast call 0xe98beA64f59d1Fd4C73df53B22C6439B601AB0c4 "owner()(address)" --rpc-url https://rpc.mainnet.chain.robinhood.com
The permission bits of the hook’s address: 0x30c4 and nothing else
python -c "print(hex(int('0xe98beA64f59d1Fd4C73df53B22C6439B601AB0c4', 16) & 0x3fff))"

What the hook would do now

The eight inputs, the model output and the fee for a swap in the next block
cast call 0xe98beA64f59d1Fd4C73df53B22C6439B601AB0c4 "previewReflex(bytes32)(int256[8],int256,uint24)" 0x7ba739294819cb9e217dfee21164dfcae213365b9efafb4680733a408666c846 --rpc-url https://rpc.mainnet.chain.robinhood.com

The Treasury

The project token and the total burned
cast call 0xEE9B3C0F79e9240D966ad211572cd194cdc36770 "token()(address)" --rpc-url https://rpc.mainnet.chain.robinhood.com && cast call 0xEE9B3C0F79e9240D966ad211572cd194cdc36770 "totalBurned()(uint256)" --rpc-url https://rpc.mainnet.chain.robinhood.com
The Treasury’s limits are constants: the window of the average price its calls are measured against (seconds), and how far above it a call may pay (ticks)
cast call 0xEE9B3C0F79e9240D966ad211572cd194cdc36770 "TWAP_WINDOW()(uint32)" --rpc-url https://rpc.mainnet.chain.robinhood.com && cast call 0xEE9B3C0F79e9240D966ad211572cd194cdc36770 "BAND_TICKS()(int24)" --rpc-url https://rpc.mainnet.chain.robinhood.com

Read the source

The code on the chain can be checked against the source: a build with the settings in foundry.toml gives the same runtime bytecode as cast code returns for each address. The model contract is generated from the weights file and never edited by hand. The repository also contains the research code, the training pipeline and the tests; where it is public, its docs/ folder has the model card, the backtest report and a record of every address and chain fact the project relies on, with where it came from.

Run the tests

CommandWhat it proves
forge testThe contracts’ test suite: the golden vectors (the contracts equal the Python reference on 1,057 model, 390 policy and 2,111 state-machine cases, swaps that count and swaps that do not), the hook on a real pool manager, the memory (swaps that move nothing leave it untouched), the Treasury, its price limit and the attacks on it, the oracle, fuzzing and invariants (the hook never holds a token).
npm run checkIn the app folder: the TypeScript reference equals the same golden vectors, the numbers the site prints equal the deployment record and the weights file, and the Uniswap helpers equal v4-core.
forge test --match-test test_printMainnetReplayForPython -vv > replay.txtthen MYELIN_SM=v2 python research/parity_check.py replay.txt: swaps cut from the mainnet ETH/USDG pool, replayed through the hook on a local pool manager, with every input, prediction and fee compared with the Python reference.

What verification does not tell you

It proves that the contracts do what the source says, and that the model is the one that was published. It does not prove that the model’s fee is a good idea for liquidity providers: that is a question about markets, and the backtest results discuss it. And it is not an audit by someone else.