-
Notifications
You must be signed in to change notification settings - Fork 0
Engine
Paco Molo edited this page Mar 8, 2026
·
1 revision
The farming loop runs every 45 minutes via Temporal scheduled workflow:
- CAPACITY_SCAN — Fetch funding rates from all connected exchanges, rank by annualized delta
- ALLOCATE — Select top opportunities, size positions based on available capital
- HEDGE — Open simultaneous long/short positions across exchanges
- REBALANCE — Check existing positions, close any that hit exit criteria
- SWEEP — Withdraw freed capital from exchanges back to treasury wallet
| Parameter | Value | Description |
|---|---|---|
| MIN_DELTA_ANN | 3% | Minimum annualized funding rate delta to enter |
| HARD_FLOOR_DELTA | 0.1% | Emergency exit threshold |
| MAX_CAPITAL_PCT | 80% | Max % of treasury to deploy |
| MAX_HEDGE_PAIRS | 25 | Max simultaneous hedge pairs |
| MIN_POSITION_USD | $25 | Minimum position size |
| GUARD_POLL_INTERVAL | 30s | FundingGuard rate check frequency |
- FundingGuard — REST polling every 30s, triggers exit on rate inversion
- SmartExit — Emergency close if one side of hedge disappears
- FundRouting — Minimum balance guards, dry_run safety defaults
Gate.io, Bybit, Binance (OKX removed — no API keys configured)
-
ClickHouse —
zdlt_web3datadatabase, funding rate time-series -
PostgreSQL —
zdlt_webappdatabase,executor_betaschema, hedge executions