Inspiration

A prediction market is usually a number next to a question. We wanted the callers to be the product. Four agents with different instincts sit on one live market, and a person backs the caller they trust. The chain is only the receipt: the stake goes in from a real wallet, and the payout comes back from escrow.

What it does

COINRAID locks the next Gemini Prediction Markets SOL contract, the five-minute Up. The question is whether Up finishes yes, which means SOL ends above that contract's strike. The Yes price on screen is the price of the contract, not the price of SOL.

Four agents call the market: Degen and Grok Analyst use Grok, Grandma uses Gemini, and Contrarian uses ChatGPT. A player can add another agent with a prompt and a provider. Each tick an agent returns yes, no, or pass. The last call is the side. A pass sits out.

People do not bet the price. They connect Phantom and stake an arena token, shown as USDC, on an agent. The token is our own devnet mint. It is not Circle USDC. The house fee is 0.

Backers of the winning side split the whole active pool by stake. A person who holds half the stake on the winning side gets half the pool. That payment is their own stake back, plus their share of the money on the other side. A wrong call loses the stake. Passes are refunded. If Gemini publishes no result within 90 seconds of expiry, the round is a push and every stake comes back.

In the demo, one wallet staked 50 on Contrarian and 50 on Degen. The pool was 100. Up finished no. Degen and Grok Analyst had called no, Contrarian had called yes, and Grandma had passed. Escrow paid 100 back to that wallet: the winning 50, plus the losing 50. The net was flat because the same person had funded both sides. Had someone else staked the yes side, that 50 would have been the winner's profit. The transfer is on Solana Explorer, devnet.

How we built it

The app is a Next.js arena on one long-lived Node process. A round cannot live in a serverless function, because the call loop has to stay awake until the contract expires.

On start, the server reads Gemini's public Prediction Markets API and locks the soonest SOL Up contract that still has room for staking plus a few calls. Each tick the agents see the title, the strike, the Yes price, the bid and ask, and the time left. Keys stay on the server. A missing key, bad JSON, or a timeout becomes a pass. Grok also writes the one-line commentary on screen.

Staking is a Phantom transfer into an escrow keypair, with a memo that names the agent. There is no on-chain program. When Gemini publishes resolutionSide, escrow sends the devnet payouts and the UI links each one to Explorer. The board updates over server-sent events.

Challenges

The Yes price and the SOL price kept getting confused, including by us. A Yes price of $0.05 means the market thinks Up is unlikely. It does not mean SOL is five cents. The strike is the line that matters.

Settlement is Gemini's published result, not our own price feed. The result usually lands a few seconds after expiry. Settling earlier has nothing to publish, so the round now waits instead of inventing a side.

The five-minute contract is longer than a demo. A short round only shortens the staking window. The calls still run until that contract expires, so the video cuts the wait and comes back at the final.

Grok Analyst sometimes timed out and passed. We kept that behavior. A pass is safer than a guess, and only the last real call counts.

The public devnet airdrop RPC returns 410, so the escrow and the spectator wallet had to be funded from the faucet. Agent memos need a little SOL too. If an agent wallet is empty, the call still shows and the memo is skipped.

What we learned

The interesting part of a market is who will say the number out loud. The agents never hold the money. People do. Solana is there so the stake and the payout are real transfers, on devnet, that a judge can open in Explorer.

Built With

Share this project:

Updates

Submission history