[Docs]Gimbal, in full
Every rule, written down.
What the officer reads, how it decides, how each call is sealed, and how to ask it from your own code or agent.
[01]How it works
Read, decide, seal, then act.
Once a minute the officer reads every account it watches from Hyperliquid’s public API, measures each open position with the formulas below, and makes one call per position: hold, add margin or reduce. A model writes the reason in one or two plain sentences; the text is checked and replaced by a fixed template if it adds a number, a currency or runs long. Every call of the minute becomes a leaf, the leaves become one Merkle root, and the root is written to Elysium. Orders are sent only after that transaction is confirmed. If sealing fails, nothing is sent that minute.
| Label | Accounts | What happens |
|---|---|---|
| Live · On duty | Accounts whose owner approved the officer’s agent, including the team account. | Calls sealed every minute, then executed within the owner’s signed limits. |
| Live · Book | Hyperliquid’s largest open positions, picked daily from the public leaderboard. | Read, called and sealed every minute. |
| Live · Watch | Any wallet pasted on the site, through the API or MCP. | One reading, sealed in the next root. |
| Executed | An order the officer sent for an account on duty. | Its report is sealed the following minute, next to the call it carried out. |
Orders are sent only for accounts that approved the officer’s agent. Every other call is a sealed decision, on the record, for anyone to check.
[02]The math
Six steps per position.
Pure functions with tests, the same numbers served at /api/math. All outputs are ratios.
Log returns of the last 360 one-minute closes (six hours).
EWMA variance, λ = 0.94, seeded with the sample variance of the first 30 returns. Recent moves weigh more.
Volatility over a one-hour horizon.
Maintenance margin rate from the market’s maximum leverage.
Volatility target: three ordinary hours against the position still leave room. Capped at min(10, maxLev).
f is the hourly funding rate. This side pays when long with f > 0 or short with f < 0; otherwise drag24 = 0.
Effective leverage: notional over margin used (isolated) or over account value (cross). Distance to liquidation in the unit of the move.
Above target: add margin (isolated) or reduce by 1 − L*/L with a reduce-only order (cross). Too close: the same, toward 0.8·L*. Below 0.7·L*: reported as room to spare; raising is off by default. Estimated distance after: d′ ≈ d·L/L′.
[03]The habits
Six habits, one grade.
For any wallet with at least 20 fills in 30 days. Each habit scores 0 to 100, higher is better. The grade is the weighted mean: S from 90, A from 80, B from 65, C from 50, else D. The coach names the worst habit and one concrete fix in one sentence.
| Habit | Measured as | Worse when |
|---|---|---|
| Chasing | Share of opening fills placed after a move larger than 2·σh in the same direction during the previous 30 minutes. | Higher share |
| Tilt | Share of opens on the same coin within 15 minutes of a losing close. | Higher share |
| Size up after a loss | Share of those re-entries larger than 1.5 times the previous size. | Higher share |
| Holding losers | Median hold of losing round trips over median hold of winners. | Above 1 |
| Funding bleed | Funding paid over 30 days, annualised, as a share of average notional. | Higher rate |
| Liquidation proximity | Smallest distance to liquidation now over 3·σh, across open positions. | Below 1 |
The steadiest hands board applies the same grade to Hyperliquid’s leaderboard accounts with at least 100 fills in 30 days and three habits scored, and publishes only the top of it. The liquidation radar reads the same accounts every few minutes and ranks each open position by d / σh, its distance to liquidation in hourly sigmas.
[04]Sealing and proofs
One root a minute, checkable by anyone.
A leaf is the SHA-256 of a canonical JSON payload: keys sorted, no spaces. It carries the minute, the account, the coin, a hash of the raw API responses used, the call and the reason. A minute’s leaves are sorted by hash; pairs are hashed in sorted order, an odd node is promoted. The root and the leaf count go to Elysium with seal(minute, root, count). Watch readings land in the next root, usually within a minute.
- Open a minute in the journal and press Verify. Your browser rebuilds each leaf and the root.
- Or fetch a proof from /api/proof/:leaf and call verify() on the contract:
cast call 0x3e6aa6641b32d669d7859bfea6736a7db7442ca0 \ "verify(uint64,bytes32,bytes32[])(bool)" \ <minute> <leaf> "[<proof>]" \ --rpc-url https://rpc.elysium.kinetiq.xyz
[05]API
Public JSON, no key.
Base URL https://tradegimbal.xyz. CORS open. Ratios only: leverage in x, percentages, grades, counts.
| Endpoint | Returns | Notes |
|---|---|---|
GET /api/status | Latest seal, counters, contract, token | Cached about 10 s |
GET /api/watch/:address | Readings, calls, habits, leaf hash, seal | Queues a sealed reading; ?cached=1 returns the last one without a new read |
GET /api/journal | Sealed minutes with their leaves | ?before=<minute>&limit=<≤60> |
GET /api/journal/:minute | One sealed minute | Unix minute |
GET /api/proof/:leaf | Merkle proof, root, tx, verified | Checked with verify() on chain |
GET /api/radar | Leaderboard positions closest to liquidation in hourly sigmas, the largest within 5σ, the latest sealed pass | Size as a rank only; cached about 30 s |
GET /api/board | Steadiest hands: the highest habits grades, with each account’s best and weakest habit | Grades within 48 h; cached about 60 s |
GET /api/math | Formulas and constants | Same as this page |
GET /api/officer/:address | Status on duty, limits, calls, executions | Changes need the owner’s signature |
# readings, calls and habits for any wallet curl https://tradegimbal.xyz/api/watch/0xYOUR_WALLET # the latest sealed minutes curl https://tradegimbal.xyz/api/journal?limit=5 # positions closest to liquidation, in hourly sigmas curl https://tradegimbal.xyz/api/radar
[06]MCP
Add the officer to your agent.
MCP over streamable HTTP at https://tradegimbal.xyz/mcp. Add it to any MCP client with this config. Also described at /llms.txt and /.well-known/mcp.json.
{
"mcpServers": {
"gimbal": {
"url": "https://tradegimbal.xyz/mcp"
}
}
}| Tool | Does | Arguments |
|---|---|---|
watch_wallet | Reads, measures and grades a wallet; returns the leaf hash | address |
officer_call | The officer’s call on one position or all of them, with the reason | address, coin? |
liquidation_radar | Leaderboard positions closest to liquidation in hourly sigmas, the largest within 5σ and the sealed pass | limit? |
habits_board | The steadiest hands: highest habits grades among leaderboard accounts | limit? |
journal | Latest sealed minutes | limit?, before? |
verify_leaf | Proof for a leaf and the on-chain check | hash |
math | Formulas and constants | none |
[07]Contract
Immutable, no admin.
GimbalSeal on Elysium, chain 99901. Only the sealer key can write a root; minutes only move forward; no one can rewrite a minute, upgrade the contract or pause it.
- Address
- 0x3e6aa6641b32d669d7859bfea6736a7db7442ca0
- Deployed
- block 11,719,098
- RPC
- https://rpc.elysium.kinetiq.xyz
- Write
seal(uint64 minute, bytes32 root, uint32 count)- Read
getSeal(minute) · lastMinute() · sealCount() · verify(minute, leaf, proof)- Event
Sealed(minute, root, count, l2Block)
[08]Honest limits
What it does not do, said plainly.
- De-risk only. The agent can add margin to an isolated position or close part of a position with a reduce-only order. It can never open a position, raise leverage or withdraw: Hyperliquid agents cannot withdraw.
- Within your limits. At most 25 % of a position per action and 20 % of free collateral moved as margin per UTC day, by default. You sign the limits; pausing takes one signature.
- It measures, it does not forecast. Volatility is estimated from six hours of one-minute closes. A gap faster than a minute is not seen in advance, and an order can fill at a worse price in a fast market.
- A seal proves when, not whether. It shows a call existed before its action and was never changed. It does not show the call was right.
- Reasons are short by design. The model only rewords numbers it is given. Any extra number or currency sign and the fixed template is used instead.
- Execution is off chain today. Orders go through Hyperliquid’s API after the root is confirmed on Elysium. When Elysium can write to HyperCore directly, execution moves on chain.