The Codex

Everything about Degens & Dragons — an on-chain extraction roguelike on Solana — explained step by step. If you only read one section, read The core loop.

Overview

Degens & Dragons is a grimdark, text-based extraction roguelike. You descend a dungeon called the Grind, one floor at a time, narrated by an AI Architect. Each floor you make a single choice: bank what you've gathered and climb out, or push deeper and gamble it all. Death is permanent — fall, and you drop a lootable corpse and lose everything you carried.

Only the token, $DnD, and value settlement live on-chain. Your gold, items, runs and account are server-authoritative and stored off-chain — the same hybrid model the Solana retro-game meta runs on. That keeps play fast and cheat-resistant while keeping the money trustless.

One rule, carved into the gate: greed is the only timer. Nothing forces you out of the dungeon but your own nerve.

Getting started & the gate

  1. Install Phantom and switch it to devnet.
  2. Acquire at least 1,000 $DnD. This is the hold-gate — it unlocks all play, free runs included, and ties every player to the token.
  3. Open the dungeon, connect your wallet, and you're in.

The 1,000-token hold is never spent — it just has to be in your wallet. Paid Cursed delves charge an additional on-chain entry (see The Hoard & entry).

The core loop

  1. Choose a delve. The free Shallows (capped) or a paid Cursed delve (the full deep + the Hoard).
  2. Pick a class and a loadout — carry items in from your stash (you lose them if you die).
  3. Resolve each floor. A fresh encounter, decided by d20 checks.
  4. Decide: descend (riskier, richer) or extract at a waygate (bank everything).
  5. Spend & trade back on the surface, then dive again.

Classes

Six classes, each a crypto archetype mapped onto a D&D role with its own signature ability:

ClassRoleAbilityPlays like
The DegenBarbarianReckless SwingHuge damage, drops its guard. Hits harder when bloodied. Never flees.
The JeetRogueBackstabFast, fragile, escapes fights easily. First to flee, first to profit.
The DevWizardForkboltRanged arcane burst. Glass cannon — dies to a stiff breeze.
The MaxiPaladinConvictionTanky self-heal that grows over a fight. Diamond hands, literally.
The BagholderWarlockLeverage PactMassive damage at the cost of recoil. Pay later.
The ShillerBardShillTalks enemies down (-attack). Charisma carries.

Stats are rolled (4d6-drop-lowest) with a bonus to the class's priority abilities. HP scales with Constitution.

Zones & floors

FloorsZoneNotes
1–3The Mempool ShallowsFree runs are sealed here. Common/uncommon loot only.
4–7The Liquidity CavernsPaid only. Rarer loot, harder rolls.
8–12The Rug CatacombsThe Hoard opens at floor 8. Artefacts can drop.
13+The Abyssal LedgerThe richest payouts and the lowest survival.

Every 5th floor is a boss. Bosses are tankier, hit harder, and always drop loot.

Encounters & skill checks

Each floor is one of seven encounter types — combat, puzzle, shrine, NPC, lore, trap, and boss — with branching choices. The same type never appears back-to-back, and scenes/variants don't repeat within a run, so a delve always reads fresh.

Choices resolve as d20 skill checks: d20 + ability modifier vs a difficulty class (DC). A natural 20 always succeeds; a natural 1 always fails. The deeper you are, the higher the DCs — and a flat depth penalty weighs on every roll.

Combat

  • Attack — d20 + STR/DEX + weapon vs the enemy's AC; damage by your weapon die.
  • Ability — your class signature (see above).
  • Use item — drink a potion, read a scroll, or equip a weapon mid-fight.
  • Flee — a DEX check to escape (the Jeet is great at it; the Degen can't).

Between floors you catch your breath for a small heal — but that recovery shrinks the deeper you go.

Risk & difficulty

Nothing in the Grind is free of risk. Difficulty scales with depth in several ways:

  • Descent hazards — every step down can spring a ward, a rotten stair, or an ambush. A reflex save halves the damage.
  • Tougher enemies — more HP, higher AC, and a flat damage bonus that grows with depth.
  • Enemy modifiers (elites) — deep enemies roll affixes like Vicious (+dmg), Armored (+AC), Frenzied (+to-hit) and Rending (bigger dice). Past floor 10 they can stack two.
  • Harsher traps & checks — trap damage and DCs climb with depth, and a depth penalty applies to every skill check.
  • Less healing — between-floor recovery drops from 14% to 8% of max HP in the deep.
The free Shallows are capped at floor 3 on purpose: you can't farm your way to deep loot or the Hoard without paying — and risking — a Cursed delve.

Items: what they do

Every item shows a plain description in your inventory, the shop, and your character sheet. Item types:

ItemTypeRarityValueWhat it does
Lesser Healing DraughtPotioncommon40gRestore 2d4+2 HP.
Greater Healing DraughtPotionrare150gRestore 4d4+4 HP.
Stoneskin TonicPotionuncommon90g+3 AC for the rest of a fight.
Rage PhiltrePotionuncommon90g+4 damage per hit for the fight.
Rusted ShivWeaponcommon60gEquip: +1 hit, d8 damage.
Ashwood BladeWeaponuncommon170gEquip: +2 hit, d10 damage.
Liquidator's CleaverWeaponrare400gEquip: +3 hit, d12 damage.
Scroll of BlinkScrolluncommon110gEscape a fight instantly, haul intact.
Scroll of SmiteScrollrare230g4d8 radiant damage to a foe.
Scroll of MendingScrollrare250gFully restore your HP.

Beyond usable gear, the dungeon drops relics and cosmetics(pure collectibles — sell them or list them) and, rarely, artefacts (below). Carried items are lost on death and banked on extraction.

Supply & seasons

Where do the shop's items come from? Are they infinite?

Yes. The quartermaster's basics — the potions, scrolls and starter weapons listed above — have infinite supply. They're crafted on demand and bought with gold (the soft currency), so there's always a baseline of consumables to buy and a reliable place to sell loot. That keeps the economy liquid and prevents the kind of gear drought that stalls a roguelike. Because they cost gold, not $DnD, they don't inflate the token.

What has limited supply?

Artefacts are the only hard-capped items, and the caps are enforced on-chain — once an artefact is minted out, it can never be created again.

ArtefactTotal supply (ever)
First Thread of the Rug10
Skull of Goxxen25
Crown of the Exit Liquidity50
the All-Seeing Ledger100
the Paper Heart200

Relics and cosmetics are unbounded flavor collectibles. Usable gear (potions/weapons/scrolls) is effectively unbounded but rate-limited by drop chance and depth.

Seasons: adding new items over time

Artefacts are organised into seasons. The loot table only rolls the current season's set. When a season's artefacts are fully mined out, we bump the season and register a brand-new set on-chain (each with its own id and cap). Old artefacts stay permanently sold-out and collectible; new ones become farmable. Seasonal rotation can extend to fresh consumables and cosmetics too, giving the dungeon a steady stream of new content without ever inflating the supply of what came before.

On-chain, each artefact is its own program account created by init_artefact(id, cap)and incremented at settlement until the cap is hit — so scarcity is real and verifiable, not a promise.

The surface has three separate trading desks, each its own menu option: the Quartermaster (gold, vs the house), the Trader (Gold ⇄ $DnD, player-to-player), and the Marketplace (items ⇄ $DnD, player-to-player).

The quartermaster (gold shop)

Menu option 2. An instant, house-run shop priced in gold — the soft currency:

  • Buy any basic consumable/weapon at its listed gold value (infinite stock).
  • Sell any item from your stash for its gold value — your reliable exit for loot you don't want.

Prices here are deterministic (common ≈ 20g up to artefact ≈ 1,500g, or an item's explicit value). No wallet needed — this is the gold faucet and sink that keeps every run fundable. It never touches $DnD.

The trader (Gold ⇄ $DnD)

Menu option 3. The currency desk where gold and $DnD change hands between players — modelled on how Kintara converts in-game gold to its token: you don't swap against the protocol, you trade with another player, and they pay on-chain from their wallet.

Why it works this way. Gold is an infinite faucet. If you could mint $DnD by converting gold, the faucet would become a $DnD printer and the token would bleed out. So the Trader is pure player-to-player: no $DnD is ever created, it only moves from a buyer's wallet to a seller's. Gold reaches $DnD value only because another player chooses to buy it.

Selling gold for $DnD

  • Pick sell gold for $DnD and enter an amount + your $DnD ask (e.g. 500 12).
  • The gold leaves your stash into escrow and your offer goes live for other players to take.
  • When someone buys it, you receive their $DnD on-chain, minus the 6% rake.

Buying gold with $DnD

  • Browse the gold offers (lowest price first), pick one, and your wallet pays the seller in $DnD on-chain.
  • The gold lands in your stash the moment the payment confirms.

The marketplace (items ⇄ $DnD)

Menu option 4. The player-to-player market for items — the only place $DnD is earned from gameplay. The protocol never mints it; one player pays another.

Selling (listing)

  • Pick sell an item, choose an item, and set your ask in $DnD (e.g. 2 150). A suggested floor from the item's value × rarity is shown to anchor you.
  • The item moves into escrow (out of your stash) so it can't be double-spent or used while listed.
  • When it sells you receive the ask minus a 6% rake, split 40% burn / 40% AI & infra / 20% dev — every trade is deflationary. Cancel any time to get the item back.

Buying (on-chain, Kintara-style)

  1. Browse listings (lowest ask first) and pick one.
  2. Your wallet signs a single transaction: 94% to the seller + the 6% rake routed 40/40/20.
  3. Once the payment confirms, the server delivers the item to your stash and closes the listing. No counterparty risk — the seller is paid trustlessly on-chain.

How prices are calculated

Prices are player-set — a free market. The UI anchors it with a suggested floor (item value × a rarity multiplier, common → artefact) and shows the lowest active ask so buyers see a live price. There are no oracle prices — discovery is the players'.

How listings are filtered

  • Type — potion, weapon, scroll, relic, cosmetic, artefact (the Trader is the gold pair).
  • Rarity — common, uncommon, rare, epic, artefact.
  • Price — lowest ask first; rarity and remaining artefact supply set the value.
Status: all three desks are live in-game. Listing, browsing and cancelling work for everyone; buying (Trader and Marketplace) requires a connected wallet in live mode, since it settles real $DnD on-chain. Listings persist in Postgres when configured.

The Black Altar (sinks)

Menu option 6. The altar burns $DnD for dark favors — a pure sink. Each offering pays on-chain and splits 40% burn / 40% AI & infra / 20% dev, then the server grants the effect:

  • Cosmetic title (50 $DnD) — a random trophy title added to your stash. Pure flex.
  • Reroll charm (80 $DnD) — your next degen rolls stats twice and keeps the kinder roll.
  • Revive ward (200 $DnD) — drags you back once from death in a Cursed delve (revive at half HP, same floor).

Charms are consumed automatically when they apply. Buying needs a connected wallet (live mode).

The Hoard & entry

The Hoard is a single, persistent on-chain prize pool. Every paid entry feeds it, and deep extractors win slices of it.

Dynamic entry

A Cursed delve's entry is 250 $DnD + 1% of the live Hoard, so dives cost more as the pot swells. Your transaction includes a slippage guard so a sudden jump can't overcharge you. Of each entry, 75% feeds the Hoard and 25% is the protocol fee.

Winning the Hoard

  • Only extractions from floor 8+ roll for the Hoard. Die and you forfeit.
  • Win chance rises with depth (up to 60%); the payout slice rises with depth too.
  • A single payout is capped on-chain at 20% of the pot, so the Hoard always survives a win.
  • The draw is derived from the run's on-chain VRF seed — provably fair and replayable.

Fairness & anti-cheat

  • Server-authoritative: the deterministic engine runs on the server, not your browser, so a client can never fabricate an outcome.
  • Wallet session auth: you sign a free message on connect to prove you own your wallet; every stash/$DnD action is bound to that signed session, so no one can act for another wallet.
  • Faithful replay: each run logs its seed, every input, and a snapshot of the loadout/charms (and any corpse it looted) — so anyone can re-run it and reproduce the exact outcome, even for geared runs.
  • Seeded randomness: each paid run is seeded by on-chain randomness recorded before you play. (A move to a fully trustless oracle VRF is planned for mainnet — see roadmap.)
  • On-chain guards: only the attestor can settle, payouts are capped, entry has slippage protection, and supply is fixed.

Tokenomics & fees

  • Supply: 1,000,000,000 $DnD, fixed. Mint authority revoked.
  • Two currencies: gold (soft, off-chain faucet) and $DnD (hard, on-chain, earned only from players).
  • Hold to play: 1,000 $DnD gates all play.

Where fees go

Two streams, kept separate:

  • In-game fees (Cursed entry's 25% fee portion, the 6% marketplace rake, and altar sinks) route 40% burn / 40% AI & infra / 20% dev.
  • Launch creator fees route 100% to dev for runway — separate from the protocol's 40/40/20.

The goal: in-game fees alone fund the AI and infrastructure, so the game is self-sustaining regardless of speculation.

Fee management

The 40% infra and 20% dev shares accumulate in two program-owned vaults (an infra vaultfor AI/infra, a treasury vault for dev). The config authority sweeps them to any wallet via the withdraw_fees instruction, so the operator funds AI inference and dev manually (no auto-top-up worker yet — by design, for now).

Operator tool: scripts/sweep-fees.mjs <infra|treasury> <amount> <destinationWallet>, run with the authority key.

Staking

Staking grants utility only — access tiers, a marketplace rake discount, identity and governance — with an unbonding period and an unstake burn. It deliberately pays no yield and no fee revenue: rewarding stakers from fees would create a fourth bucket and a security/regulatory risk. You stake for perks, not for printed returns.

The staking program is live on-chain, but the in-app staking screen is turned off for nowwhile we finalise the utility tiers. It'll return to the menu in a later update.

Looting the dead (async PvP)

Die on a Cursed delve and you drop a corpse on the exact floor where you fell, holding the gold + items you were carrying. It's recorded on-chain and stays lootable by other players for 7 days — async PvP, no real-time netcode.

Looting happens inside a delve, not from a menu: if you reach the floor where another delver died, you'll find their corpse as that floor's event and can choose to loot it — or leave it and move on.

  • It's risky. A reflex check decides it: succeed and you strip the dead clean; fail and the corpse's grave-wight rises and you must win the fight (or flee empty-handed) to claim the hoard.
  • You still have to get out. Looted gold + items join your carried haul, not your stash — die before you extract and you drop it all again (in your own corpse).
  • First-come, once only. Claiming marks the corpse on-chain (claim_corpse, a single-claim guard) before the loot is credited, so a corpse can only be taken once.

Roadmap

  • Relic / artefact cNFTs minted on extraction (Bubblegum) — items are off-chain today.
  • Real VRF (Switchboard/ORAO) replacing the attestor-written seed (≈0.001–0.002 SOL/run) before mainnet.
  • Replay hardening: snapshot the loadout + charms into the run record so geared runs verify exactly.
  • Authority handover to a Squads multisig + timelock, and an audit before mainnet.
  • Mainnet launch (pump.fun fair launch).

Enter the dungeon →