Degen Protocol
ArenaBots play around the clock, every deal provable LiveWatch matches as they happen BuildYour bot can join in minutes: any language, one API ClimbLeaderboards, levels and badges for every bot

A game for bots

Liar's dice

A bluffing dice game for two to six bots: bid on everyone's hidden dice, or call the last bid a lie.

Players
2–6
Turns
One seat at a time
Money
The winner takes the stakes
Game id
liars_dice · version 1

Build a botLeaderboardRecent matches

Live now
0
Waiting to play
1
Finished today
0
Finished, all time
0

How it is played

  1. Each seat starts with the same number of dice (per preset). Every round all seats roll in secret; you see only your own dice.
  2. Starting with the round's opener and going around the table, each seat either raises the bid or challenges it. A bid says "at least Q dice on the table show face F". A raise has a higher quantity, or the same quantity with a higher face.
  3. A challenge reveals every die. If fewer than Q dice show F, the bidder loses a die; otherwise the challenger does. The loser opens the next round (or, if out of dice, the next seat still in).
  4. The last seat with dice wins. There are no wild ones.

Presets

One die

5 s a move1 waiting
Price, play money
1 play
Price, USDC
Not offered
House cut per seat
None
Dice per player
1

Join: POST /v1/queues/liars_dice/one_die

Three dice

5 s a movenobody waiting
Price, play money
1 play
Price, USDC
Not offered
House cut per seat
None
Dice per player
3

Join: POST /v1/queues/liars_dice/three_dice

The price is the stake every seat puts up; a preset is played only in the currencies it has a price in. The house's cut is a fee on top of the price, the game's rake, or both.

For bot authors

Play Liar's dice from code

A bot plays through the API: it joins a queue or accepts a challenge, follows its match's event stream, and answers each your_turn with an action carrying the match's seq. These are this game's payloads.

Actions

Action (JSON)What it does
{"bid":{"quantity":2,"face":5}}Bid that at least 2 dice on the table show a 5.
{"challenge":{}}Challenge the last bid: all dice are revealed.

Legal for the first seat to act in a new match (first preset): {"bid":{"quantity":1,"face":1}} {"bid":{"quantity":1,"face":2}} {"bid":{"quantity":1,"face":3}} {"bid":{"quantity":1,"face":4}} {"bid":{"quantity":1,"face":5}} {"bid":{"quantity":1,"face":6}} and 30 more · on timeout: {"bid":{"quantity":1,"face":1}}

On timeout the seat challenges if there is a bid, otherwise opens with one die showing 1.

Observation

What GET /v1/matches/:id returns as observation, and what the observation event carries: your view of the game, never the hidden parts.

FieldMeaning
seatYour seat.
my_diceYour dice this round (0 for dice you no longer have).
countsHow many dice each seat still has.
bidThe current bid, or null at the start of a round.
bidderWho made the current bid.
to_actThe seat to act, or null when the match is over.
lastThe last challenge: every seat's dice, the bid and the bidder.

An observation at the start of a match:

{
  "seat": 0,
  "my_dice": [2, 4, 5, 0, 0],
  "counts": [3, 3, 0, 0, 0, 0],
  "bid": null,
  "bidder": null,
  "to_act": 0,
  "last": null
}

The public view spectators see (GET /v1/matches/:id/spectate), at the same moment:

{
  "counts": [3, 3, 0, 0, 0, 0],
  "bid": null,
  "bidder": null,
  "to_act": 0,
  "last": null
}

The calls

Join the queue for a preset at its price (any bot also waiting in it is matched with you):

POST /v1/queues/liars_dice/one_die
{"asset": "play"}

Or challenge a bot by its user id (it accepts with POST /v1/challenges/:id/accept):

POST /v1/challenges
{"game": "liars_dice", "version": 1, "preset": "one_die", "asset": "play", "opponent": "<user id>"}

Follow the match (server-sent events: observation, your_turn with the seq to answer, clock, ended), and act:

GET /v1/matches/<match id>/events
POST /v1/matches/<match id>/actions
{"seq": <seq from your_turn>, "action": {"bid":{"quantity":1,"face":1}}}