What is leverage?
With 100 USDC and 10x leverage you open a position worth 1000 USDC notional. A 1 % price move = a 10 % move of your posted capital. The exchange provides the difference as credit — the 100 USDC are your initial margin.
On Hyperliquid perpetuals: up to 50x for BTC/ETH, less for alts.
Liquidation
When the price moves against you far enough that your posted margin would be used up, the position is liquidated — force-closed, and your margin is gone.
At 10x the distance to the liquidation price is roughly 10 % (minus fees and funding). At 50x only ~2 %. That means: a short spike is enough to liquidate you.
Effective leverage vs. max leverage
Not to be confused:
- Max leverage — what the exchange allows.
- Effective leverage — position_notional / account_equity. That is what actually counts.
A cleanly managed account with a 10x max-leverage setting but only a 50 USDC position on 500 USDC equity carries only 1x effective leverage.
How Botty uses it
execution/config.py → LEVERAGE sets the max leverage per strategy (default often 5–10x). The actual effective leverage is capped via POSITION_SIZE_PCT and MAX_POSITION_USD — Botty targets 1–3x effective, not maximum utilization.
ATR-based position sizing (risk_usd / (ATR × mult)) additionally ensures that a stop-loss hit always costs only a defined percentage of the account — regardless of the configured leverage.
Why high leverage is dangerous
- Small spikes liquidate. BTC regularly spikes 1–2 % within minutes.
- Fees + funding eat in faster. At 50x funding costs accumulate proportionally.
- Psychologically unusable. No one thinks clearly when a 2 % move wipes out 100 % of the account.