The rules

Slay the Bear is one NEAR contract. It holds the $SLAY token (NEP-141), the items (NEP-245) and the rules below. Its config was fixed when it was deployed, and its account has no keys, so nobody can change any of this. The same rules run in TypeScript in this site, the simulator and the verifier; a shared set of test vectors checks that both implementations agree to the last base unit.

A raid

  1. The first hit wakes the Bear and opens a raid. The open fixes the Bear's health, its mood and the drand round that will decide the raid.
  2. Players burn $SLAY to hit. Damage = $SLAY burned × weapon × early bonus (1.5× at the open, falling to 1× at the deadline).
  3. At the deadline the raid closes. Anyone settles it with the deciding drand beacon and earns a 5 $SLAY tip. The contract checks the beacon's BLS signature itself.
  4. The beacon draws the Bear's tactic: its mood has a 55% chance, each other tactic 15%. Then: if the town's damage (adjusted by the tactic) reaches the Bear's health, the town wins.
  5. On a win, raiders split the Bear's hoard plus a treasury reward by damage, and the beacon picks 3 item drops weighted by damage. On a loss, the Bear steals from the treasury into its hoard, which makes the next raid's jackpot bigger.

The Bear's tactics

  • None: No trick this round.
  • Armor: The Bear has 20% more health this round.
  • Rage: If the Bear wins, it steals 50% more.
  • Feint: Late hits count half, for the kill and for the loot.

The mood is set at the open from the last raid: Armor at the first raid; Feint if 35% or more of the last raid's damage came late; Rage after a Bear win; Armor after a narrow town win (under 125% of its health); Rage after an easy one. The tactic itself is drawn from the beacon after the deadline, so nobody, the deployer included, knows it while hits are allowed.

Items

  • Club charge ×1.25 damage: 10 charges from 2 wood + 10 $SLAY (burned)
  • Sword charge ×1.5 damage: 10 charges from 2 wood + 3 iron + 50 $SLAY (burned)
  • Bear-slayer charge ×2 damage: 10 charges from 5 iron + 1 Bear trophy + 200 $SLAY (burned)

Each drop is 3 wood (60%), 2 iron (35%) or a unique Bear trophy (5%). The smith sells club charges at a price that rises as its stock falls (and 20% more right after a Bear win), buys wood and iron, and forges clubs from its wood at each raid's open when its stock is below half. Players trade any item on the market; 2% of each sale is burned.

Villagers

Four NPC villagers keep a quiet town alive. They are ordinary player accounts run by a script in packages/agents: they claim a pouch like anyone and can only make the moves any player can. Each follows one rule:

  • brave: Hits early, when the reward is at least worth the Bear's health.
  • follower: Joins once a third of the Bear's health is gone.
  • sniper: Waits for the last tenth of the round, then finishes the Bear if it can.
  • saver: Hits only when the reward is at least 1.4 times the Bear's health.

Numbers (the live game: the quick preset)

Round length
5 minutes
Total supply
1,000,000,000 $SLAY
Bear base health
starts at 500 $SLAY; 10% more after each town win, 15% less after each Bear win; at most 25% of the player supply
Hoard and health
50% of the Bear's hoard adds to its health; all of it goes to the raiders
Health cap
at most 25% of the player supply and the best raid of the last 6 rounds
Win reward from the treasury
150% of base health, at most 0.5% of the treasury
Bear's theft on a loss
50% of base health, at most 1% of the treasury
Early-hit bonus
1.5x at the start of a round, 1x at the deadline
Late hits
the last 10% of a round
Hit size
1 $SLAY to 1,000 $SLAY
Starter pouch
1,000 $SLAY, at most 200 per day
Drops per won round
3
Bear tactic
drawn from the drand beacon at settlement: 55% its mood, 15% each other tactic
Smith
forges clubs at each round open when its stock is below 100 charges and it has wood
Market fee (burned)
2%
Randomness
drand round 2 rounds after the deadline, verified on-chain

The contract returns the same values from get_config; npm run verify:live checks that they are this preset. Formulas: packages/rules/src/math.ts and contracts/game/src/rules.rs in the source.