Mechanics
The field is 25 plots. Time is cut into fixed-length rounds on a deterministic schedule — round n runs from genesis + n × roundDuration to the start of round n+1. Rounds are never “started”; they simply exist, which is why you can stake into future ones and why a late settlement can never drift the clock.
You deploy a rig by staking the native token on one or more plots. You can cover several plots at once and repeat the same position across consecutive rounds in a single transaction.
When a round closes, one plot gushes. Everyone who drilled it splits the pot pro-rata to their stake on that plot. If nobody drilled the winning plot, the pot is a dry hole and rolls forward into the next round as carry-over — which is how jackpots build.
Win or lose, every rig mines $GSH, split across the round's drillers in proportion to what they staked. Emissions halve on a fixed interval and the token is hard-capped.
Fees
- Refinery fee — a cut of each pot goes to the staking contract and is paid out to $GSH stakers in the native token.
- Keeper fee — a smaller cut pays whoever calls
resolveRound(). Settlement is permissionless, so this is what makes rounds close on time without a privileged operator. - Governance can change both, but the contract caps their sum at 15%. Winners always keep at least 85% of the pot.
The refinery
Stake $GSH to earn the refinery fee. Unstaking burns a share of the withdrawal. That is the protocol's only supply sink: the token is capped and burned supply can only ever be re-minted through emissions, never conjured. The burn prices short-term farming and rewards drillers who stay.
Randomness
The winning plot comes from a pluggable randomness source behind IGushRandomness. Production deployments use Chainlink VRF v2.5. A blockhash-commit adapter ships for testnets and chains without a VRF deployment — it commits to a block that does not exist yet, which is honest but weaker: the party that produces that block sees the draw first and can drop the block to reroll. Do not run it on mainnet with a pot worth more than a block.
The source is swappable after deployment, so a chain can launch on the fallback and migrate to VRF without redeploying the field.
Safety
- Value only ever leaves the contract by pull payment — claiming, flushing fees, collecting keeper rewards. A reverting recipient can never wedge a settlement.
- Everything owed to users is tracked in
totalLiabilities. Governance's sweep function can only touch a balance above that line, so a forced send is recoverable and user funds are not. - Pausing stops new rigs only. Settlement and claiming stay open so in-flight rounds always finish.
- A settlement whose randomness never arrives can be retried by anyone after a timeout, and the abandoned request is ignored if it lands late.
Risk
This is a game of chance played with real value. Most rounds you will not hit the gusher — the $GSH you mine is the consolation, not a hedge. The contracts in this repository have not been audited. Read them before you drill.