How battle.vote works
battle.vote is a commit-reveal prediction market on Solana. This page walks through the full flow — how to vote, how to create a market, and the rules that settle every outcome on-chain.
Voting, step by step
- Connect your wallet.
- Open a market and pick the answer you think will win.
- Choose your amount and commit — your vote is encrypted in your browser before it ever reaches the chain.
- Wait for the deadline. Voting earlier costs less and earns more effective stake.
- After the deadline, every vote is revealed automatically and the winner is settled on-chain.
- If your answer won, your payout is sent to your wallet automatically — no action needed.
Creating a market
- Connect your wallet and open the create page.
- Write your question and add two to ten possible answers.
- Set the deadline — the moment voting closes and the reveal begins.
- Confirm and sign the creation transaction. Your market goes live immediately.
- You earn 0.7% of every vote placed on your market as a creator fee.
Commit-reveal voting
battle.vote is a commit-reveal prediction market. While a market is open, you vote by encrypting your answer in your browser before sending it on-chain. Anyone watching the chain only sees encrypted ciphertexts — not the answers. After the deadline, the backend publishes the decryption key on-chain and all votes are revealed simultaneously.
Each market has a unique X25519 key pair. The public key is set at creation. The private key is held by the backend until the deadline, then published on-chain for public verification.
How a market flows
After the deadline
Once the deadline passes, the backend publishes the private key on-chain and decrypts all votes automatically. The winning answer is the one with the highest total effective stake. Ties are broken by lowest answer index.
No refunds
Once you commit, your SOL is locked in the vault until the market settles. There are no refunds, no cancel, and no change of vote.
You can sell your position before the deadline, but a time-based penalty applies. The penalty grows as the deadline approaches. After roughly 75–80% of the market's duration, the penalty equals 100% and the position is burned.
Cost curve
Voting earlier is cheaper and yields more effective stake. The cost multiplier rises as the deadline approaches — asymptotically, it can reach 25× or more in the final percent of the market's life.
| Time elapsed | Multiplier | Effective stake (per 0.99 SOL net) |
|---|---|---|
| 0% (market opens) | 1.00× | 0.99 SOL |
| 50% elapsed | 1.25× | 0.79 SOL |
| 75% elapsed | 1.75× | 0.57 SOL |
| 90% elapsed | 3.25× | 0.30 SOL |
| 99% elapsed | 25.75× | 0.04 SOL |
Formula: cost = 10 000 + 2 500 × elapsed / remaining (bps). Effective stake = sol_in × 10 000 / cost.
Worked example
- Alice votes 1 SOL at t = 0%: fees 0.01 SOL → sol_in 0.99 SOL → effective stake 0.99 SOL
- Bob votes 1 SOL at t = 75%: fees 0.01 SOL → sol_in 0.99 SOL → effective stake 0.57 SOL
If both backed the winning answer and the pot is 1.98 SOL: Alice gets ~1.26 SOL, Bob gets ~0.72 SOL — Alice earns more for voting earlier.
Alice's payout: 1.98 × (0.99 / 1.56) ≈ 1.26 SOL Bob's payout: 1.98 × (0.57 / 1.56) ≈ 0.72 SOL where 1.98 = total pot, 1.56 = total winning effective stake (Alice 0.99 + Bob 0.57)
Payout
Your payout = (your effective stake / total winning effective stake) × total pot
Fees: 1% per commit, deducted before your SOL enters the vault (0.3% platform + 0.7% creator). They are not part of the pot. A minimum of 0.01 SOL per vote applies — this covers the gas for your automatic payout.
Emergency refund
If a market fails to settle within 7 days of its deadline, every voter can claim an emergency refund of their committed SOL. Fees paid at commit time are not refunded.
Independent verification
After settlement, the encryption private key is published on-chain in the RevealPda account. Anyone can verify that the backend decrypted votes honestly: SHA-256(enc_privkey) must match the commitment stored at market creation.