What you need
- A Linux server with systemd, and root access.
- Node.js 22 or later, installed outside
/homeand/root, for example from NodeSource or the distribution’s packages. The service runs as an unprivileged user that cannot read either. - cloudflared 2025.4.0 or later.
- A Cloudflare Tunnel with a public hostname, for example
lp.example.com, pointing tohttp://127.0.0.1:18760. Keep its token at hand. - An Elysium mainnet RPC URL.
- At least 35 USDC on HyperCore with the default settings. About 11 USDC of it buys HYPE for gas on Elysium, and the rest is split between HyperCore and Elysium.
Set up
sudo npm install -g @biloa/lp
sudo biloa-lp setup
Setup asks for three things:
- The LP wallet. It creates a new one, or imports a key that nothing else uses. The key stays on the server in
/etc/biloa-lp, readable by root only. - The RPC URL and the settings below, apart from the Elysium share, which comes at the funding step.
- The public URL and the tunnel token.
Then it stops and shows the wallet address. Send USDC to that address on Hyperliquid and run sudo biloa-lp setup again. Setup picks up where it left off:
- It puts the HyperCore account in standard mode.
- It installs two services,
biloa-lpandbiloa-lp-tunnel, which start at boot and restart on failure. - It checks that the public URL reaches the agent, before any money moves.
- It buys HYPE for gas and moves your share of the USDC to Elysium.
- It asks for a quote through the public URL, then lists the LP in BiloaRegistry.
Setup asks you to type yes before every step that moves funds and before the listing. It is safe to run again at any point.
Settings
| Setting | Default | What it does |
|---|---|---|
| Spread | 20 bps | The LP’s margin on each swap. BiloaLock’s 3 bps fee comes out of each claim on top. |
| Smallest swap | 10 USDC | Quotes below it are refused. |
| Largest swap | 200 USDC | Quotes above it are refused. BiloaLock caps any swap at 1,000 USDC. |
| Swaps open at once | 4 | Each one has its funds set aside before the taker pays. |
| Local port | 18760 | Where the agent listens; the tunnel points here. |
| Elysium share | 50% | Part of the USDC kept on Elysium, asked at setup and at each fund; 10 to 90%. |
The spread can be 1 to 500 bps, the smallest swap is at least 10 USDC, and an LP serves 1 to 4 swaps at once.
Commands
| Command | What it does |
|---|---|
biloa-lp setup |
Wallet, settings, public URL, funding, services and listing. |
biloa-lp fund |
Moves more HyperCore USDC to Elysium. The agent pauses between swaps meanwhile. |
biloa-lp status |
Service, listing, public URL, quotes and balances. |
biloa-lp unlist |
Removes the LP from BiloaRegistry, so takers stop finding it. |
biloa-lp withdraw <address> |
After unlist: turns the LP off and sends its funds to <address> on HyperCore, Elysium and HyperEVM. Anything it lacks the gas to send is named and stays for a later run. |
biloa-lp start <config.json> |
Runs the agent in the foreground, as the service does. |
Add --name <name> to run more than one LP on one server. Each LP gets its own wallet, directory and services.
fund moves USDC from HyperCore to Elysium only. Moving USDC from Elysium back to HyperCore goes through the canonical bridge and waits about a day.
How takers rank your LP
Takers ask every listed LP for a quote and rank the answers. An LP that let a signed lock expire in the past week goes after every LP that did not. Among the rest the better price wins, and the LP’s record in BiloaLock breaks ties.
That record counts only locks the LP signed itself, claimed or left to expire, so nobody can add a failure to it with a lock the LP never agreed to. Claims only break ties, since an LP could add claims by trading with itself, and a recent expiry cannot be undone. An LP that stays online, with HYPE for gas on Elysium, claims every lock it signed.
How the agent works
The agent answers takers over HTTPS through the tunnel. For each swap a taker takes, it sets its funds aside before the taker pays, funds or claims the HyperCore escrow and the Elysium lock, and refunds on its own when a taker walks away.
Its state is written to disk before every step, so after a restart it carries on with every open swap. A swap it cannot settle on its own is marked stuck, with the reason recorded, for the operator to look at.
The log is in the journal of the service, journalctl -u biloa-lp, and the state of every swap is in /var/lib/private/biloa-lp/lp-state.json. biloa-lp status sums up both.
The service runs as a dynamic system user with a read-only system and no access to /home or /root. Its keys reach it as systemd credentials.
Stop and withdraw
sudo biloa-lp unlist
sudo biloa-lp withdraw 0xYourAddress
Unlist first, so no new taker finds the LP, and run withdraw once no swap is open. It refuses while the LP is still listed, while a funding deposit is still on its way, or while a swap still needs the agent.