Docs/Safety
Going live
How Carry goes from tested to trading real money, in what order, and who does each step. For whoever operates it.
Where it stands
Everything needed to run a desk on Hyperliquid's mainnet is built: the keeper, the signing, the desk's steps and the checks around them. All of it has been tested against a stand-in exchange, and the signing has been proven on Hyperliquid's testnet. What has not happened is a real order on a real account. This page is the order of work for that.
The first real desk should be small and yours. Use money you can afford to lose, at 0.67x, and watch it for a few days before anyone else's account is involved. The software has never met a real account.
The switches
The keeper is part of the site's server and is off unless it is told otherwise.
| Setting | What it does |
|---|---|
KEEPER_SECRET | Turns the keeper and the desk steps on, in dry run. It seals the trade-only keys on disk. Lose it and the keys are gone, which only means desks need approving again. |
KEEPER_LIVE=yes | Lets the keeper place real orders. Without it the keeper reads and decides and signs nothing. |
KEEPER_NET | mainnet by default. testnet, or the address of the stand-in, for trying things out. |
KEEPER_BUILDER | The address Carry's fee is paid to. Unset, nothing is charged and no fee approval is asked for. |
KEEPER_EVERY | Seconds between passes. 60 by default. |
Even when the keeper is live, a desk does nothing until its owner approves the key and signs "start" from their own wallet. A file named STOP in the keeper's data folder halts every desk before anything is signed.
The order of work
- Read your own account.
node keeper/run.mjs look 0xYourAccount 0.67signs nothing. It prints the account's mode, what it holds, what Hyperliquid says it is worth, and what Carry would do. If it says the account is in standard mode, switch the account to Unified account on Hyperliquid first. - Run the site with the keeper in dry run. Start the server with
KEEPER_SECRETset and nothing else. Open the desk, connect your wallet, approve the key and start. The keeper block will show what it "would have" done on each pass. Check that the orders it describes are the ones you expect. - Go live with a small amount. Restart the server with
KEEPER_LIVE=yesas well. On its next pass the keeper places the two opening orders. Check on Hyperliquid itself that you hold HYPE, are short the same amount, and that nothing else changed. - Watch it. Let it take a few hourly payments. Compare the desk's numbers with Hyperliquid's own. Try pause and resume. Then close, and check the account ends in USDC with both sides gone.
- Only then set a fee address, write the terms, host it, and let anyone else in.
What the first real run will settle
- That a trade-only key can place both orders on a real account, spot and perp, in one request.
- That Hyperliquid's own figure for the account's value is the right one to size from in each account mode. The keeper uses that figure and also records the plain sum of balances beside it in its journal, so any difference shows up at once.
- That Unified account mode backs the short with the USDC left over, which is what the 0.67x setting relies on.
- That portfolio margin borrows on its own when a buy needs more USDC than the account has, which is what 1.5x and 2x rely on.
- That the fee can be collected as a builder fee, once a fee address is set.
If any of these is not as expected, the keeper is built to stop that desk and write down why, not to carry on.
If something goes wrong
- Stop the keeper: create the
STOPfile, or stop the server. Open positions stay open and keep collecting. They stop being resized. - Take the key away: remove Carry's key on Hyperliquid's API page. The keeper can then do nothing on that account.
- Close by hand: on Hyperliquid, buy back the short and sell the HYPE. They are ordinary positions.
- Read the journal:
keeper/data/journal.jsonlhas every decision, every order and every fill, one per line.
carry
Open your desk