Security

How a ticket becomes a winner

Escrow, not custody

The NFT is transferred into BeerRaffle on list. It cannot leave until a winner is drawn, or the creator reclaims after the timer with zero tickets sold.

1% / 99% on every buy

Fee BPS is immutable at 100 / 10,000. ETH and $BEER split in the same transaction as the ticket. The house cannot skim extra.

No last-buyer grind

Buying stops at endTime (or sell-out). Anyone seals. A 90-second delay then anyone draws. The sealer cannot atomically pick the reveal.

Uniform shuffle

Winner ticket = (seed % ticketsSold) + 1. Same distribution as Fisher–Yates then pick one. Full on-chain shuffle of 50k tickets is not gas-viable and would not change the winner.

Entropy mix. Every paid buy accumulates keccak(entropy, buyer, count, paid, prevrandao, timestamp, gasprice). Seal mixes prevrandao / timestamp / block. Draw mixes that with the seal blockhash (or latest if expired), draw-time prevrandao, raffle id, ticketsSold, and the contract address.

What the fee wallet cannot do. It can pause new sales and mark Featured. It cannot pick a winner, pull an escrowed NFT from a live or sealed raffle, change prices, or change the 1% rate. rescueERC20 cannot touch $BEER. Direct ETH transfers revert.

Cancel / reclaim. Cancel only if zero tickets. Reclaim only after the timer, still zero tickets. Once a ticket is sold, the NFT is committed to a draw.

Bots and agents. Buying tickets is allowed — that is the product. What they cannot do is rewrite the draw, steal escrow, or change the split. There is no admin “choose winner” function for an agent to prompt.

Chain lock. Constructor requires Robinhood Chain 4663 or testnet 46630. $BEER and the fee wallet are immutable.

Robinhood Chain is Arbitrum Orbit. There is no Chainlink VRF on this network today. Buyer-paid entropy + 90s seal delay + prevrandao + seal blockhash is the strongest trust-minimized draw available here. A sequencer that can grind prevrandao is a chain-level risk, not an admin backdoor. This is not a substitute for a paid audit. No contract is unbreakable.

Back to the floor