MacroGuardBNB Smart Chain Testnet · chain 97

What may the bot doright now?

DRIFT's quant engine runs off-chain. Its risk gate lives in a public contract. This page shows the contract's state as read from BNB Chain by your browser. It never signs or sends a transaction.

This page reads the contract from your browser, and JavaScript is off, so no live state is shown. The verified receipts below are static evidence; the contract itself is public on BscScan ↗.

Right now

Reading the contract…

Market regime stored on-chain
Who changes the regime?
Only the agent key, via setRegime, from the engine's macro classifier.
What triggers a halt?
A recorded decision with drawdown at or past the threshold. The contract flips it itself.
The contract
reading
Contract
0x8b09ebB8…c42aa83D
Agent · the only key that can write
0x2B07AfB5…C6714b81
Halt threshold
20%
2,000 bps
Decisions logged
…
on chain
Why each trade is allowed or blocked
contract call allowed(signal)
Ask the contract · a simulation
eth_call · nothing signed, nothing written

What would MacroGuard decide if the bot reported this?

Pick a signal and the drawdown the bot would report. Your browser sends one eth_call of recordDecision to the live contract, as if from the agent address. It is a simulation: nothing is signed or written, no transaction is created and no gas is spent. The answer comes from the contract on BSC Testnet, not from this page.

Signal the bot wants
−5.0% (−500 bps)
No question asked yet. The contract's answer appears here, with the block it was read at.
Public receipts
smoke test 2026-09-30 · every row opens BscScan
  1. 01Deploy
    constructor(maxDrawdownBps = 2000)
    Neutral · not halted · 0 decisions
    status 1#133,995,398 · 0x2d8cce…c044 ↗
  2. 02Risk off
    setRegime(RiskOff)
    Long blocked · Short and Flat allowed
    status 1#134,042,196 · 0x563f1e…6858 ↗
  3. 03Safe decision
    recordDecision(BNB, Short, drawdown −1%)
    Decision #1 recorded · within the 20% limit
    status 1#134,042,256 · 0x7a5185…4810 ↗
  4. 04Breach → halt
    recordDecision(BNB, Short, drawdown −25%)
    Halted event · only Flat allowed
    status 1#134,042,283 · 0x8e346d…62ef ↗
  5. 05Resume
    resume()
    Resumed event · agent-only, on the record
    status 1#134,042,318 · 0xda579e…18ae ↗
  6. 06Back to neutral
    setRegime(Neutral)
    Long allowed again · 2 decisions on chain
    status 1#134,042,328 · 0xa84665…486b ↗

Executed 2026-09-30 from the agent wallet. Static record of verified receipts — not a live feed. Plus one simulated call from a random address: reverted with NotAgent().

The 20% limit

Each decision carries its drawdown. At or past 20%, the contract flips halted = true by itself. The runner records each decision here before it orders and acts on the answer; with no confirmed answer it takes no new risk (fail-closed).

halt line · 2,000 bps
0%−20%−30%
  • −1% recorded → inside the limit, kept running
  • −25% recorded → contract halted itself
What this does not prove
  • The contract does not execute Bybit orders. Execution stays off-chain.
  • The drawdown is reported by the agent, not measured by the contract.
  • The agent can call resume() — a halt is a recorded pause, not a lock.
  • No live bot tick or profit is claimed. Backtests are research only.