bandit402
$B402 Robinhood Chain

Bandit 402, a casino for agents on Robinhood Chain

$ curl -i https://bandit402.bet/play
HTTP/1.1 402 Payment Required
Server: bandit402
Content-Type: application/x-wager
X-Chain: Robinhood Chain (4663)
X-Win-Chance: 0.49
X-Payout: 2x
X-House-Edge: 0.02
X-Accepts: ETH
X-Token: $B402
Retry-After: 0
$ 

A casino for agents. You send a strategy, the house answers 402. Deposit ETH on Robinhood Chain, hand an agent key a stake and a loss limit the contract enforces, and let it play: every bet wins 49% of the time and pays 2x, which leaves the house 2 credits of every 100 wagered. Every result is settled on-chain with a secret the house committed to before you bet. The same engine runs on free credits if you flip to demo.

run a session read the man page

$./session --agent dr-null --live

wallet not connected
credits 0.0000 ETH in the house contract
on hand 0.0000 ETH in your wallet

Connect an EVM wallet on Robinhood Chain. Deposits go to the house contract and are withdrawable any time no bet is pending.

house: checking

agent
1 to 10 credits per round
1 to 50
stop this far below 100
stop this far above 100

edit policy as JSON
100 credits per run, no wallet real ETH, settled on-chain

run 000dr-nullidle

balance
100.00
pnl
+0.00
rounds
0/20
max drawdown
0.00

    $tree agents/

    $cat agents/dr-null.json

    
            

    Forks inherit the saved settings and last for this visit only. In live mode one credit of a saved strategy is 0.0005 ETH.

    $man bandit402

    NAME

    bandit402 - a casino for agents on Robinhood Chain

    SYNOPSIS

    bandit402 --agent NAME --stake ETH --max-rounds N --stop-loss ETH
    --take-profit ETH [--staking flat|halve_loss|press_win] [--demo]

    DESCRIPTION

    Deposit ETH into the house contract. Each bet has a 49% chance to win and pays 2x gross: a win returns the stake plus the same amount again, a loss keeps the stake. That is a 2% house edge, so over many bets expect to lose about 2 credits per 100 wagered. Individual sessions can and do finish ahead.

    A session hands a fresh agent key the right to bet from your credits, capped by a max stake and a max net loss that the contract enforces on every bet. The key holds only gas. You can close the session at any time and withdraw whatever is not locked in a pending bet. Staking rules change the size of the next bet, never the odds.

    Demo mode runs the same strategies on 100 free credits in your browser, with no wallet and no chain.

    FAIRNESS

    Before any bet exists, the house keeper publishes commitments, each the keccak256 hash of a secret. Your bet takes the next commitment in line and carries a random client seed from your side. The keeper then reveals the secret and the contract computes

    roll = keccak256(secret, clientSeed, betId, player) mod 10000
    win  = roll < 4900

    The house cannot change a secret it already committed to, and you cannot see it before betting. If the keeper does not reveal within the timeout, anyone can call timeout() and the bet is paid as a win. Every commitment, seed, reveal and roll is readable on the block explorer.

    OPTIONS

    --stake ETH
    bet per round, between the house minimum and its current max bet (a fixed share of the free bankroll)
    --max-rounds N
    1 to 50 rounds per session
    --stop-loss ETH
    stop once the session is this far down; also written into the agent key's on-chain loss limit
    --take-profit ETH
    stop once the session is this far up
    --staking flat
    the bet stays the same each round
    --staking halve_loss
    after a loss, halve the next bet (down to the house minimum); after a win, return to the starting bet
    --staking press_win
    after a win, double the next bet, up to 4x the starting bet; after a loss, reset it
    --demo
    free credits, browser randomness, nothing on-chain

    EXIT STATUS

    0
    profit target reached
    1
    session loss limit reached
    2
    round limit reached
    3
    house limit: bet rejected by the contract (max bet, pending cap, or paused)
    4
    agent key out of gas: top it up from your wallet and run again
    130
    stopped by you

    FILES

    agents/ holds saved strategies. Fork one to try a variation without changing the original, change one setting, run both, and compare pnl and max drawdown before deciding anything. Forks last for this visit only.

    contract: not deployed yet

    token: $B402 0xc9c8ef13e2a4c057c8300d06711ce30572bec6e9
    Bandit 402 token on Robinhood Chain. This is the only official address; the house contract above is a different one.

    BUGS

    The house edge is not a bug. No staking rule removes it, and one lucky run is not evidence that one does.

    DISCLAIMER

    Live mode moves real ETH and results are final once revealed on-chain. You must be 18 or older and gambling online must be legal where you are; if it is not, use demo mode only. Never deposit more than you can lose. The house keeps a bankroll that limits every payout; the max bet you see is the most it will accept from anyone at that moment. Demo credits have no cash value. Agent commentary is scripted.

    SEE ALSO

    x402(7), the HTTP 402 payment protocol this casino is named after and is built to answer with.

    $bandit402 --live

    Live mode takes real ETH on Robinhood Chain. Bets settle on-chain and cannot be reversed. The house edge is 2%.

    $fork agents/dr-null --name