Blockchain Hedging Trading Bot Development

Job ID: 39617867

Budget: €5,000 – €10,000 EUR

Job Post (plain-language overview first)
We run an investment company that puts money into a single “liquidity pool” on Base (an Ethereum-style blockchain).
When you supply liquidity, you hold two coins (for example, ETH and USDC). As prices move, the dollar value of the basket drifts.
We want a program—call it a hedging bot—that automatically opens or closes short positions on a perpetual-futures exchange (Hyperliquid) so that our net dollar exposure (“delta”: the difference between what we own and what we hedge) stays almost zero. Think of it as a self-balancing seesaw: when the pool tilts to one side, the bot adds weight to the other side.

The position you will monitor is packaged as an LP-NFT (a token that represents a single concentrated-liquidity position, including its price range and fee earnings).
The bot must run day and night, show live metrics, and warn us if funding costs or other risks make the strategy unprofitable.
That’s the big picture—below is the in-depth shopping list the freelancer will build.

1 End-Goal in One Sentence
A production-grade hedging bot that keeps the net dollar delta of one supplied LP-NFT within ± $50 by trading perpetual futures on Hyperliquid, today on Base and easily extendable to other EVM chains tomorrow.

2 Scope of Work (what must be delivered)
# Component Functional requirements
1 Config Loader Reads a single config.yaml (or TOML/JSON—your choice); validates fields; pulls API keys/private keys from the environment or secrets vault; prints an immutable hash of the final config on start-up.
2. Adaptive Scheduler runs asynchronous tasks without breaching API limits.
• 4 s in-memory delta check loop
• 30 s funding/position update loop
• 4 s on-chain refresh loop (key metric) triggered by new blocks or timer.
3 On-Chain Reader Given the LP-NFT ID, it fetches immutable data once, then every refresh returns current token0/token1 balances, pool price, and uncollected fees. Must work on Base now and accept additional EVM chains later via config only.
4. Perp Adapter (Hyperliquid) WebSocket price feed, REST trading, order-status polling, reconnect logic, and internal accounting of API weight.
5. Delta Calculator converts LP balances into USD exposure; supports:
• Single-token hedge (e.g., ETH/USDC pool → hedge ETH only)
• Dual-token hedge (e.g., ETH/BTC pool → hedge both).
6 Hedge Planner Decides when to trade: ignores drift < $50; respects a rebalance window of 30 s–2 min; chooses limit vs. market based on order-book depth; splits oversized orders.
7. Order Executor: Places/cancels orders, verifies fills, recalculates delta on partial fills, and enforces a max-slippage percentage.
8 Risk Manager Hard Guards:
• Max leverage (configurable, default 8×)
• Funding APR > cap (e.g., 12 %)
• Impermanent-loss % > cap (e.g., 20 %)
Actions: PAUSE trading or full UNWIND (burn LP, close shorts).
9 Monitor & Alert Layer Exposes /metrics for Prometheus or equivalent, /healthz, and structured JSON logs; sends Telegram alerts on WARNING and Telegram + Slack on CRITICAL.