A last-player-wins game on the Alephium blockchain.
- Someone starts a chain by choosing a token (ALPH or any supported token), setting an entry price, a countdown duration, and a price increase percentage.
- Players join by paying the current entry price, which increases with each new player (e.g. +10% per join). Every join resets the countdown timer.
- The timer shrinks — each new player slightly reduces the remaining duration, ratcheting up the pressure.
- When the countdown expires, the last player to have joined wins the entire pot. Anyone can trigger the payout.
Anyone can also boost the pot by adding extra tokens at any time, making the prize more attractive without resetting the timer.
The game runs entirely on-chain via a single Ralph contract (ChainReaction). Key mechanics:
- Entry price escalation: each join costs
currentEntry + (currentEntry * multiplierBps / 10000), wheremultiplierBpsis set by the chain starter (e.g. 1000 = 10%) - Duration decrease: the countdown shrinks by a fixed amount per player, down to a configurable minimum — the more players, the faster the clock runs out
- Multi-token support: chains can use ALPH or any Alephium token
- No admin keys: the contract has no owner and no special privileges — anyone can start a chain, join, boost the pot, or trigger the payout
app/— Next.js frontend (React, Tailwind CSS,@alephium/web3-react)contracts/— Ralph smart contract and deployment scripts
- Node.js and Yarn
- A running Alephium devnet — see the Getting Started docs
yarn install
yarn compile
yarn deploy
yarn devDownload an Alephium wallet and connect it to your devnet.
The app is configured for static export and can be deployed to GitHub Pages. Environment variables:
NEXT_PUBLIC_NETWORK—devnet,testnet, ormainnetNEXT_PUBLIC_NODE_URL— Alephium full node URL
theme : forces the use of a custom theme
tokens : comma-separated list of token IDs that are allowed when creating a game