How OutlawFlip Works
A provably fair, instant-settle on-chain coinflip game on Robinhood Chain. Stake in USDG with preset amounts ($1, $5, $10), win 1.9ร in USDG โ no waiting, no keeper, no VRF delay.
๐ Network
| Chain | Robinhood Mainnet |
| Chain ID | 4663 (0x1237) |
| RPC | https://rpc.mainnet.chain.robinhood.com |
| Explorer | robinhoodchain.blockscout.com |
| Currency | ETH |
๐ Contract Addresses
| CoinFlipV4 | 0x0DeeBdf0342757A0B14781780C0Ed942A77232Bf |
| USDG Token | 0x843d02f3211a29c5CCFfD13A34BC4dab356D5Ee5 |
| OUTLAW Token | Not used in V4 (USDG-only) |
๐ฎ How to Play
- Connect Wallet โ Click "Connect Wallet" and approve MetaMask. The app will auto-add Robinhood Mainnet to your wallet if not already configured.
- Pick Stake โ Choose one of three preset amounts: $1, $5, or $10 USDG.
- Pick a Side โ Choose HEADS (The Hood) or TAILS (The Crown).
- Flip โ Click "Loose the Arrow". The coin flips and settles instantly in a single transaction.
- Win โ If you guessed correctly, you receive 1.9ร your stake in USDG, sent directly to your wallet in the same transaction.
โก Instant Settlement
OutlawFlip V4 uses blockhash randomness for instant settlement. The bet settles in the same transaction as the placeBet call.
placeBet(preset, choice)
All in one transaction, one block. No waiting, no keeper, no VRF delay.
๐ฐ Payout Structure
| Preset | Stake | Win Returns | Net Profit |
|---|---|---|---|
| $1 | 1 USDG | 1.90 USDG | +0.90 USDG |
| $5 | 5 USDG | 9.50 USDG | +4.50 USDG |
| $10 | 10 USDG | 19.00 USDG | +9.00 USDG |
Multiplier: 19/10 = 1.9ร
Payout token: USDG (same as stake)
Example: Bet $5 on HEADS โ Win โ Receive 9.50 USDG (net +4.50).
๐ Win Rate Control
Each preset has an independently configurable win rate settable by the contract owner (via the admin panel). The win rate is expressed in basis points (0โ10000, where 5000 = 50%).
| Parameter | Default | Range |
|---|---|---|
| $1 preset win rate | 50% | 0% โ 100% |
| $5 preset win rate | 50% | 0% โ 100% |
| $10 preset win rate | 50% | 0% โ 100% |
The win rate determines the probability that the player wins. At 50%, the game is a fair coin flip. The owner can adjust this per preset to control house edge and player experience.
๐ Randomness
The result is determined by a hash of:
keccak256( blockhash(block.number - 1), block.timestamp, msg.sender, nextBetId, tx.gasprice )
A random value 0โ9999 is derived from this hash. If the value is less than the preset's win rate (in basis points), the player wins. The result is then set to match the player's choice (win) or the opposite (lose).
๐ก Security
- ReentrancyGuard on bet function
- SafeERC20 for all token transfers
- Solvency check โ bet rejected if contract USDG balance < payout
- Ownable โ only owner can withdraw, set win rates, or pause
- Non-custodial โ payouts sent directly to player wallet
๐ Contract Functions
Player
placeBet(uint8 preset, uint8 choice) โ (uint256 betId, bool won) // preset: 0=$1, 1=$5, 2=$10 // choice: 0=HEADS, 1=TAILS
Views
availableUsdg() โ (uint256) getPreset(uint8 preset) โ (uint256 amount, uint32 winBps) quotePayout(uint8 preset) โ (uint256) paused() โ (bool) nextBetId() โ (uint256) bets(uint256 betId) โ (Bet) getRecentBets(uint256 offset, uint256 limit) โ (Bet[]) getPlayerBets(address player, uint256 limit) โ (Bet[])
Admin (owner only)
withdrawUSDG(address to, uint256 amount) setPreset(uint8 preset, uint256 amount, uint32 winBps) setWinRate(uint8 preset, uint32 winBps) setPaused(bool paused_)