# Provable Games
> Using cryptography to create incorruptible and indestructible fun.
## Battle System
Summit uses the same proven combat mechanics from [Loot Survivor](/lootsurvivor/guide/battle), creating a familiar yet competitive environment where your beasts battle each other instead of adventurers.
### Combat Fundamentals
#### Turn-Based Combat
Just like in Loot Survivor, combat follows a turn-based system:
1. **Attacker Goes First** - The challenging beast attacks
2. **Defender Counter-Attacks** - If they survive, they strike back
3. **Repeat** - Continue until one beast falls
The key difference in Summit is that **both combatants are beasts**, making type advantages and upgrades even more crucial.
#### Damage Calculation
Damage in Summit follows the Loot Survivor formula with some additions:
**Base Damage Formula:**
```
Power = Beast Level × (6 - Beast Tier)
```
**Damage Modifiers:**
* **Type Advantage**: +50% damage when strong, -50% when weak
* **Attack Potions**: Each potion adds 10% bonus damage (strength)
* **Critical Hits**: Chance based on Luck stat (0% base, up to 95%)
* **Special Abilities**: Prefix/suffix bonuses when unlocked
### Type Advantage System
Summit uses the same rock-paper-scissors system from Loot Survivor:
{/* Brute - Top */}
🔨
Brute
Bludgeon
{/* Hunter - Bottom Left */}
⚔️
Hunter
Blade
{/* Magical - Bottom Right */}
✨
Magical
Magic
{/* Center circular arrows */}
**Remember:** Brute beats Hunter, Hunter beats Magical, Magical beats Brute
### Summit-Specific Combat Features
#### Multi-Beast Attacks
Summit allows you to attack with multiple beasts in sequence:
1. **Sequential Combat** - Beasts fight one at a time
2. **All Attacks in One Transaction** - Your sequence of beasts attacks in a single transaction, giving you a better chance to take the Summit
3. **Strategic Order** - Choose your beast order wisely
#### Multi-Attack with One Beast
You can attack multiple times with the same beast in a single transaction by using revival potions:
1. **Chain Attacks** - Your beast attacks, dies, revives, and attacks again
2. **Atomic Execution** - All attacks happen in one transaction, preventing the Summit holder from adding extra lives or other defensive measures between attacks
3. **Attack Potions** - Combining Attack Potions with a multi-attack applies the potions to all your attacks, making it the most effecient use of those potions
4. **Revival Cost** - Each revival costs increasing amounts of potions (1st costs 1, 2nd costs 2, etc.)
5. **Effective for Securing Summit** - This strategy is particularly powerful for overwhelming defenders
#### Extra Lives System
Defenders can have multiple lives:
* When health reaches 0, an extra life is consumed
* Beast returns to full health (base + bonus)
* Combat continues without interruption
* Beasts can have up to 4000 extra lives
#### Critical Hit Mechanics
Critical hits in Summit are determined by the Luck stat:
| Luck | Critical Chance |
| ---- | --------------- |
| 0 | 0% |
| 1 | 10% |
| 10 | 25% |
| 50 | 65% |
| 100 | 100% |
**Critical Hit Damage**: +100% base damage
### Strategic Considerations
#### Attacking Strategy
When planning your assault:
1. **Scout the Defender** - Check their type, health, and extra lives
2. **Order Your Beasts** - Put your strongest with type advantage first
3. **Load Attack Potions** - Apply optimal amount of attack potions
4. **Time Your Strike** - Attack when defender is weakened
#### Defending Strategy
To hold the Summit longer:
1. **Maximize Health** - Feed $CORPSE tokens for bonus health (up to 2000)
2. **Stock Extra Lives** - Apply them immediately after taking Summit
3. **Choose Defensive Upgrades** - Wisdom to gain bonus levels, Luck to get critical chance, Specials to unlocks name match bonus
#### Type Matchup Planning
Since you know the defending beast's type:
* **Favorable Matchup**: +50% damage makes victory likely
* **Neutral Matchup**: Comes down to stats and potions
* **Unfavorable Matchup**: -50% damage makes victory difficult
### Battle Rewards
#### Experience Points
XP in Summit works differently than Loot Survivor:
**Attackers Gain:**
* Base: 10 XP per attack
* Attack Streak Bonus: +1 XP per consecutive attack (max +10)
* Beasts can gain up to 40 bonus levels
**Defenders Gain:**
* XP = Defeated attacker's power / 100
* Wisdom upgrade required
* Rewards successful defense
### Tips for Success
#### Know Your Enemy
* Each beast type has predictable strengths and weaknesses
* Plan your attacks around type advantages
* Consider the defender's upgrades and health
#### Resource Efficiency
* Don't waste potions on unlikely victories
* Save revival potions for coordinated attacks
* Balance upgrades amongst your strongest beasts
#### Timing is Everything
* Attack during low activity periods
* Coordinate with allies for sequential strikes
* Take advantage of weakened defenders
The battle system rewards both tactical planning and strategic resource management. Master these mechanics to dominate the Summit!
## Beast Upgrades
Summit introduces a unique upgrade system that expands upon your [Loot Survivor Beasts](/lootsurvivor/beasts), adding new strategic layers through attributes and abilities that are exclusive to Summit gameplay.
### How Upgrades Work
Your beasts can be enhanced using tokens earned from Loot Survivor gameplay:
* **Skull Tokens** - Earned when your beasts kill adventurers (1 per kill). Used to increase attributes or unlock abilities
* **Corpse Tokens** - Extracted from your dead adventurers (1 per level). Used exclusively to increase your beast's health
* **One-time upgrades** - Permanent improvements that fundamentally change how your beast performs in Summit
The key is that Summit rewards players who are active in both games - your success in Loot Survivor directly translates to more powerful beasts in Summit:
* **$SKULL Tokens** - Earned when your beasts kill adventurers (1 per kill)
* **$CORPSE Tokens** - Extracted from your dead adventurers (1 per adventurer level)
* **Beast Locking** - When an adventurer kills one of your beasts in Loot Survivor, that beast gets locked in Summit for 24 hours and cannot attack
### Attributes
#### 🎲 Luck - Critical Hit Chance
Luck increases your chance to land critical hits for massive damage.
**Cost:** 1 $Skull per level (up to 100)
**Best For:** High powered beasts focused on dealing damage
#### ⚡ Spirit - Revival Time Reduction
Spirit reduces the revival time after your beast dies, getting them back in action faster.
**Effect:**
* Each point of Spirit reduces revival time
**Revival Time Calculation:**
* Base: 24 hours
* With Maximum Spirit: Reduced by 20 hours
* Minimum possible: 4 hours
**Cost:** 1 $Skull per level (up to 100)
**Best For:** Active players who attack frequently
### Abilities
Abilities are powerful one-time unlocks that fundamentally change how your beast performs:
#### ⭐ Specials - Name Match Bonuses
Unlocks your beast's prefix and suffix abilities, providing combat bonuses based on name matches.
**Effect:**
* Activates prefix ability (8x bonus damage)
* Activates suffix ability (2x bonus damage)
* Bonuses apply when names match in combat
**Cost:** 10 Skull Tokens
**Best For:** Beasts with matching names against strong defenders
#### 🤝 Diplomacy - Shared Rewards & Power Boost
Empower and share rewards with other beasts that have the same prefix and suffix.
**Effect:**
* When a matching beast holds Summit, you gain a share of the $SURVIVOR reward
* Empowers the matching Summit holder with a damage bonus based on your beast's power
* Creates alliance opportunities
* Encourages coordinated play
**Damage Bonus Calculation:**
```
Damage Boost = (Total Power of all Diplomacy beasts / 250) × 10%
```
**Example:**
* Your "Agony Bane" beast is holding the Summit
* Two other "Agony Bane" beasts (Power 150 each) have Diplomacy unlocked
* Their Total Power = 150 + 150 = 300
* Summit holder gets: (300 / 250) × 10% = 10% damage boost
* Note: Summit holder does not get bonus from itself unlocking Diplomacy
**Cost:** 15 Skull Tokens
**Best For:**
* Players with multiple matching beasts or coordinating with allies
* Casual players who won't take Summit themselves but have name matches with powerful players
#### 🧠 Wisdom - Defensive XP Gain
Gain experience points when successfully defending attacks on the Summit.
**Effect:**
* XP gained = Attacker's power / 100
* Only triggers on successful defense
* Helps level up while holding Summit
**Cost:** 20 Skull Tokens
**Best For:** Defensive strategies and long Summit reigns
### Vitality - Bonus Health
#### ❤️ Health Enhancement
Permanently increase your beast's health using Corpse Tokens.
**Stats:**
* Maximum Bonus: 2,000 health
* Cost: 1 Corpse Token per health point
**Strategic Impact:**
* More health = longer Summit defense
* Essential for tanky builds
* Pairs well with Extra Life potions
### Upgrade Strategy Guide
#### Offensive Build
Focus on maximizing damage output over time:
1. **Luck** to gain critical chance
2. **Specials** for name bonuses
3. **Spirit** for frequent attacks
#### Defensive Build
Optimize for holding the Summit:
1. **Maximum health** (2,000 bonus)
2. **Wisdom** for XP while defending
3. **Moderate Luck** for counter-attacks
#### Alliance Build
For coordinated groups:
1. **Diplomacy** on matching beasts
2. **Balanced stats** across team
3. **Coordinate Summit control**
### Token Management
#### Earning Tokens
Tokens are earned through [Loot Survivor](/lootsurvivor) gameplay:
##### Skull Tokens
Earned when your beast successfully kills an adventurer:
* **1 Skull Token** per adventurer killed
* Accumulates across all your beasts
##### Corpse Tokens
Extracted from your own dead adventurers:
* **1 Corpse Token per adventurer level**
* Only from adventurers you own
* Adventurer must be dead (0 health)
* Extract tokens through the Summit interface
**Example:** A dead level 15 adventurer yields 15 Corpse Tokens
#### Spending Priority
Consider these factors:
1. **Immediate needs** - What helps you win now?
2. **Long-term goals** - Building for sustained success
3. **Beast potential** - Invest in your strongest beasts
4. **Play style** - Match upgrades to how you play
The upgrade system transforms your beasts into customized warriors. Choose wisely - these permanent improvements define your Summit strategy!
### What Happens After Summit Ends?
There are currently no planned expansions or additional seasons of Summit beyond the current game. Summit is a finite experience — once the reward pool is distributed, the game concludes.
**Will upgrades persist if another Summit happens?**
If a future Summit is introduced, our intention is to carry over beast upgrades and stats. However, we cannot guarantee this, as it depends on factors that are not yet known — including game design decisions, technical considerations, and the needs of future player bases.
Our commitment is to build valuable and fun experiences. We will not compromise future gameplay, as it would be -EV for everyone in the ecosystem. What we can say is that the upgrades you earn in this Summit are designed for this Summit — to help you compete, complete quests, and earn $SURVIVOR.
**The right mindset:** Upgrade your beasts for the game in front of you. Every $SKULL and $CORPSE you spend should be an investment in winning now — holding the Summit longer, completing more quests, and claiming your share of the 92,000 $SURVIVOR reward pool (56,000 Summit, 36,000 quests) plus 8,000 $SURVIVOR seeded as initial consumable liquidity.
## Consumables
Potions are the strategic fuel of Summit battles. Knowing when and how to use them can mean the difference between a brief appearance and a legendary reign.
### Types of Potions
#### 🔄 Revival Potions
Skip the 24-hour death cooldown and get back in the fight immediately.
**How They Work:**
* Instantly revives a dead beast
* Cost increases with each use on the same beast
* Essential for chain attacks
**Cost Scaling:**
| Revival # | Potions Required | Total Used |
| --------- | ---------------- | ---------- |
| 1st | 1 | 1 |
| 2nd | 2 | 3 |
| 3rd | 3 | 6 |
| 4th | 4 | 10 |
| ... | ... | ... |
| 64th | 64 | 904 |
**Note:** Revival cost caps at 64 potions. All revivals will cost 64 potions at this point.
**Strategic Uses:**
* Enable rapid counter-attacks after defeat
* Chain multiple beast assaults
* Maintain pressure on Summit holder
* React quickly to opportunities
* Combine with attack potions in a multi-attack
#### ⚔️ Attack Potions
Boost your damage output for devastating first strikes.
**How They Work:**
* Each potion increases attack damage
* Only usable by attackers (not defenders)
* Maximum 255 potions per beast
**Strategic Uses:**
* Overwhelm high-health defenders
* Secure one-shot kills with type advantage
* Break through extra lives quickly
* Make impossible matchups winnable
#### ❤️ Extra Life Potions
Give your beast multiple chances to defend the Summit.
**How They Work:**
* Automatically activates when health reaches 0
* Restores beast to full health (base + bonus)
* Can only be applied to current Summit holder
* Maximum 4000 extra lives
**Strategic Uses:**
* Extend Summit defense duration
* Discourage attackers (psychological warfare)
* Survive coordinated assaults
#### ☠️ Poison Potions
Slowly weaken the Summit holder over time without direct combat.
**How They Work:**
* Deals 1 damage per second to the Summit holder
* Damage stops at 1 health and 0 extra lives (cannot kill)
* Multiple poison potions stack for faster damage
* Can only be applied to current Summit holder
**Strategic Uses:**
* Weaken defenders before attacking
* Force defenders to waste extra lives
* Create time pressure on Summit holders
* Coordinate with allies for timed strikes
### Potion Market
#### Continuous Clearing Auction (CCA)
Potions are distributed using a Continuous Clearing Auction (CCA) — the same mechanism used for [Loot Survivor's dungeon tickets](/lootsurvivor/dungeon-tickets). Potions are the revenue source of Summit.
**How It Works:**
* Potions are streamed block-by-block into an [Ekubo](https://ekubo.org/) TWAMM (Time-Weighted Average Market Maker) pool
* Price starts intentionally high at game launch and decreases over time as supply enters the pool
* The price naturally settles at what players are willing to pay -no more, no less
* At launch, each of the four potion pools is seeded with **2,000 $SURVIVOR** in initial liquidity for price discovery and stability.
**Daily Issuance Rates:**
| Potion Type | Tokens Per Day | Initial Liquidity | Starting Price |
| ------------- | -------------- | ----------------- | -------------- |
| ⚔️ Attack | 97,206 | 2,000 $SURVIVOR | $0.01 |
| 🔄 Revival | 97,206 | 2,000 $SURVIVOR | $0.01 |
| ☠️ Poison | 97,206 | 2,000 $SURVIVOR | $0.01 |
| ❤️ Extra Life | 4,860 | 2,000 $SURVIVOR | $0.20 |
**Key Features:**
* Price adjusts based on supply and demand in real time
* Current price is always visible before purchase
* Purchase with any token on Starknet
**Strategic Purchasing:**
* No need to rush — prices start high and come down as potions stream in
* Monitor price trends for optimal buying times
* Consider DCA (Dollar-Cost Averaging) orders for bulk purchases
**Revenue Distribution:**
100% of proceeds from potion sales are used to buy back $SURVIVOR tokens for the DAO treasury, supporting the long-term sustainability of the Survivor ecosystem.
### Tips for Success
#### For Beginners
1. Start with revival potions to learn timing
2. Use attack potions with type advantage
3. Apply extra lives on attack before taking Summit
#### For Veterans
1. Calculate exact potion requirements
2. Time market purchases strategically
3. Coordinate group strategies
4. Optimize cost per second held
#### Common Mistakes
* Using attack potions with type disadvantage
* Applying extra lives on weak beasts
* Reviving the same beast too many times
* Ignoring potion economics
The key to potion mastery is understanding not just what each does, but when each creates maximum value. Use them wisely, and the Summit will be yours!
### After Summit Ends
Potions are consumables designed exclusively for Summit gameplay. Once the game concludes and the reward pool is fully distributed, potions will have no further use case. Purchase and use them with this in mind — they are a tool for winning now, not an asset to hold.
## Disclaimers
This documentation is provided for informational purposes only and is not legal, financial, tax, or investment advice. You are responsible for understanding and complying with all applicable laws, rules, and regulations in your jurisdiction.
### Smart Contract Risk (Unaudited)
Summit is powered by smart contracts. **These smart contracts are unaudited** and may contain bugs, design flaws, or security vulnerabilities. Smart contracts and blockchain systems can fail unexpectedly, be exploited, or behave in ways that cause partial or total loss of funds, tokens, in-game items, or other assets.
### No Warranties (As-Is, As-Available)
Summit and all related software, smart contracts, interfaces, and documentation are provided on an **“AS IS”** and **“AS AVAILABLE”** basis, without warranties of any kind (express, implied, or statutory), including warranties of merchantability, fitness for a particular purpose, non-infringement, or that the system will be uninterrupted, secure, error-free, or free of harmful components.
### Assumption of Risk; Irreversible Transactions
By interacting with Summit, you acknowledge and accept the risks of cryptographic and blockchain-based systems, including volatility, MEV/front-running, downtime, congestion, reorgs, forks, bridge failures, oracle or pricing anomalies, and wallet compromise. Blockchain transactions are typically **irreversible** once confirmed, and neither the Summit team nor any contributors can reverse, cancel, or recover transactions or assets.
### Third-Party Dependencies
Summit may integrate with or rely on third-party protocols, networks, wallets, RPC providers, bridges, liquidity venues, and other services. Those third parties are not under our control, and failures or changes in third-party services may result in loss of assets, degraded functionality, incorrect displays of information, or inability to access features.
### Limitation of Liability
To the fullest extent permitted by law, in no event will the Summit team, contributors, or any related parties be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages, or for any loss of profits, revenue, goodwill, data, or assets, arising out of or related to your access to or use of Summit, the smart contracts, or any related services, even if advised of the possibility of such damages.
### Your Responsibility
You are solely responsible for safeguarding your wallet, private keys, and recovery phrases, verifying addresses and transaction parameters, and understanding the mechanics of any smart contract interactions before you approve them. You are also solely responsible for any taxes arising from your activity.
## Summit: FAQ
Find answers to common questions about Summit. Summit is currently in alpha and details may change.
### General
**What is Summit?**
Summit is an all-against-all, king-of-the-hill PvP arena where players use Loot Survivor Beasts to battle for control of the Summit and earn $SURVIVOR rewards.
**Is Summit still in alpha?**
Yes. Summit is currently in alpha. Game mechanics, rewards, and features are subject to change.
**How long does a Summit game last?**
Each Summit game lasts 8 million seconds (approximately 93 days).
**What is the total reward pool?**
92,000 $SURVIVOR total: 56,000 for holding the Summit and 36,000 for quest completion, plus 8,000 $SURVIVOR seeded as initial liquidity for the four consumables at launch.
### Getting Started
**What do I need to play?**
You need Beasts from Loot Survivor. Beasts are earned by killing monsters during Loot Survivor gameplay or can be purchased on secondary markets.
**How do I get Beasts?**
Play Loot Survivor and kill beasts during your adventure — each beast kill mints a collectible Beast. You can also buy them on secondary markets.
**How do I start?**
Select one of your Beasts and attack the current Summit holder. Your first attack unlocks quests for that beast.
### Battle System
**How do battles work?**
Battles are turn-based: the attacker strikes first, then the defender counter-attacks. Damage is calculated using Base Power = Beast Level x (6 - Beast Tier), modified by type advantages and upgrades.
**What are the type advantages?**
Rock-paper-scissors system: Brute beats Hunter, Hunter beats Magical, Magical beats Brute. Having type advantage gives +50% damage; disadvantage gives -50% damage.
**What is multi-attack?**
You can attack the Summit multiple times in a single transaction using revival potions. The cost increases per use (1st costs 1 potion, 2nd costs 2, etc., up to a max cost of 64). All attacks happen atomically, preventing the defender from making changes mid-battle.
**How do critical hits work?**
Critical hits deal +100% base damage. The chance depends on your beast's Luck stat, ranging from 0% at Luck 0 to 100% at Luck 100.
**How does XP work?**
Attackers earn 10 XP base + 1 XP per consecutive attack (max +10 bonus). Attackers can gain up to 40 bonus levels. Defenders earn XP only if they have the Wisdom upgrade (XP = attacker's power / 100).
### Beast Upgrades
**What are $SKULL and $CORPSE tokens?**
$SKULL tokens are earned by killing beasts in Loot Survivor (1 per kill) and used for attribute and ability upgrades. $CORPSE tokens are earned from dead adventurers in Loot Survivor (1 per adventurer level) and used for health upgrades.
**What attributes can I upgrade?**
* **Luck**: 1 $SKULL per level (up to 100 levels). Increases critical hit chance.
* **Spirit**: 1 $SKULL per level (up to 100 levels). Reduces revival cooldown from 24 hours down to 4 hours at max level.
**What abilities can I unlock?**
* **Specials** (10 $SKULL): Activates prefix (8x) and suffix (2x) damage bonuses when beast names match.
* **Diplomacy** (15 $SKULL): Share rewards with other beasts that have matching names.
* **Wisdom** (20 $SKULL): Gain XP when defending (XP = attacker power / 100).
* **Vitality** (1 $CORPSE per point): Add bonus health, up to 2,000 extra HP.
### Consumables
**What potions are available?**
* **Revival Potions**: Skip the 24-hour death cooldown. Cost increases per use (1, 2, 3... up to 64).
* **Attack Potions**: +10% bonus damage per potion (max 255 per beast). Attackers only.
* **Extra Life Potions**: Give defenders multiple lives (max 4,000). Restores full health when consumed.
* **Poison Potions**: Deal 1 damage per second to the Summit holder. Multiple stack. Cannot kill (stops at 1 HP with 0 extra lives).
**How does the potion market work?**
Potions are sold through a Continuous Clearing Auction (CCA) via Ekubo liquidity pool. Prices start high and decrease over time. 100% of proceeds go to buy back $SURVIVOR for the DAO treasury.
### Rewards & Quests
**How do I earn $SURVIVOR from holding the Summit?**
The Summit holder earns 0.007 $SURVIVOR per second. You must hold for at least one full block (approximately 2-3 seconds) to earn anything. Rewards are claimed when your beast is dethroned.
**How does Diplomacy reward sharing work?**
Each beast with the Diplomacy upgrade and a matching name earns 0.00005 $SURVIVOR per second while a matching beast holds the Summit. Up to 75 matching beasts can earn simultaneously.
**What quests are available?**
Quests include: First Blood (attack the Summit), Consistency is Key (10-attack streak), level-up milestones (1/3/5/10 levels), Summit Conqueror (capture the Summit), Iron Grip (hold for 10+ seconds), Second Wind (revive and attack), and A Vital Boost (use attack potion). Each beast can earn up to 0.95 $SURVIVOR from quests. The 36,000 $SURVIVOR quest pool is first come, first serve.
### Strategy
**How should I choose which beast to use?**
Check the current Summit holder's type. Use a beast with type advantage for +50% damage. Higher level and lower tier beasts deal more base damage.
**When is the best time to attack?**
Attack during low-activity periods or when top beasts are on cooldown (24 hours after death, reduced by Spirit upgrades). Early in the game, there are fewer beasts competing and lower upgrade costs.
**Should I focus on offense or defense?**
Offensive builds (Attack Potions, Luck for crits) are good for capturing the Summit. Defensive builds (Extra Lives, Vitality) help hold it longer to earn more $SURVIVOR per second.
### After the Game Ends
**Will there be another Summit season?**
There are no planned additional seasons at this time.
**Do my beast upgrades carry over?**
Upgrades are designed for the current Summit. While upgrades may carry over to future events, this is not guaranteed.
## Savage Summit
Savage Summit is an all-against-all, king-of-the-hill battle game where players use their [Loot Survivor Beasts](/lootsurvivor/beasts) to fight for control of the Summit. The beast standing on the Summit earns rewards based on how long they can defend their position.
### How It Works
Summit takes the collectible beasts from Loot Survivor and gives them a new battlefield where they can compete directly against each other. Think of it as a PvP arena where your beasts battle for supremacy and earn rewards.
#### The Basic Loop
1. **Challenge the Summit** - Use your beasts to attack whoever currently holds the Summit
2. **Claim Victory** - If your beast wins, it becomes the new king of the hill
3. **Defend Your Throne** - Fight off challengers to maintain control
4. **Earn Rewards** - Receive 0.007 $SURVIVOR for every second you hold the Summit
#### What You Need to Play
* **Beast NFTs**
* Collect them by playing [Loot Survivor](https://lootsurvivor.io/survivor)
* Purchase on marketplace: [Marketplace](https://beast-dex.vercel.app/marketplace)
### Key Features
#### 🏆 King of the Hill
Only one beast can control the Summit at a time. Every attacker tries to dethrone the current king, creating an endless battle for dominance.
#### 💀 Revival Mechanics
Dead beasts have a 24-hour cooldown before they can fight again - unless you use revival potions to get them back in action immediately.
#### 📈 Beast Progression
Your beasts gain experience from battles and can be upgraded with new abilities unique to Summit:
* **Luck** - Increases critical hit chance
* **Spirit** - Reduces revival cooldown time
* **Specials** - Unlocks prefix/suffix name match bonus
* **Diplomacy** - Empower & Share rewards with matching beasts
* **Wisdom** - Gain XP when defending the Summit
* **Vitality** - Gain Bonus Health
#### 📜 Quests
Complete [objectives](/summit/quests) with your beasts to earn $SURVIVOR without holding the Summit:
* **10 quests** ranging from first attacks to holding the Summit for 10+ seconds
* **Per-beast tracking** — each beast has independent quest progress
* **First come, first serve** — 36,000 $SURVIVOR quest pool depletes as players complete quests
#### 🧪 Consumables
Four types of potions add layers of strategy:
* **Revival Potions** - Skip the death cooldown
* **Attack Potions** - Boost damage for assault
* **Extra Life Potions** - Give defenders multiple lives
* **Poison Potions** - Poison the Summit, making it take damage every second
### Game Ending
Summit reward allocation is split as follows:
* **56,000 $SURVIVOR** for holding the Summit
* **36,000 $SURVIVOR** in the quest pool for completing [quests](/summit/quests)
* **8,000 $SURVIVOR** seeded as initial liquidity across the Attack, Revival, Poison, and Extra Life potion pools
* Game ends after 8 million seconds (93 days)
### Mainnet Contracts
| Contract | Address |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Summit Game | [`0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064`](https://voyager.online/contract/0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064) |
| Attack Potion | [`0x016f9def00daef9f1874dd932b081096f50aec2fe61df31a81bc5707a7522443`](https://voyager.online/contract/0x016f9def00daef9f1874dd932b081096f50aec2fe61df31a81bc5707a7522443) |
| Poison Potion | [`0x049eaed2a1bA2F2Eb6Ac2661ffd2d79231CdD7d5293D9448Df49c5986C9897aE`](https://voyager.online/contract/0x049eaed2a1bA2F2Eb6Ac2661ffd2d79231CdD7d5293D9448Df49c5986C9897aE) |
| Revive Potion | [`0x029023e0a455d19d6887bc13727356070089527b79e6feb562ffe1afd6711dbe`](https://voyager.online/contract/0x029023e0a455d19d6887bc13727356070089527b79e6feb562ffe1afd6711dbe) |
| Extra Life Potion | [`0x016dea82a6588ca9fb7200125fa05631b1c1735a313e24afe9c90301e441a796`](https://voyager.online/contract/0x016dea82a6588ca9fb7200125fa05631b1c1735a313e24afe9c90301e441a796) |
| Corpse Token | [`0x0103eafe79f8631932530cc687dfcdeb013c883a82619ebf81be393e2953a87a`](https://voyager.online/contract/0x0103eafe79f8631932530cc687dfcdeb013c883a82619ebf81be393e2953a87a) |
| Skull Token | [`0x01c3c8284d7EED443b42F47e764032a56eAf50A9079D67993B633930E3689814`](https://voyager.online/contract/0x01c3c8284d7EED443b42F47e764032a56eAf50A9079D67993B633930E3689814) |
See [Disclaimers](/summit/disclaimers) for important legal and smart contract risk information, including the fact that Summit contracts are unaudited.
### Getting Started
1. **Get Beasts** - Own at least one beast NFT
2. **Scout the Summit** - Check who currently holds the position
3. **Plan Your Attack** - Time your assault when you have the best chance
4. **Upgrade Wisely** - Use **$SKULL** tokens earned from killing adventurers and **$CORPSE** tokens
earned from fallen adventurers to upgrade your beasts
5. **Complete [Quests](/summit/quests)** - Complete objectives for your beasts to earn $SURVIVOR
### Why Play Summit?
* **Direct Competition** - Test your beasts against other players
* **Earn Rewards** - $SURVIVOR tokens for holding the Summit and completing [quests](/summit/quests)
* **Strategic Depth** - Multiple paths to victory through upgrades and timing
* **Community Interaction** - Form alliances or rivalries with other players
* **Limited Duration** - Once the time is up and rewards distributed, the game ends
Ready to conquer the Summit? Learn about the [Battle System](/summit/battle-system) to understand combat mechanics, or check out the [Quests](/summit/quests) to start earning rewards right away.
## Quests Guide
Complete objectives with your beasts to earn $SURVIVOR tokens from the quest reward pool. Quests provide a structured way to earn rewards beyond holding the Summit, rewarding players for engaging with all aspects of the game.
### Reward Pool
Quests draw from a dedicated pool of **36,000 $SURVIVOR** tokens:
* Each beast can earn up to **0.95 $SURVIVOR** by completing all quests
* The pool is **first come, first serve** — once depleted, quests no longer reward tokens
* Quest rewards are separate from Summit holding rewards
### Quest List
| Quest | Description | Reward ($SURVIVOR) | Notes |
| ------------------ | ------------------------------------------------- | ------------------ | ------------------------ |
| First Blood | Attack the Summit | 0.05 | Unlocks all other quests |
| Consistency is Key | Reach a max attack streak of 10 | 0.10 | |
| Growing Stronger | Level up once | 0.04 | Level Up Tier 1 |
| Rising Power | Level up 3 times | 0.06 | Level Up Tier 2 |
| Apex Predator | Level up 5 times | 0.08 | Level Up Tier 3 |
| Mastery | Level up 10 times | 0.12 | Level Up Tier 4 |
| Summit Conqueror | Capture the Summit | 0.10 | |
| Iron Grip | Hold the Summit for 10+ seconds | 0.20 | Highest reward |
| Second Wind | Buy a revival potion and attack with a dead beast | 0.10 | |
| A Vital Boost | Buy an attack potion and attack using it | 0.10 | |
### Key Mechanics
#### Per-Beast Tracking
Quests are tracked **per beast** — each beast has its own independent quest progress. This means you can earn quest rewards across multiple beasts.
#### Tiered Level Up Quests
The level up quests have 4 progressive tiers with increasing rewards:
1. **Growing Stronger** (1 level) → 0.04 $SURVIVOR
2. **Rising Power** (3 levels) → 0.06 $SURVIVOR
3. **Apex Predator** (5 levels) → 0.08 $SURVIVOR
4. **Mastery** (10 levels) → 0.12 $SURVIVOR
Each tier is a separate quest — completing higher tiers also completes the lower ones.
#### In-Game Quest Guides
Some quests have built-in help guides accessible via the help button in the quests modal. These provide step-by-step instructions for completion.
### Tips for Success
#### Getting Started
1. **Check your quest progress** in the quests modal to see what's available
2. **Check your beasts** by hovering over the beast cards to see what's remaining
#### Maximizing Rewards
1. **Prioritize Iron Grip** — at 0.20 $SURVIVOR, it's the highest single quest reward
2. **Level up tiers stack** — working toward Mastery (10 levels) completes all four level up quests for a combined 0.30 $SURVIVOR
3. **Spread across beasts** — since quests are per-beast, completing quests on multiple beasts multiplies your total earnings
#### Act Fast
The quest reward pool is finite and first come, first serve. Early and active players will claim the largest share of the 36,000 $SURVIVOR pool before it's depleted.
## Rewards Guide
Summit's reward system is straightforward: hold the Summit longer, earn more $SURVIVOR. With a total gameplay pool of **92,000 $SURVIVOR** (plus initial liquidity noted below) to distribute, every second matters.
### How Rewards Work
#### The Prize Pool
Summit has a **finite reward pool**:
* **Total Distribution**: 92,000 $SURVIVOR tokens
* **Summit Holding**: 56,000 $SURVIVOR - distributed to holding the Summit
* **Quest Rewards**: 36,000 $SURVIVOR - distributed through quest completions
* **Initial Potion Liquidity**: 8,000 $SURVIVOR seeded across the 4 consumable pools at launch
* **Rate**: \~0.007 $SURVIVOR per second to the Summit holder
* **Game Duration**: 8 million seconds (93 days)
#### Block-by-Block Earnings
Every block your beast holds the Summit:
* Base reward: **\~0.007 $SURVIVOR** per second
* Reward accumulates automatically
* Can be claimed when your beast is dethroned
* **Your beast must hold the Summit for at least one full block to earn any reward.**
**Examples (blocks are \~2-3 seconds):**
| Scenario | Reward |
| ---------------------------------------------------------- | -------------------------------------------------------------- |
| Beast claims Summit and is dethroned in the **same block** | **0 $SURVIVOR** — no full block held |
| Beast claims Summit and holds for **1 block** (\~2-3s) | **\~0.014-0.021 $SURVIVOR** — rewarded for time between blocks |
| Beast holds for **10 blocks** (\~20-30s) | **\~0.07-0.105 $SURVIVOR** |
**Diplomacy Reward Sharing:**
If matching beasts have the Diplomacy upgrade:
* Each Diplomacy beast receives **0.00005 $SURVIVOR per second**
* Maximum of 75 matching beasts can exist
* Summit holder keeps the remainder
**Example Distribution Each Second:**
| Diplomacy Beasts | Each Gets | Summit Holder Gets |
| ---------------- | --------- | ------------------ |
| 0 | - | 0.007 $SURVIVOR |
| 10 | 0.00005 | 0.0065 $SURVIVOR |
| 75 (max) | 0.00005 | 0.00325 $SURVIVOR |
\*$SURVIVOR is the governance token for the Survivor ecosystem
### The Economics of Summit
#### Circular Economy
Summit creates a sustainable economic loop:
1. **Potion Market Revenue** → 100% used to buy back $SURVIVOR tokens
2. **$SURVIVOR Distribution** → Tokens distributed to Summit holders
3. **Governance Power** → Token holders govern the ecosystem
4. **Market Dynamics** → Demand for potions driven by competition for $SURVIVOR
**Fair Distribution:**
* No pre-mining or special allocations
* Pure merit-based rewards
* Skill and strategy determine earnings
* Self-sustaining through potion sales
### Maximizing Your Rewards
#### Timing Strategies
**Early Bird Advantage:**
* Fewer beasts in circulation early on = less competition
* Lower skull token supply = fewer upgraded beasts
* Establish dominance before the ecosystem matures
**Peak Hours vs Off-Hours:**
* Monitor global activity patterns
* Strike during low-competition periods
* Coordinate with timezone advantages
**Beast Cooldown Windows:**
* Track when dominant beasts are on revival cooldown
* Attack when top competitors can't respond
* Monitor recent battles to predict cooldown timings
* 24-hour windows create predictable opportunities
**Potion Supply Awareness:**
* Monitor current potion market supply
* Stock up when prices drop during low demand
* Scarcity creates defensive advantages
### Tracking Your Performance
#### Key Metrics
Monitor these statistics:
* **Total $SURVIVOR Earned**: Your lifetime rewards
* **Seconds Held**: Total time on Summit
* **ROI**: Earnings vs investment
#### Alliance Opportunities
**Strategic Cooperation:**
* Diplomacy creates passive income for supporters (see reward distribution above)
* Coordinate attacks with name-matching beast owners
* Share upgrade costs and potion resources
* Build "beast families" for mutual benefit
### Summary
Summit's reward system is elegant in its simplicity: defend the hill, earn $SURVIVOR. With 92,000 $SURVIVOR to distribute — 56,000 for holding the Summit, 36,000 for quest rewards, and 8,000 seeded as initial potion liquidity — success comes down to:
1. **Strategic Timing** - Attack when you can win and hold
2. **Quests Completion** - Focus on completing as many quests as possible
3. **Resource Management** - Invest enough to succeed, not more
4. **Beast Development** - Build defensive capabilities
5. **Governance Value** - $SURVIVOR tokens grant voting power in the Survivor ecosystem
The clock is ticking, the reward pool is finite, and only the strongest beasts will claim the largest shares. Make every second count!
## Combat Mechanics
Combat in Loot Survivor involves complex calculations that determine damage output between adventurers and beasts. Understanding these mechanics helps you optimize your build and strategy.
### Combat Overview
Combat damage is calculated through a series of steps:
1. **Base Damage Calculation** - Weapon tier and level determine base power
2. **Elemental Adjustments** - Type advantages modify damage by ±50%
3. **Bonus Calculations** - All bonuses use elemental adjusted damage:
* **Strength Bonus** - +10% of elemental damage per STR point
* **Critical Hit Bonus** - +100% of elemental damage (if triggered)
* **Special Bonuses** - Name matches (2× or 8× elemental damage)
4. **Total Attack** - Sum of elemental damage + all bonuses
5. **Armor Reduction** - Base armor (tier × level) subtracted from total
6. **Minimum Damage** - Adventurers deal min 4, beasts deal min 2
Critical hits provide bonus damage based on your LUCK stat:
#### Critical Hit Chance
```
Crit Chance = LUCK / 100 (%)
```
| LUCK | Crit Chance |
| ---- | ----------- |
| 0 | 0% |
| 25 | 25% |
| 50 | 50% |
| 75 | 75% |
| 100 | 100% |
#### Critical Hit Damage
When a critical hit occurs, bonus damage is added:
* **Critical bonus:** +100% of elemental-adjusted damage
* **Total damage:** 2× the normal damage when a critical hit is rolled
### Name Match Bonuses
High-level beasts (19+) and items (Greatness 19+) have special name prefixes that provide combat bonuses when matched.
#### Name Structure
Items and beasts can have names like "**Whisper** **Glow** Demon" where:
* **Prefix 1:** "Whisper" (primary name)
* **Prefix 2:** "Glow" (secondary name)
#### Bonus Calculation
| Match Type | Damage Multiplier |
| ------------------ | ---------------------- |
| **Prefix 2 Match** | 2× elemental damage |
| **Prefix 1 Match** | 8× elemental damage |
| **Both Match** | Cumulative (16× total) |
#### Important Note
* **Offense**: If your weapon shares a prefix with a beast, you deal bonus damage.
* **Defense**: If your **armor** shares a prefix with a beast, the beast deals bonus damage to you.
> **Pro Tip:** Name matches are a double-edged sword—gear that empowers you against some beasts might leave you vulnerable to others!
**Scenario:** Level 10 Adventurer with T3 Blade attacking a Beast with T4 Hide armor
```
1. Base Attack = 10 (level) × (6 - 3) = 10 × 3 = 30
2. Elemental: Blade vs Hide = Fair (no change) = 30
3. Bonuses (all based on elemental damage of 30):
- Strength Bonus (STR=5): 30 × 0.5 = +15
- Critical Hit: None triggered
- Special Bonus: None
4. Total Attack = 30 + 15 = 45
5. Base Armor = 10 (level) × (6 - 4) = 10 × 2 = 20
6. Final Damage = MAX(4, 45 - 20) = 25 HP
```
**Alternative with Type Advantage & Critical:**
```
If using T3 Bludgeon vs Hide (Strong) with critical hit:
1. Base Attack = 30
2. Elemental: 30 + (30/2) = 45 (+50% for type advantage)
3. Bonuses (all based on elemental damage of 45):
- Strength (STR=5): 45 × 0.5 = +22
- Critical Hit: 45 × 1.0 = +45
- Special: None
4. Total Attack = 45 + 22 + 45 = 112
5. Base Armor = 20
6. Final Damage = MAX(4, 112 - 20) = 92 HP!
```
**Ultimate Example with Name Match:**
```
T3 Bludgeon "Glow" vs Beast "Glow" (Prefix 2 match):
1. Base Attack = 30
2. Elemental: 30 (neutral)
3. Bonuses (all based on elemental damage of 30):
- Strength (STR=5): 30 × 0.5 = +15
- Critical: None
- Name Match: 30 × 2 = +60 (Prefix 2 match)
4. Total Attack = 30 + 15 + 60 = 105
5. Base Armor = 20
6. Final Damage = MAX(4, 105 - 20) = 85 HP!
Note: If Prefix 1 matched instead, bonus would be 30 × 8 = +240!
```
### Combat Strategy Tips
#### Optimization Guidelines
1. **Prioritize Type Advantages** - +50% damage is a significant boost
2. **Stack STR for Consistent Damage** - Linear scaling with no cap
3. **LUCK for Burst Potential** - Critical hits can turn battles
4. **Match Tier to Level** - Higher tier = more base damage
5. **Name Matching Endgame** - Massive multipliers at high levels
#### Common Pitfalls
* Fighting with type disadvantage (-50% damage reduction)
* Neglecting STR investment (missing easy damage boost)
* Using low-tier weapons at high levels
* Ignoring name match opportunities
### See Also
* [Battle Guide](/lootsurvivor/guide/battle) - Combat interface and tactics
* [Stats Guide](/lootsurvivor/stats) - Detailed stat explanations
* [Loot System](/lootsurvivor/loot) - Equipment and tier information
import { ContractTable } from "../../components/ContractTable";
## Smart Contracts
Loot Survivor is built on Starknet using the Dojo engine, with all game logic executed fully onchain. The game's smart contracts handle everything from adventurer creation to combat resolution, ensuring transparency and verifiability.
### Death Mountain Contracts
The core game engine powering Loot Survivor.
### NFT & Token Contracts
### Governance Contracts
### Ecosystem Contracts
### Development Resources
* [GitHub Repository](https://github.com/Provable-Games/death-mountain) - Source code and documentation
* [Dojo Engine](https://dojoengine.org/) - Framework powering the game
* [Starknet Documentation](https://docs.starknet.io/) - Layer 2 blockchain platform
### Contract Interaction
Players interact with the smart contracts through:
* **Game Interface**: Main game client at lootsurvivor.io
* **Direct Calls**: Advanced users can call contract functions directly
* **Block Explorers**: View transactions and state on Starkscan or Voyager
All game actions are recorded onchain, providing complete transparency and allowing for independent verification of gameplay mechanics.
### Verification Status
Several contracts have been verified on Voyager for enhanced transparency:
* **SURVIVOR Token**: Verified ✓
* **Survivor Controller**: Verified ✓
* **Survivor Governor**: Verified ✓
## Corpse Token ($CORPSE)
### Overview
$CORPSE is an ERC20 token on Starknet earned by extracting value from your fallen adventurers in Loot Survivor: Beast Mode, created alongside [Summit](/summit). When one of your adventurers dies, you can extract $CORPSE tokens proportional to their level. Currently, the only known use case for $CORPSE is increasing beast health in [Summit](/summit/beast-upgrades).
#### At a Glance
* **Standard**: ERC20 on Starknet
* **Supply**: Uncapped — minted continuously as adventurers fall in Loot Survivor: Beast Mode
* **Earning**: 1 $CORPSE per adventurer level (extracted from dead adventurers you own)
* **Current Use**: Increasing beast health in [Summit](/summit/beast-upgrades)
* **Contract Address**: TBA
### How to Earn $CORPSE
$CORPSE tokens are earned exclusively through [Loot Survivor](/lootsurvivor) gameplay:
* Play Loot Survivor: Beast Mode and level up your adventurer
* When your adventurer dies, they become eligible for extraction
* Extract $CORPSE through the Summit interface
* You receive **1 $CORPSE per adventurer level**
**Example:** A dead level 15 adventurer yields **15 $CORPSE**. A dead level 30 adventurer yields **30 $CORPSE**.
The higher you level your adventurers before they fall, the more $CORPSE you can extract. This turns every loss in Loot Survivor into a resource for Summit.
#### Retroactive Claims
Adventurers that died before $CORPSE was introduced are still eligible. If you have dead adventurers from past Loot Survivor games, you can extract $CORPSE from them immediately — meaning you may already be sitting on a stockpile of claimable tokens.
### What $CORPSE Is Used For
$CORPSE is currently used in [Summit](/summit) to permanently increase your beast's health. See the [Beast Upgrades](/summit/beast-upgrades) guide for full details on health enhancement and costs.
### Token Economics
$CORPSE creates a new layer to the Loot Survivor ecosystem — even when your adventurers die, they contribute value:
1. **Play Loot Survivor: Beast Mode** → Adventurer dies → Extract $CORPSE based on level
2. **Spend $CORPSE in Summit** → Increase beast health → Hold the Summit longer
3. **Longer Summit holds** → More $SURVIVOR earned → Greater ecosystem participation
Since $CORPSE has no supply cap, the token continues to be minted as long as adventurers are dying in Loot Survivor. Higher-level adventurers yield proportionally more tokens, rewarding skilled players who push deeper into the game before falling.
## Dungeon Tickets
### Overview
Dungeon tickets are your entry pass to [Beast
Mode](/lootsurvivor/game-modes) in Loot Survivor. Each ticket grants access
to the Dungeon where you can collect unique [Beast
NFTs](/lootsurvivor/beasts) and earn [SURVIVOR tokens](/lootsurvivor/token)
through gameplay.
### Dynamic Pricing System
Loot Survivor uses an innovative dynamic pricing model for dungeon tickets:
* **Continuous Emission**: Tickets are continuously emitted over time
* **Real-Time Adjustment**: Price adjusts based on demand - can move up or down
* **Transparent Pricing**: Live price is always visible before purchase
* **Market-Driven**: Price discovery happens naturally through supply and demand
#### Issuance Schedule
The ticket issuance system is designed for long-term sustainability:
* **Total Supply**: 100 million games over 132 years
* **Base Rate**: \~2,000 games issued per day
* **Duration**: Maximum issuance period of 132 years
* **Distribution**: Equal rate emission ensures predictable supply
#### Adaptive Issuance Mechanism
The protocol includes an automatic adjustment mechanism to maintain market balance:
* **Price Monitoring**: Contract continuously monitors ticket prices
* **Trigger Threshold**: If price falls below $1 for 3 consecutive days
* **Automatic Response**: Issuance rate halves to reduce supply pressure
* **Market Protection**: Helps maintain sustainable pricing over the long term
This adaptive system ensures that ticket supply responds to market conditions, protecting both players and the ecosystem from extreme price volatility while maintaining accessibility.
#### Governance Control
All key parameters of the dungeon ticket system are fully configurable by [SURVIVOR token](/lootsurvivor/token) holders through on-chain governance:
* **Issuance Parameters**: Emission rate, halving triggers, and total supply
* **Payment Tokens**: Which tokens are accepted for ticket purchases
* **Price Thresholds**: Adjustment triggers and response mechanisms
* **Distribution Ratios**: Revenue split between treasury and veLORDS
This decentralized control ensures the community can adapt the system to changing market conditions and player needs over time.
### What You Get
Each dungeon ticket provides:
#### 🐉 Beast Collection
* Access to collect unique [Beast NFTs](/lootsurvivor/beasts/collectibles)
* 85% of the total Beast supply still available in the Dungeon
* Each Beast is a unique, tradeable NFT
#### 💰 SURVIVOR Tokens
* Earn [SURVIVOR tokens](/lootsurvivor/token/tokenomics) based on your performance
* Tokens = level reached (starting at level 3)
* **Limited Time Boost**: 4x SURVIVOR rewards during weeks 2-4
#### 🎯 Wanted Beast Bounties
* Hunt [special Beasts](/lootsurvivor/beasts/wanted-beasts) with 100,000 STRK bounty (\~$15,000)
* Split equally between three legendary Beasts
* First adventurer to defeat each Beast claims their bounty
### How to Purchase
Dungeon tickets can be purchased with **any token** on Starknet - ETH, USDC, STRK, LORDS, and more. The system automatically handles the conversion, making it convenient regardless of what tokens you hold.
Purchase tickets with any token - the interface shows live pricing
#### Option 1: Direct Purchase
Purchase through the [Ekubo Protocol](https://app.ekubo.org) AMM at the live market price. This is the most direct method for experienced DeFi users. Select your preferred token and the system handles the swap automatically.
#### Option 2: Simple Checkout
Use [Cartridge](https://cartridge.gg) for easy entry with card/fiat payment. Perfect for newcomers to Web3 gaming. Credit card payments are converted seamlessly.
#### Pro Strategy: Dollar-Cost Averaging
The most efficient purchasing method is placing a DCA (Dollar-Cost Averaging) order through Ekubo:
* **Spread purchases over time** to smooth out price fluctuations
* **Often achieves better average price** than buying all at once
* **Automated execution** reduces manual effort
* Learn more: [Ekubo DCA Guide](https://docs.ekubo.org/user-guides/dollar-cost-average-orders)
Note on Token Flow: When you
purchase a ticket with any token, the protocol automatically converts it to
LORDS tokens. These LORDS are then distributed: 20% to veLORDS holders and 80%
used for SURVIVOR token buybacks, supporting both the Bibliotheca ecosystem
and the Survivor treasury.
### Revenue Distribution
All ticket proceeds are distributed transparently on-chain:
#### 80% → Survivor Treasury
* Automated [SURVIVOR token](/lootsurvivor/token) buybacks via TWAMM
* DAO-controlled treasury for ecosystem growth
* Governed by SURVIVOR token holders
* Pre-seeded at genesis for sustainability
#### 20% → veLORDS Holders
* Distributed to [veLORDS](https://realms.world) stakers
* Rewards the [Bibliotheca DAO](https://bibliothecadao.xyz) ecosystem
* Recognizes Bibliotheca as the original incubator
### Key Benefits
🎮 Beast Collection
Enter the dungeon and battle to collect unique Beast NFTs
💎 NFT Collection
Every [Beast](/lootsurvivor/beasts) is a unique, tradeable NFT with
varying rarity
📈 Token Rewards
Earn [SURVIVOR governance tokens](/lootsurvivor/token) based on your skill
🏆 Bounty Hunting
Chase [special Beasts](/lootsurvivor/beasts/wanted-beasts) for substantial
STRK rewards
### Frequently Asked Questions
#### When should I buy tickets?
With dynamic pricing, tickets can be cheaper during low-demand periods. Consider using DCA orders to spread your purchases over time.
#### How many games can I play with one ticket?
One ticket grants you one entry into the dungeon for a Beast collection attempt. Each dungeon run requires a new ticket.
#### Can ticket prices go down?
Yes! Unlike fixed-price models, our dynamic system allows prices to decrease when demand is low, creating opportunities for strategic buyers.
#### What happens to my ticket after use?
Each ticket is consumed when you enter the dungeon, regardless of the outcome. You'll need a new ticket for each dungeon run.
### Get Started
Ready to enter the Dungeon? Purchase your ticket at [lootsurvivor.io](https://lootsurvivor.io) and start your Beast hunting adventure today!
## Frequently Asked Questions
### General
**What is Loot Survivor?**
Loot Survivor is a fully onchain dungeon crawler RPG built on Starknet. Every action, from combat to loot generation, happens directly on the blockchain, making the game transparent, verifiable, and permanent.
**Is Loot Survivor free to play?**
Yes, Loot Survivor has a completely free game mode for players to practice their skills. For the full dungeon experience, a ticket is required which can be purchased directly through the game. No gas required.
**What do I need to play?**
* **Free Version:** No wallet, gas, or ticket required — just a modern browser (Chrome, Firefox, Safari, Edge).
* **Full Version:** A Cartridge Controller wallet (for VRF support) and a dungeon ticket purchased through the game. No gas fees.
**Is the game mobile-friendly?**
Yes. Loot Survivor has a fully responsive design with a dedicated mobile interface optimized for touch controls.
### Gameplay
**How do I start playing?**
Choose your game mode and click "New Game" to start exploring. See the [Getting Started Guide](/lootsurvivor/guide/getting-started) for detailed instructions.
**What happens when my adventurer dies?**
Death is permanent — your adventurer's journey ends but earned assets remain onchain forever. Start a new adventure anytime.
**Can I have multiple adventurers?**
Yes. Each adventurer is a separate onchain token with unique progression.
**How does combat work?**
Turn-based combat with rock-paper-scissors type advantages (plus or minus 50% damage). Each weapon/armor type beats one and loses to another. See: [Battle Guide](/lootsurvivor/guide/battle) and [Combat Mechanics](/lootsurvivor/combat).
**What are the different stats?**
Seven core stats: STR (damage), DEX (flee), VIT (HP), INT (obstacles), WIS (ambush), CHA (prices), LUCK (crits). Each affects combat and exploration differently. Full details: [Stats Guide](/lootsurvivor/stats).
**How do items work?**
5 tiers (T5 common to T1 legendary). Items level up and unlock suffixes (Lv15) and prefixes (Lv19+) for bonuses. See: [Loot Guide](/lootsurvivor/loot).
**What's the best strategy?**
No single best strategy. Focus on type advantages, stat balance, tactical decisions, and resource management. See: [Battle Guide](/lootsurvivor/guide/battle).
### Technical
**What blockchain is Loot Survivor on?**
Loot Survivor runs on Starknet, a Layer 2 scaling solution for Ethereum. Benefits include low fees (under $0.01 per transaction), fast confirmations (1-3 seconds), and Ethereum-level security.
**Are the game outcomes truly random?**
Uses VRF (Verifiable Random Function) seeds by default for true randomness. Can be configured to use deterministic seeds in settings.
**Can I verify the game logic?**
Yes. All contracts are open source and verified on Starknet. You can inspect the code on [GitHub](https://github.com/Provable-Games/death-mountain) and verify any game action onchain.
**How are gas fees kept low?**
Optimizations include packed storage, batch operations, and efficient algorithms, plus Starknet's L2 scaling benefits.
### Economic
**How does the market work?**
The in-game market refreshes when you level up, uses VRF seeds for item generation, and prices decrease with Charisma. No real money transactions between players.
**Can I trade items with other players?**
Currently, direct player-to-player trading is not implemented. All trading happens through the in-game market system.
**Are there rewards for playing?**
Yes. When you kill beasts during gameplay, you collect them and earn $SURVIVOR tokens on collection. [Budokan](/budokan) tournaments with prize pools are another way to earn rewards. Check [Discord](https://discord.gg/Q36rUxS66c) for current tournament info and schedules.
### Wallet & Account
**Which wallets are supported?**
For VRF ([Budokan](/budokan) tournament) mode, Cartridge Controller is required. For standard mode, any Starknet-compatible wallet works (Argent X, Braavos, etc.).
**I lost access to my wallet. Can I recover my adventurer?**
If you lose wallet access, you lose access to your adventurers. Always keep your recovery phrase secure and backed up.
**Can I play on multiple devices?**
Yes. Your adventurers are tied to your wallet address, not your device. Play from any device where you can access your wallet.
**Why do transactions sometimes fail?**
Common reasons include network congestion and wallet not being properly connected.
### Advanced
**Can I build on top of Loot Survivor?**
Yes. Loot Survivor is open source and designed to be composable. You can build custom frontends, create analytical tools, extend game mechanics, and integrate with other protocols.
**How do I integrate Loot Survivor into my app?**
See our [Integration Guide](/lootsurvivor/technical/integration) for detailed instructions on building with Loot Survivor's contracts.
**What's the maximum level?**
There is no hard level cap. The theoretical maximum depends on your ability to survive increasingly difficult challenges.
**How are beasts generated?**
Beasts are generated from VRF seeds based on your adventurer's level, a random seed value, and tier distribution tables. See: [Combat Mechanics](/lootsurvivor/combat).
**Can I predict market items?**
No. Market items use VRF seeds for true randomness (unless configured otherwise in settings).
### Troubleshooting
**The game won't load**
Try these steps: clear browser cache (Ctrl+Shift+Del), disable ad blockers (most common cause of wallet connection issues), try Chrome or Firefox, check [status.starknet.io](https://status.starknet.io), and ensure JavaScript is enabled.
**Transactions are stuck**
Wait for network congestion to clear, check block explorer, refresh page, or reconnect wallet. More help: [Getting Started Guide](/lootsurvivor/guide/getting-started).
**I can't connect my wallet**
Ensure correct controller login details, check network, refresh page, or try a different browser. Setup help: [Getting Started Guide](/lootsurvivor/guide/getting-started).
**The game shows incorrect data**
This is a sync issue. Refresh the page, clear cache, reconnect wallet, or wait for the indexer.
### Community
**How can I contribute?**
Report bugs on [GitHub](https://github.com/Provable-Games/death-mountain/issues), suggest features in Discord, build tools and integrations, or create content and guides.
**Where can I get help?**
* [Discord Community](https://discord.gg/Q36rUxS66c)
* [Twitter](https://twitter.com/lootsurvivor)
* [GitHub Discussions](https://github.com/Provable-Games/death-mountain/discussions)
**Are there tournaments?**
Yes. Regular tournaments with prize pools are held on [Budokan](/budokan), the permissionless tournament platform. Check Discord for announcements and schedules.
### Legal & Safety
**Is Loot Survivor audited?**
The smart contracts have not undergone an official audit yet. As with all blockchain applications, use at your own risk.
**Is this gambling?**
Loot Survivor is a skill-based game with random elements. The outcome depends on player decisions and strategy, not purely chance.
**What data is collected?**
Only onchain data (transactions, game actions) is recorded. No personal information is collected or stored off-chain.
**Can I lose money playing?**
You pay entry fees for certain game modes. Entry fees can be paid in any supported token. Never spend more than you can afford to lose.
### Getting More Help
If your question isn't answered here:
1. Check the [comprehensive guides](/lootsurvivor/guide)
2. Read the [technical documentation](/lootsurvivor/technical/architecture)
3. Ask in [Discord](https://discord.gg/Q36rUxS66c)
4. Open a [GitHub issue](https://github.com/Provable-Games/death-mountain/issues)
## Golden Token V2
### Overview
Golden Token V2 is the successor to the original Golden Token NFT collection on Starknet, modernized for full ecosystem compatibility and built entirely on-chain. V2 preserves the provenance of the original via a fully onchain airdrop while upgrading to modern standards and tooling.
V2 expands the collection by airdropping seven new ERC721 tokens to each of the 160 V1 holders, resulting in a total supply of 1,120. Each V2 token grants its holder one free Loot Survivor game per week, forever.
#### At a Glance
* **Supply**: 1,120 tokens (160 holders × 7 each)
* **Distribution**: Airdropped in seven rounds to current V1 holders at execution time
* **Compatibility**: OpenZeppelin ERC721 + ERC2981 on Cairo 2.11.4
* **Governance**: ERC721Votes for onchain voting and delegation
* **Metadata**: Fully on-chain JSON + SVG (no base URI, data URI returned)
* **Art**: Animated SVG instead of static PNG
V2 addresses early V1 limitations (pre-standard ERC721) by adopting modern standards and audited components, ensuring wallet/marketplace support, enforceable royalties, and native governance—while keeping the experience faithful to the original Golden Token vision.
### The Origin Story
The original Golden Tokens were launched on October 31st, 2023, alongside the inaugural release of Loot Survivor. In a true fair-launch fashion, Golden Tokens were made available through a three-week open edition mint with:
* ✅ No allowlist
* ✅ No mint limits
* ✅ No team allocation
* 💰 Cost: 75 games' worth of Loot Survivor
V1 Golden Tokens provided a simple utility: one free game of Loot Survivor per day. V2 Golden Tokens now provide one free game of Loot Survivor per week.
### V2: Technical Evolution & Enhanced Ecosystem
The original Golden Tokens were pioneering NFTs on Starknet, created before formal ERC721 specifications were available. This early adoption meant inconsistent compatibility - not all wallets, block explorers, and marketplaces properly support V1 tokens.
Golden Token V2 addresses these limitations while expanding the ecosystem:
#### Technical Improvements
* **Full ERC721 Compliance**: Built with OpenZeppelin 2.0.0 specifications for universal compatibility
* **Modern Cairo**: Upgraded to Cairo 2.11.4 from 2.1.0 Cairo contracts
* **Ecosystem Compatibility**: Full support across all Starknet wallets, explorers, and marketplaces
* **Onchain Governance**: Integrated ERC721Votes enables holders to formally express views through onchain voting
* **Enhanced Security**: Latest audited OpenZeppelin components with comprehensive security patterns
#### Ecosystem Enhancements
* **Increase Optionality**: Weekly games instead of daily, giving holders more flexibility
* **Expand Liquidity**: 7x supply increase (160 → 1,120 tokens) enables more trading and market activity
* **Preserve Legacy**: Original holders receive the entire V2 supply via airdrop
* **Maintain Exclusivity**: No public mint - only original holders can receive V2 tokens
### Key Differences from V1
| Feature | V1 | V2 |
| -------------- | --------------------- | ---------------------- |
| Cairo Version | Cairo 2.1.0 | Cairo 2.11.4 |
| ERC721 Spec | OpenZeppelin 0.7.0 | OpenZeppelin 2.0.0 |
| Wallet Support | Limited compatibility | Universal support |
| Voting | N/A | ERC721Votes integrated |
| Total Supply | 160 tokens | 1,120 tokens |
| Distribution | Open edition mint | Airdrop to V1 holders |
| Game Frequency | 1 free game/day | 1 free game/week |
| Launch Date | October 31, 2023 | September 5th, 2025 |
### Features
* 🎮 **Weekly Gaming Rights**: Each token grants one free Loot Survivor game per week in perpetuity
* 🪂 **Fair Airdrop System**: 7 rounds of airdrops, each distributing 160 tokens to original holders
* 🏛️ **Legacy Preservation**: Rewards early supporters with expanded holdings
* 🗳️ **Onchain Governance**: ERC721Votes enables formal onchain voting for ecosystem decisions
* 🔧 **Full Compatibility**: Works seamlessly with all Starknet wallets, explorers, and marketplaces
* 💰 **Creator Royalties**: 5% royalty on secondary sales via ERC2981 standard
* 🎨 **Fully Onchain**: All metadata and SVG artwork stored and generated onchain
* ⛓️ **Modern Standards**: Built with latest Cairo 2.11.4 and OpenZeppelin 2.0.0
### Technical Architecture
#### Smart Contract Components
The contract leverages battle-tested OpenZeppelin Cairo components:
* **ERC721Component**: Core NFT functionality with metadata extension
* **OwnableComponent**: Administrative access control
* **ERC2981Component**: NFT royalty standard implementation (5% on secondary sales)
* **VotesComponent**: Democratic governance through NFT-based voting
* **SRC5Component**: Interface detection for contract introspection
* **NoncesComponent**: Signature replay protection
#### Airdrop Mechanism
The V2 distribution occurs through a systematic airdrop process:
* **7 Rounds Total**: Each round airdrops 160 new tokens to match the original collection size
* **1:7 Ratio**: Each original Golden Token holder receives 7 V2 Golden Tokens
* **Owner Verification**: Tokens are airdropped to current holders at the time of execution. No snapshots, no merkle trees, no manual claims required
import { ContractTable } from "../../components/ContractTable";
import { Button } from "vocs/components";

## Loot Survivor
Loot Survivor is a fully onchain dungeon crawler RPG built on Starknet using the Dojo engine. Navigate through procedurally generated dungeons, battle fierce beasts, overcome deadly obstacles, and collect legendary loot in your quest for survival and glory. The items in the game are dervied from the Loot project.
### Overview
Death Mountain powers Loot Survivor - a token-agnostic, no-code onchain dungeon creator that provides a complete RPG experience. Every action, from combat to loot generation, is verifiable and deterministic on the blockchain.
#### Key Features
🗡️ Deep RPG Mechanics
7 core stats, 8 equipment slots, and level-based progression
👾 75 Unique Beasts
From lowly gnomes to mighty dragons, each with distinct behaviors
⚡ 75 Deadly Obstacles
Magical, sharp, and crushing hazards to overcome
💎 101 Unique Items
Tier-based loot system with evolving item powers
🏪 Dynamic Market
Charisma-based pricing and level rotating shop items
🎲 Verifiable Randomness
VRF integration for true randomness
⛓️ Fully Onchain
All game logic executed on Starknet
### Game Systems
#### Adventurer System
Create and develop your character with comprehensive RPG mechanics:
* **Stats**: Strength, Dexterity, Vitality, Intelligence, Wisdom, Charisma, Luck
* **Equipment**: Weapon, Chest, Head, Waist, Foot, Hand, Neck, Ring slots
* **Progression**: XP-based leveling with stat point allocation
* **Health**: Starting HP of 100, scalable with Vitality and replenished with potions.
#### Combat System
Engage in strategic turn-based combat against beasts:
* **Combat Types**: Weapon triangle system (Magical > Brute > Hunter > Magical)
* **Critical Hits**: Luck based strikes, grows with better Jewelry
* **Flee Mechanics**: Dexterity-based escape chances
#### Exploration
Navigate through dangerous dungeons:
* **Beasts**: Fight 75 different beast types with scaling difficulty
* **Obstacles**: 75 unique environmental hazards
* **Loot**: Find items, gold, and XP through exploration
* **Strategic Choices**: Decide when to fight, flee, or explore
#### Item System
Collect and upgrade powerful equipment:
* **Tier System**: T1 (Legendary) - T5 (Common) items with inverse pricing
* **Item Evolution**: Items gain "greatness" unlocking suffixes and prefixes
* **Special Powers**: 16 unique suffixes providing stat bonuses
* **Type Advantages**: Strategic equipment choices based on enemy types
### Documentation
#### 🎮 Getting Started
* [Game Modes](/lootsurvivor/game-modes) - Free vs. Full game modes
* [Getting Started Guide](/lootsurvivor/guide/getting-started) - Your first adventure
* [Dungeon Tickets](/lootsurvivor/dungeon-tickets) - Dynamic pricing and Beast Mode access
* [Golden Token](/lootsurvivor/golden-token) - Premium NFT collection for unlimited weekly gameplay
* [Settings](/lootsurvivor/settings) - Game configuration and VRF options
* [FAQ](/lootsurvivor/faq) - Frequently asked questions
#### ⚔️ Game Mechanics
* [Stats System](/lootsurvivor/stats) - Character attributes and progression
* [Combat Mechanics](/lootsurvivor/combat) - Damage calculations and formulas
* [Battle Guide](/lootsurvivor/guide/battle) - Combat tactics and interface
* [Exploration](/lootsurvivor/guide/explore) - Discovery and obstacles
* [Character Upgrade](/lootsurvivor/guide/upgrade) - Leveling and stat allocation
#### 🎒 Items & Creatures
* [Loot System](/lootsurvivor/loot) - Equipment, tiers, and bonuses
* [Jewelry](/lootsurvivor/loot/jewelry) - Rings, amulets, and accessories
* [Suffix Boosts](/lootsurvivor/loot/suffix-boost) - Item enhancement system
* [Prefixes](/lootsurvivor/loot/prefixes) - Complete prefix and suffix reference
* [Beasts](/lootsurvivor/beasts) - Combat types, tiers, and strategies
* [Beast Collectibles](/lootsurvivor/beasts/collectibles) - Achievement system
* [Wanted Beasts](/lootsurvivor/beasts/wanted-beasts) - Special bounties with STRK rewards
### Technical Resources
#### 🔧 Development & Contracts
* [Smart Contracts](/lootsurvivor/contracts) - Contract addresses and technical details
* [GitHub Repository](https://github.com/Provable-Games/death-mountain) - Source code and development
* [Dojo Engine](https://dojoengine.org/) - Framework powering the game
#### 🌐 Community
* [Discord Community](https://discord.gg/Q36rUxS66c) - Join the community
* [Twitter](https://twitter.com/lootsurvivor) - Latest updates and news
## Market System
The market is your lifeline in Loot Survivor, offering equipment upgrades and life-saving potions. Understanding pricing mechanics and market generation helps you make strategic purchasing decisions that can mean the difference between victory and defeat.
> **🛍️ Market Philosophy:** Every gold piece spent should advance your survival strategy!
### Market Overview
🏪 Market Mechanics
Duration: Same market persists for your entire level
Refresh: New randomly generated market on next level up
Purchases: Buy as many items as you can afford
Inventory: Limited to 15 bag slots + 8 equipped items
***
## Item Pricing
### Base Pricing System
💰 Equipment Pricing Formula
Base Price = Item Tier × 4
Tier
Base Price
With 10 CHA
With 20 CHA
T5 (Common)
20 gold
10 gold
1 gold (min)
T4
16 gold
6 gold
1 gold (min)
T3
12 gold
2 gold
1 gold (min)
T2
8 gold
1 gold (min)
1 gold (min)
T1 (Legendary)
4 gold
1 gold (min)
1 gold (min)
Charisma Discount: -1 gold per CHA point (minimum 1 gold)
💡 Important: All purchased items start at Greatness 1. A T1 item may initially be weaker than your leveled T5 equipment - you need to gain experience and level the item to unlock its full potential!
***
## Potion System
### Health Potions
🧪 Potion Mechanics
Health Restored: +10 HP per potion
Purchase Limit: Unlimited (buy as many as you can afford)
Price Formula:
Base Price = 1 gold × Adventurer Level
CHA Discount = 2 gold per CHA point
Final Price = Base - Discount (minimum 1 gold)
Check Everything: Scroll through entire market - gems might be at the bottom
Type Coverage: Prioritize items that give you type advantages
Empty Slots: Any armor is better than no armor
### Common Mistakes to Avoid
* **Overspending Early:** Don't buy everything just because you can
* **Ignoring CHA:** Even 3 CHA dramatically reduces T5 prices
* **Potion Neglect:** Always keep HP topped up between fights
***
## Summary
The market system rewards strategic planning and smart stat allocation. High Charisma turns the market into your personal armory, while understanding pricing helps you maximize every gold piece. Remember: the best deal is the item that keeps you alive!
**Key Market Principles:**
* Markets refresh on level up only
* CHA dramatically reduces all prices
* Potions scale with level but CHA discount is powerful
* Small markets mean bad RNG - work with what you get
* Every purchase should advance your survival strategy
## Platform Comparison
Loot Survivor delivers a consistent, high-quality gaming experience across all platforms. Whether you're at your desk or on the move, enjoy the same depth of gameplay with interfaces optimized for each device type.
### Desktop vs Mobile Experience
🎮 Same Core Experience
Both platforms offer identical gameplay mechanics, features, and progression systems. The differences lie in how the interface is presented and optimized for each device type.
✅ Same game mechanics and rules
✅ Identical stats, combat, and progression
✅ Full market and inventory systems
✅ Complete blockchain integration
✅ Cross-platform wallet compatibility
***
### Desktop Interface
Desktop interface showing AI-powered visuals and interactive gameplay
#### Desktop Advantages
🖥️ Full High-Resolution AI Visuals & Animations
Experience cutting-edge AI-powered graphics with detailed animations, rich visual effects, and immersive high-resolution artwork. Perfect for deep exploration sessions where visual fidelity enhances the adventure.
***
### Mobile Interface
Mobile pixel-art interface with fast-paced touch gameplay
#### Mobile Advantages
📱 Mobile-Friendly UI Where Speed is Priority
Streamlined pixel-art interface optimized for lightning-fast gameplay. Touch controls, instant responses, and efficient layouts ensure quick decision-making perfect for on-the-go adventures and rapid combat encounters.
***
### Choose Your Adventure
Both platforms offer the complete Loot Survivor experience with their own unique advantages. Whether you prefer the immersive desktop experience or the convenience of mobile gaming, your adventure awaits!
Ready to Start Playing?
Visit lootsurvivor.io on any device and begin your adventure into Death Mountain!
### Overview
$SKULL is an ERC20 token on Starknet that represents beast kills in Loot Survivor, created alongside [Summit](/summit). Every time one of your beasts kills an adventurer, you can claim 1 $SKULL. Currently, the only known use case for $SKULL is upgrading beasts in [Summit](/summit/beast-upgrades).
#### At a Glance
* **Standard**: ERC20 on Starknet
* **Supply**: Uncapped — minted continuously as adventurers are killed in Loot Survivor
* **Earning**: 1 $SKULL per adventurer killed by your beast
* **Current Use**: Beast upgrades in [Summit](/summit/beast-upgrades)
* **Contract Address**: TBA
### How to Earn $SKULL
$SKULL tokens are earned exclusively through [Loot Survivor](/lootsurvivor) gameplay:
* Own a beast NFT
* When an adventurer encounters your beast and is killed, you can claim **1 $SKULL**
* Tokens accumulate across all your beasts — every kill counts
The more beasts you own and the stronger they are (tier 1 beasts kill most adventurers), the more adventurers they'll defeat and the more $SKULL you'll accumulate.
#### Retroactive Claims
Beasts that haven't been minted yet may have already slain adventurers in Loot Survivor. Once you mint a beast, you can claim $SKULL for all of its past kills — meaning a newly minted beast could come with multiple $SKULL ready to claim.
### What $SKULL Is Used For
$SKULL is currently used in [Summit](/summit) to upgrade your beasts with attributes and abilities. See the [Beast Upgrades](/summit/beast-upgrades) guide for full details on available upgrades and costs.
### Token Economics
$SKULL creates a natural connection between Loot Survivor and Summit:
1. **Collect beasts** → Own beast NFTs through Loot Survivor gameplay or the [marketplace](https://beast-dex.vercel.app/marketplace)
2. **Beasts kill adventurers** → Earn $SKULL from kills in Loot Survivor
3. **Spend $SKULL in Summit** → Upgrade beasts → Compete for $SURVIVOR rewards
4. **Stronger beasts in Summit** → More $SURVIVOR earned → Greater ecosystem participation
Since $SKULL has no supply cap, the token continues to be minted as long as Loot Survivor is played. This means the upgrade economy grows alongside the player base — more players means more kills, more $SKULL, and more competition in Summit.
## Stats
Understanding and optimizing your adventurer's stats is crucial for survival in Loot Survivor. Each of the seven core stats plays a vital role in different aspects of gameplay, from combat effectiveness to market efficiency. Master stat allocation to create powerful builds tailored to your playstyle!
### Stats Overview
Every adventurer has **7 core stats** that define their capabilities:
* **Physical Stats**: Strength, Dexterity, Vitality
* **Mental Stats**: Intelligence, Wisdom, Charisma
* **Metaphysical**: Luck (special stat with unique mechanics)
Each Adventurer starts with 12 random stat points.
> **📈 Progression Note:** You gain 1 stat point per level to allocate freely, except for Luck which can only be increased through items!
### The Seven Core Stats
#### Physical Stats
##### 💪 Strength (STR)
* **Effect:** +10% attack damage per point
* **Formula:** `Damage = Base × (1 + STR/10)`
* Each point increases damage output by 10% with linear scaling and no cap
* Works with all weapon types
* **⚔️ Tip:** 10 STR = double damage!
##### 🏃 Dexterity (DEX)
* **Effect:** Improves flee success rate
* **Formula:** `Success% = (DEX / Level) × 100`
* Flee success depends on DEX/Level ratio
* Keep DEX equal to level for guaranteed escapes
* **🏃 Tip:** DEX = Level = 100% escape!
##### ❤️ Vitality (VIT)
* **Effect:** +15 HP per point (instant heal)
* **Formula:** `Max HP = 100 + (VIT × 15)`
* Increases maximum and current health
* Base health is 100 HP
* **Maximum health cap: 1023 HP**
* **🛡️ Tip:** VIT upgrades heal instantly!
#### Mental Stats
##### 🧠 Intelligence (INT)
* **Effect:** Avoids obstacle damage
* **Formula:** `Avoidance% = (INT / Level) × 100`
* Obstacle avoidance based on INT/Level ratio
* Keep INT equal to level for full immunity
* **🧠 Tip:** INT = Level = No obstacle damage!
##### 📚 Wisdom (WIS)
* **Effect:** Prevents ambush penalties
* **Formula:** `Evasion% = (WIS / Level) × 100`
* Avoids surprise attack penalties
* Also improves exploration rewards
* **👁️ Tip:** Avoids penalties, not the fight!
##### 😎 Charisma (CHA)
* **Effect:** Market discounts
* **Prices:** -1 gold/point for items, -2 gold/point for potions (min 1 gold)
* **Example:** 10 CHA = 10g off items, 20g off potions
* Makes late-game shopping nearly free
* **💰 Tip:** High CHA = nearly free shopping!
#### Metaphysical Stat
##### 🍀 Luck (LUCK)
* **The Special Stat** - Cannot be upgraded with points, only through equipment!
* **Effect:** Critical hit chance & better loot
* **Formula:** `Crit Chance = LUCK%` (caps at 100)
* **Critical Damage:** 2× base damage when triggered
* Determines critical hit probability and improves item discovery
* Get LUCK from jewelry items
* **🎰 Tip:** Stack jewelry for guaranteed crits!
⚠️ Warning: Dropping jewelry will remove LUCK stats equal to the greatness level of the item dropped!
***
### Suffix Boosts & Item Management
🏆 Enhanced Items
Items with Greatness 15+ gain powerful suffix boosts that provide additional stat bonuses beyond base equipment stats. See the Suffix Boost Guide for complete details on all available bonuses.
⚠️ Unequipping Items with Suffix Boosts
When you unequip items with suffix boosts, most stat bonuses are immediately removed from your adventurer. However, there are two important exceptions:
Vitality (VIT): Remains active even when the item is in your bag
Charisma (CHA): Remains active even when the item is in your bag
### Conclusion
Stats are the foundation of every successful adventurer in Loot Survivor. Whether you choose to be an unstoppable tank, a glass cannon dealing massive damage, or a nimble escape artist, understanding stat mechanics is key to survival. Remember: there's no single "best" build - the optimal stat distribution depends on your playstyle, the items you find, and your ability to adapt to the dungeon's challenges.
> **🏆 Final Thought:** The best stat allocation is one that keeps you alive and progressing. When in doubt, add VIT!
## Free Games Airdrop
### Overview
The Loot Survivor airdrop provides **free game entries** to eligible NFT holders and community members. These free games give players access to the LS2 Dungeon, which contains **2,258,100 SURVIVOR tokens** distributed as rewards based on gameplay performance.
### How It Works
#### Game-Based Distribution
Instead of receiving SURVIVOR tokens directly, eligible participants receive free game entries to play Loot Survivor. The LS2 Dungeon holds 2,258,100 SURVIVOR tokens that are distributed to players based on their performance:
* **Minimum Level 3**: Must reach at least level 3 to earn tokens
* **Tokens = Level Reached**: Starting at level 3, tokens equal to the level reached
* **Promotion Periods**: 4X tokens during weeks 2-4, 2X tokens after week 4
* **Performance-based rewards**: Higher levels mean more tokens
* **Multiple attempts**: Each free game entry is a new opportunity to earn tokens
#### Example Rewards
**Standard Rate (Week 1):**
* Level 3: 3 tokens
* Level 10: 10 tokens
* Level 25: 25 tokens
**4X Promotion (Weeks 2-4):**
* Level 10: 40 tokens
* Level 25: 100 tokens
**2X Promotion (After Week 4):**
* Level 10: 20 tokens
* Level 25: 50 tokens
### Eligibility Categories
#### NFT Collection Holders
Holders of eligible NFT collections receive free game entries based on their holdings at the snapshot date (August 18th, 2025 at 00:00 UTC). The number of free games is determined by:
* Collection
* Number of NFTs held
* Games Amount multiplier for each collection
[View all eligible collections →](/lootsurvivor/token/eligible-collections)
#### Community Contributors
Active community members earn free games through:
* Early participation in Loot Survivor v1
* Community building and content creation
* Bug reporting and testing
* Protocol development contributions
### Claiming Your Free Games
To claim your free game entries and start earning SURVIVOR tokens:
#### Visit the Claims Portal
Navigate to [claims.lootsurvivor.io](https://claims.lootsurvivor.io) to begin the claim process.

*Enter your wallet address to check your free games allocation*
#### What to Expect
1. **Enter Your Wallet Address** - Input your EVM or Starknet wallet address
2. **View Your Allocation** - See your total free games based on NFT holdings
3. **Connect/Create Controller** - Set up a controller for smooth claims process (can claim for multiple wallets)
4. **Claim Your Games** - Complete the claim for all eligible free games
5. **Start Playing** - Begin your adventure and earn SURVIVOR tokens (within 2 weeks)

*View your allocation and claim your free games*
*Connect multiple wallets to claim games from different eligible addresses*
#### Wallet Ownership Verification
For wallets that are not controllers (such as hardware wallets or EOA wallets):
1. **Sign a Message** - You'll be prompted to sign a message to prove ownership of your wallet
2. **Verification** - The signature verifies you own the NFTs from the snapshot
3. **Games Sent to Controller** - Once verified, your free games are sent to your controller wallet
4. **Play on Controller** - Use your controller wallet to play and earn SURVIVOR tokens

*Sign a message to verify ownership and claim games to your controller*
The claims portal automatically:
* Verifies your eligibility based on the August 18th, 2025 snapshot
* Calculates your total free games across all eligible collections
* Handles the entire claim process securely
* Provides access to start playing immediately
### Free Games Allocation
#### Calculation Method
Free games are allocated based on:
* **NFT Holdings**: Each eligible NFT grants games based on its collection's multiplier
* **Games Amount**: Collections have different game allocations
* **Total Cap**: Maximum 50 free games per eligible address
#### Distribution Examples
* **Loot Holder**: 5 free games per Loot NFT (capped at 50 total)
* **Pudgy Penguin Holder**: 10 free games per Penguin (capped at 50 total)
* **OGS Discord Role**: 10 free games for verified members
* **Multiple Collections**: Games stack across all eligible holdings (up to 50 max)
### Playing Your Free Games
#### Getting Started
1. Claim your free games at [claims.lootsurvivor.io](https://claims.lootsurvivor.io)
2. Access Loot Survivor gameplay interface
3. Start a new game using a free entry
4. Progress through levels to earn SURVIVOR tokens
#### Earning Tokens
* **Level 1-2**: No token rewards
* **Level 3+**: Earn tokens equal to the level reached (e.g., Level 3 = 3 tokens, Level 20 = 20 tokens)
* **Death**: Game ends, tokens earned are credited based on highest level reached
* **Strategy**: Plan your builds to maximize level progression for more tokens
#### Token Distribution
* When a game ends, a claim button appears
* Click the claim button to receive your earned tokens
* Track your total earnings across all games played
### Important Notes
#### 2-Week Expiration Period
* **Free games expire 2 weeks after the claim window opens**
* Plan your gameplay strategy within this timeframe
* Expired games cannot be recovered or extended
* All eligible addresses have the same expiration deadline
#### Gas Fees
* **All gas fees are covered** through our paymaster
* No ETH required for claiming free games
* No transaction fees for playing games
* Completely free experience from claim to gameplay
#### Fair Play
* Protected by onchain VRF (Verifiable Random Function)
* Anti-bot measures built into the smart contract
* Fully transparent and verifiable gameplay
### Strategy Tips
#### Maximize Your Earnings
* Study optimal builds before playing
* Join community discussions for strategies
* Use your free games before the 2-week window expires
#### Resource Management
* Free games are valuable opportunities
* Each game is a chance at significant token earnings
* Token rewards scale directly with level reached
* Community guides available for gameplay optimization
### Support
For assistance with free games:
* Visit the official documentation
* Join Discord for community strategies
* Check FAQs for common questions
* Submit support tickets for technical issues
### Disclaimer
Free game entries are distributed to reward early supporters and community members. The 2,258,100 SURVIVOR tokens in the LS2 Dungeon are distributed solely based on gameplay performance. Token earnings depend on individual skill and game progression.
## Eligible Collections for Free Games
The following NFT collections are eligible for **free game entries** to Loot Survivor, where players can earn SURVIVOR tokens through gameplay.
### Free Games Distribution
Eligible NFT holders receive free game entries based on their collection holdings at the snapshot date. These free games provide access to the LS2 Dungeon containing 2,000,000 SURVIVOR tokens. Players earn tokens equal to the level they reach (minimum level 3 required).
### Eligible Collections List
| Collection | Network | Collection Size | Free Games per NFT | View Contract |
| ----------------------- | -------- | --------------- | ------------------ | ------------------------------------------------------------------------------------------------------------- |
| 1337 Skulls | Ethereum | 7,331 | 5 | [Etherscan](https://etherscan.io/address/0x9251dec8df720c2adf3b6f46d968107cbbadf4d4) |
| Loot | Ethereum | 7,779 | 5 | [Etherscan](https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7) |
| Loot Explorers | Ethereum | 7,998 | 2 | [Etherscan](https://etherscan.io/address/0x508d06b8f3a4b0fd363239ce61e0c4b0b82f3626) |
| The Wild Bunch | Ethereum | 3,997 | 2 | [Etherscan](https://etherscan.io/address/0xe9a1a323b4c8fd5ce6842edaa0cd8af943cbdf22) |
| BAYC | Ethereum | 9,998 | 5 | [Etherscan](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d) |
| Dizzy Dragons | Ethereum | 9,401 | 2 | [Etherscan](https://etherscan.io/address/0x882A47e6070acA3f38Ce6929501F4787803A072b) |
| Hyperloot | Ethereum | 8,585 | 2 | [Etherscan](https://etherscan.io/address/0x0290d49f53a8d186973b82faafdafe696b29acbb) |
| LobsterDAO | Ethereum | 3,546 | 4 | [Etherscan](https://etherscan.io/address/0x026224a2940bfe258d0dbe947919b62fe321f042) |
| Moonbirds | Ethereum | 9,999 | 4 | [Etherscan](https://etherscan.io/address/0x23581767a106ae21c074b2276d25e5c3e136a68b) |
| Foxy PFP | Linea | 10,000 | 2 | [Lineascan](https://lineascan.build/address/0xe46c02315c4a991d061a06f165028f8c9167249b) |
| The Birth Lottery | Linea | 666 | 2 | [Lineascan](https://lineascan.build/address/0xc7e1c28dc11e43ebe93f2664a53ae3775eba68cc) |
| Genesis Mana | Ethereum | 11,535 | 2 | [Etherscan](https://etherscan.io/address/0xf4b6040a4b1b30f1d1691699a8f3bf957b03e463) |
| The Eye for Adventurers | Ethereum | 1,614 | 3 | [Etherscan](https://etherscan.io/address/0xb8a51862964f77025abb65e2c6a39ee8070c8ed4) |
| Genesis Adventurers | Ethereum | 633 | 5 | [Etherscan](https://etherscan.io/address/0x8db687aceb92c66f013e1d614137238cc698fedb) |
| Terraforms | Ethereum | 9,911 | 5 | [Etherscan](https://etherscan.io/address/0x4e1f41613c9084fdb9e34e11fae9412427480e56) |
| The Dudes | Ethereum | 512 | 3 | [Etherscan](https://etherscan.io/address/0xb0cf7da8dc482997525be8488b9cad4f44315422) |
| Crypts and Caverns | Ethereum | 8,785 | 2 | [Etherscan](https://etherscan.io/address/0x86f7692569914B5060Ef39aAb99e62eC96A6Ed45) |
| Trusta OG Dragons | Ethereum | 3,707 | 2 | [Etherscan](https://etherscan.io/address/0xe0e126ce63becbecd72bee4f7673b4e50d5a9965) |
| Wandernauts | Ethereum | 8,887 | 2 | [Etherscan](https://etherscan.io/address/0x793daf78b74aadf1eda5cc07a558fed932360a60) |
| Based Ghouls | Ethereum | 6,667 | 2 | [Etherscan](https://etherscan.io/address/0xef1a89cbfabe59397ffda11fc5df293e9bc5db90) |
| Pirate Nation | Ethereum | 9,999 | 3 | [Etherscan](https://etherscan.io/address/0x1b41d54b3f8de13d58102c50d7431fd6aa1a2c48) |
| Grugs Lair | Ethereum | 1,000 | 1 | [Etherscan](https://etherscan.io/address/0xfa9ed22ca5d329ecaee9347f72e18c1fc291471b) |
| Dope Wars | Ethereum | 7,999 | 3 | [Etherscan](https://etherscan.io/address/0x8707276df042e89669d69a177d3da7dc78bd8723) |
| Blobert | Starknet | 4,844 | 2 | [Voyager](https://voyager.online/contract/0x00539f522b29ae9251dbf7443c7a950cf260372e69efab3710a11bf17a9599f1) |
| Schizoid | Starknet | 999 | 3 | [Voyager](https://voyager.online/contract/0x077485a949c130cf0d98819d2b0749f5860b0734ea28cb678dd3f39379131bfa) |
| FOCG Boi Hands | Starknet | 39 | 2 | [Voyager](https://voyager.online/contract/0x02ef78f4031b4250e4ae8c4f0b18af4ef0cbbb405cdb20f80d1041b53aa2f1a1) |
| Brother ID | Starknet | 2,265 | 2 | [Voyager](https://voyager.online/contract/0x0212f1c57700f5a3913dd11efba540196aad4cf67772f7090c62709dd804fa74) |
| Realms | Starknet | 5,099 | 3 | [Voyager](https://voyager.online/contract/0x07ae27a31bb6526e3de9cf02f081f6ce0615ac12a6d7b85ee58b8ad7947a2809) |
| Banners (Ethereum) | Ethereum | 1,785 | 3 | [Etherscan](https://etherscan.io/address/0x527a4206ac04c2017295cf32f1fc2f9e034a7c40) |
| Banners (Starknet) | Starknet | 9,170 | 2 | [Voyager](https://voyager.online/contract/0x02d66679de61a5c6d57afd21e005a8c96118bd60315fd79a4521d68f5e5430d1) |
| Wolf Nation | Starknet | 333 | 3 | [Voyager](https://voyager.online/contract/0x0413485dbeccec6320d35dcba14375e7ca973f021486496a61286edb958fd861) |
| zKube | Starknet | 11,326 | 1 | [Voyager](https://voyager.online/contract/0x04fd5df500e6c6615e4423258639f189455672bc841ba58f1c781ac7c5ff4bd8) |
| Karats | Starknet | 512 | 2 | [Voyager](https://voyager.online/contract/0x07d8ea58612a5de25f29281199a4fc1f2ce42f0f207f93c3a35280605f3b8e68) |
| Karats 2 | Starknet | 512 | 2 | [Voyager](https://voyager.online/contract/0x030f694df2a04e04cf3e1d3e79dd5aadfdaa77295bb007696222fc60a5e8730d) |
| Ducks Everywhere | Starknet | 300 | 10 | [Voyager](https://voyager.online/contract/0x04fa864a706e3403fd17ac8df307f22eafa21b778b73353abf69a622e47a2003) |
| Pistols | Starknet | 126 | 5 | [Voyager](https://voyager.online/contract/0x014aa76e6c6f11e3f657ee2c213a62006c78ff2c6f8ed40b92c42fd554c246f2) |
| Influence Asteroids | Starknet | 11,726 | 1 | [Voyager](https://voyager.online/contract/0x0603cf837055c64d026a3c5a9e3a83036cea6c4a3f68a9e19f7a687d726fe817) |
| Starkurabu | Starknet | 10,000 | 1 | [Voyager](https://voyager.online/contract/0x03ab1124ef9ec3a2f2b1d9838f9066f9a894483d40b33390dda8d85c01a315a3) |
| Jokers Of Neon Beasts | Starknet | 104 | 5 | [Voyager](https://voyager.online/contract/0x07268fcf96383f8691b91ba758cc8fefe0844146f0557909345b841fb1de042f) |
| Based Punks | Base | 5,000 | 2 | [Basescan](https://basescan.org/address/0xcB28749c24AF4797808364D71d71539bc01E76d4) |
| OK Computer | Base | 5,000 | 2 | [Basescan](https://basescan.org/address/0xCE2830932889C7fB5e5206287C43554E673dCc88) |
| Blackmirror Experience | Base | 7,078 | 2 | [Basescan](https://basescan.org/address/0x108dB2038C6e8Bc1A0b058c70e752b14d08648BF) |
| re:generates | Base | 6,665 | 2 | [Basescan](https://basescan.org/address/0x56dFE6ae26bf3043DC8Fdf33bF739B4fF4B3BC4A) |
| Writ of Passage | Arbitrum | 10,000 | 2 | [Arbiscan](https://arbiscan.io/address/0x5d541B55763A9277f61a739f40B6021A16C2d3d8) |
| Liberty Cats | Polygon | 7,777 | 2 | [Polygonscan](https://polygonscan.com/address/0x0030F47D6a73Bc518CF18fE027Ea91DD6B2b6003) |
| Billions Genesis | Polygon | 2,999 | 2 | [Polygonscan](https://polygonscan.com/address/0xeCb63be05886749De33709835e824AEFcFd74f8F) |
| Pudgy Penguins | Ethereum | 8,888 | 10 | [Etherscan](https://etherscan.io/address/0xBd3531dA5CF5857e7CfAA92426877b022e612cf8) |
| The Larp Collective | Arbitrum | 420 | 2 | [Arbiscan](https://arbiscan.io/address/0x48D2c1716DFDF8aDd5a5EA658c460e7257448660) |
| ZTX Genesis Homes | Arbitrum | 3,999 | 2 | [Arbiscan](https://arbiscan.io/address/0x35373efc2FD7D852729cae869Cc32acc979100bD) |
| Forgotten Runes | Ethereum | 10,000 | 3 | [Etherscan](https://etherscan.io/address/0x521f9c7505005cfa19a8e5786a9c3c9c9f5e6f42) |
| Cool Cats | Ethereum | 10,000 | 3 | [Etherscan](https://etherscan.io/address/0x1a92f7381b9f03921564a437210bb9396471050c) |
| Bankr | Base | 1,000 | 10 | [Basescan](https://basescan.org/address/0x9fab8c51f911f0ba6dab64fd6e979bcf6424ce82) |
| Mee6 Genesis Pass | Ethereum | 4,444 | 3 | [Etherscan](https://etherscan.io/address/0xe9ab13482aeab3727e976257d8e1f026e12e9ecd) |
| Adventurers | Starknet | 10,638 | 1 | [Voyager](https://voyager.online/contract/0x018108b32cea514a78ef1b0e4a0753e855cdf620bc0565202c02456f618c4dc4) |
| OGS Discord Role | Starknet | - | 10 | Discord Verified |
### Understanding Free Games
#### How Free Games Work
The "Free Games per NFT" column shows how many free game entries each NFT from that collection grants. For example:
* Owning 1 Loot NFT = 5 free games
* Owning 2 Pudgy Penguins = 20 free games (10 per NFT)
* Holding multiple eligible NFTs = Games stack across all collections
* **Maximum 50 free games per address** regardless of total holdings
#### Token Earning Potential
Each free game is an opportunity to earn SURVIVOR tokens through gameplay:
* **Level 1-2**: No rewards (warm-up levels)
* **Level 3+**: Earn tokens equal to the level reached
* **Example**: Reaching level 3 earns 3 tokens, level 25 earns 25 tokens, level 50 earns 50 tokens
#### Multi-Chain Support
Eligible collections span multiple networks:
* **Ethereum** - The majority of legacy collections
* **Starknet** - Native Loot Survivor ecosystem collections
* **Base** - Emerging gaming communities
* **Arbitrum** - L2 gaming collections
* **Polygon** - Alternative L2 collections
* **Linea** - Next-generation gaming projects
### Collection Categories
#### Premium Allocations (10+ games)
Collections receiving the highest free game allocations:
* **Pudgy Penguins**: 10 games per NFT
* **Ducks Everywhere**: 10 games per NFT
* **Bankr**: 10 games per NFT
* **OGS Discord Role**: 10 games for verified members
#### Loot Ecosystem (5 games)
Original Loot-related collections with enhanced allocations:
* **Loot**: 5 games per NFT
* **Genesis Adventurers**: 5 games per NFT
* **1337 Skulls**: 5 games per NFT
* **BAYC**: 5 games per NFT
* **Terraforms**: 5 games per NFT
#### Standard Gaming Collections (2-4 games)
Most collections receive standard allocations:
* **2 games**: Common allocation for gaming NFTs
* **3 games**: Enhanced allocation for active communities
* **4 games**: Premium allocation for key partners
#### Entry Level (1 game)
Collections with base-level allocations:
* **Grugs Lair**: 1 game per NFT
* **Influence Asteroids**: 1 game per NFT
* **Starkurabu**: 1 game per NFT
* **Adventurers**: 1 game per NFT
* **zKube**: 1 game per NFT
### Snapshot Details
The eligibility snapshot was taken on **August 18th, 2025 at 00:00 UTC**. All NFT holdings and free game allocations are based on ownership at this specific point in time.
### Verification Process
To verify your free games allocation:
1. Check your NFT holdings as of August 18th, 2025 at 00:00 UTC
2. Calculate total free games: (NFTs held × Free Games per NFT)
3. Sum across all eligible collections you held
4. Apply the 50 free games per address maximum cap
5. Connect wallet to claim interface for automatic calculation
### Important Notes
* **Maximum 50 free games per eligible address**
* **Free games expire 2 weeks after the claim window opens** - Same deadline for all players
* Multiple NFTs from the same collection grant cumulative games (up to the 50 game cap)
* Transfers after the snapshot do not affect eligibility
* The OGS Discord Role requires Discord verification, not on-chain holdings
* Strategic gameplay can maximize token earnings from free games
## SURVIVOR Token
The SURVIVOR token is the native governance and economic coordination token for Loot Survivor, designed to decentralize the ownership role of the game contracts and promote the growth of the Loot Survivor ecosystem.
### Overview
* Total Supply: 10,000,000
* Distribution: 75% Community; 25% Team
* Lockups: None
* Contract: [`0x042dd777885ad2c116be96d4d634abc90a26a790ffb5871e037dd5ae7d2ec86b`](/lootsurvivor/contracts#governance-contracts)
### Purpose
SURVIVOR is the governance and economic coordination token for Loot Survivor.
Governance: SURVIVOR lets holders propose and vote on specific onchain parameters (e.g., which Dungeon the Beasts inhabit, royalty settings for the Beast NFT collection, Beast Mode settings, which ERC‑20s the Dungeon accepts, and the Dungeon’s payment token).
Autonomous treasury growth: When a player buys a Dungeon Ticket, immutable code automatically uses 80% of that payment to purchase SURVIVOR on a decentralized exchange and deposits the purchased tokens into the Survivor Treasury, which is governed by SURVIVOR holders.
No promises / no rights to payouts: SURVIVOR does not grant rights to profits, revenue, dividends, or distributions. The automated purchases are a mechanical feature of the contracts, not a commitment to support price or provide returns.
### Key Features
#### Decentralized Ownership Role
The SURVIVOR token ships with a fully onchain governance system, built on top of [OpenZeppelin’s audited governance components](https://docs.openzeppelin.com/contracts-cairo/2.0.0/governance). The governance system enables SURVIVOR token holders to express their will onchain and for their shared will to execute as an onchain transaction. This allows sensitive, configurable game settings,such as which Dungeon the Beasts are in, to be truly owned and controllable by the community instead of the developers.
The Survivor Governance Contract will control the following settings:
* [Beast NFT](https://voyager.online/nft-contract/0x0280ace0b2171106eaebef91ca9b097a566108e9452c45b94a7924a9f794ae80):
* Move Beasts to a new Dungeon
* Change royalty information (default: 5% distributed to the Survivor Treasury)
* [LS2 Beast Mode](https://voyager.online/contract/0x02fb722c25768e4a9994258754e7103895fd2f33cbcc1edc8711807950830cb5):
* Change Beast Mode settings
* Add and remove ERC‑20s from the Dungeon
* Change the payment token for the Dungeon
#### Economic Coordination
To support the sustainable growth of the Loot Survivor ecosystem, Loot Survivor ships with an autonomous and immutable SURVIVOR buy‑back mechanism. 80% of the proceeds from the sale of Dungeon Tickets, which are required to enter the Dungeon and collect Beasts, are used to purchase SURVIVOR tokens using Ekubo’s TWAMM and to deposit them into the Survivor Treasury. The remaining 20% is distributed to $veLORDS holders for the benefit of Bibliotheca DAO, the original incubator of Loot Survivor.
#### Treasury Bootstrap
The treasury is initially seeded with 1M SURVIVOR and approximately 3M LORDS at genesis.
#### SURVIVOR Sale (Programmatic DCA via TWAMM):
* Supply: 15% of total supply.
* Method: A 3‑month programmatic DCA order via TWAMM (Oct 15 – Jan 15).
* Proceeds: 100% contributed to the community treasury for ecosystem growth as governed onchain.
DISCLAIMERS: This sale is programmatic, there are no allocations, discounts, or price/return statements.
#### Community Allocation
75% of the total supply is allocated to the community through various distribution mechanisms, ensuring broad ownership and aligned incentives. Allocations include:
* 22.5% LS2 Dungeon claim allocations (FCFS)
* 1 Token per level starting at level 3
* 4X Promotion for games played during weeks 2-4
* 2X Promotion after week 4 till all tokens are claimed.
* 15% treasury bootstrap DCA
* 10% Survivor Treasury
* 9.3% Beast Entitlements (claim at mint)
* 6.6% LS1/LS1.5 Players
* 5% Loot Realms; 2.5% Loot; 1.5% 1337 Skulls; 1% Genesis Project; 1% Tournaments; 1% Beast Games
Note: NFT royalties, if any, are not guaranteed across marketplaces.
#### Free Games Airdrop
Loot Survivor launches with a two‑week launch promotion that makes \~500k free games available to \~80k addresses across Ethereum, Arbitrum, Base, Starknet, Abstract, Linea, and Polygon. Those holding select NFTs on these platforms will be able to claim free games (including gas), allowing them to play Loot Survivor and collect Beasts and SURVIVOR tokens.
### Quick Links
* [Tokenomics](/lootsurvivor/token/tokenomics) - Detailed breakdown of token distribution and allocations
* [Airdrop](/lootsurvivor/token/airdrop) - How to claim your SURVIVOR tokens and eligibility criteria
* [Eligible Collections](/lootsurvivor/token/eligible-collections) - NFT collections eligible for free games
### Security
Governance contracts use well‑known OpenZeppelin components. This is not a security audit; no system is risk‑free.
Game contracts are cutting‑edge and unaudited; use at your own risk.
### Disclaimers
The SURVIVOR token is designed to decentralize ownership and governance of the Loot Survivor protocol. It represents participation rights in the ecosystem and should not be considered a financial investment.
What SURVIVOR is not: SURVIVOR is not equity or debt. Automated purchases into the treasury are mechanical contract behavior, not price support or an offer of returns. Participation involves smart‑contract risk, market volatility, and governance outcomes that may not align with your preferences. Users should understand these risks before participating. Nothing here is investment advice.
## Tokenomics
### Total Supply
The total supply of the SURVIVOR token is **10,000,000** tokens, distributed between community and team allocations to ensure sustainable growth and development of the Loot Survivor ecosystem.
### Distribution Overview
| Category | Tokens | Percentage | Description |
| -------------------- | -------------- | ---------- | ----------------------------------- |
| **Community** | **7,500,000** | **75%** | |
| LS2 Dungeon | 2,258,100 | 22.58% | Gameplay rewards |
| Treasury DCA | 1,500,000 | 15% | 3-month programmatic sale via TWAMM |
| Survivor Treasury | 1,002,222 | 10.02% | DAO-controlled treasury |
| Beast Entitlements | 931,500 | 9.32% | Claim at Beast mint |
| Biblio (Loot Realms) | 500,000 | 5% | DAO Sponsor |
| Legacy Beast Bonus | 332,028 | 3.32% | LS1 Beast holder rewards |
| Top 1k LS1.5 Players | 326,150 | 3.26% | Top player rewards |
| Loot | 250,000 | 2.5% | DAO Sponsor |
| 1337 Skulls | 150,000 | 1.5% | 1337 Skulls |
| Genesis Project | 100,000 | 1% | DAO Sponsor |
| Budokan | 100,000 | 1% | Tournament Rewards |
| Summit | 100,000 | 1% | Beast Game Rewards |
| **Team** | **2,500,000** | **25%** | No lockups |
| **Total** | **10,000,000** | **100%** | |
### Distribution Breakdown
#### Community Allocation: 7,500,000 (75%)
The majority of SURVIVOR tokens are allocated to the community through various mechanisms designed to reward participation, contribution, and loyalty to the ecosystem.
##### LS2 Dungeon Rewards: 2,258,100 (22.58%)
* First-come, first-served distribution through gameplay
* Tokens equal to the level reached (starting at level 3)
* **4X Promotion**: Weeks 2-4 (multiply token rewards by 4)
* **2X Promotion**: After week 4 until all tokens claimed (multiply token rewards by 2)
##### Treasury Bootstrap DCA: 1,500,000 (15%)
* 3-month programmatic DCA order via TWAMM (Oct 15 - Jan 15)
* 100% of proceeds contributed to community treasury
* Ensures fair price discovery and broad distribution
##### Survivor Treasury: 1,002,222 (10.02%)
* DAO-controlled treasury for ecosystem development
* Initial seed funding at genesis
* Governed by SURVIVOR token holders
##### Beast Entitlements: 931,500 (9.32%)
* Auto-claimed with each Beast mint (average 10 tokens per Beast)
* Tier-based distribution:
* T1 Beasts: 14 tokens per mint
* T2 Beasts: 12 tokens per mint
* T3 Beasts: 10 tokens per mint
* T4 Beasts: 8 tokens per mint
* T5 Beasts: 6 tokens per mint
##### Legacy Players: 658,178 (6.58%)
* **Legacy Beast Bonus**: 332,028 (3.32%)
* LS1 Beasts (2,306 total): 249,048 tokens (108 per Beast)
* LS1.5 Beasts: 82,980 tokens (36 per Beast)
* **Top 1k LS1.5 Players**: 326,150 (3.26%) - Top player rewards
##### Ecosystem Allocations: 1,150,000 (11.5%)
* **Biblio (Loot Realms)**: 500,000 (5%) - Realms ecosystem development
* **Loot**: 250,000 (2.5%) - Distributed to multisig of trusted Loot ecosystem entities
* **1337 Skulls**: 150,000 (1.5%) - Distributed to multisig of trusted Skulls ecosystem entities
* **Genesis Project**: 100,000 (1%) - Distributed to multisig of trusted Genesis ecosystem entities
* **Budokan**: 100,000 (1%) - Player incentives for game-agnostic tournament platform
* **Summit**: 100,000 (1%) - Player incentives and utility for Beasts collected in Loot Survivor
#### Team Allocation: 2,500,000 (25%)
Reserved for the Loot Survivor team. This allocation aligns long-term incentives between the team and the ecosystem's success.
### Value Accrual Mechanisms
#### Governance Treasury
SURVIVOR token holders control the governance treasury, which consists of:
* Proceeds from the Treasury Bootstrap DCA (1.5M tokens sold over 3 months)
* 80% of proceeds from dungeon ticket purchases
* 1,002,222 SURVIVOR tokens from the Survivor Treasury allocation
* Initial seed of \~3M LORDS at genesis
These funds can be directed towards:
* Buyback and burns to distribute game revenue to token holders
* Development funding for new features
* Liquidity provision incentives
* Ecosystem partnerships and growth initiatives
#### Governance Rights
SURVIVOR token holders control:
* **Beast NFT Settings**:
* Move Beasts to new Dungeons
* Royalty settings (default 5% to Survivor Treasury)
* **LS2 Beast Mode**:
* Beast Mode configuration
* ERC-20 acceptance in Dungeons
* Dungeon payment token selection
* **Treasury Management**:
* Allocation of treasury funds
* Partnership approvals and funding
* Community initiative funding
### Distribution Schedule
#### Launch Distributions
* **Free Games Airdrop**: \~500k games to \~80k addresses (2-week claim window)
* **Beast Entitlements**: Claimable at Beast mint
* **LS1/LS1.5 Players**: Based on historical participation
#### Ongoing Distributions
* **LS2 Dungeon**: First-come, first-served through gameplay
* Week 1: Standard rate (tokens = level reached, starting at L3)
* Weeks 2-4: 4X promotion (standard rate × 4)
* After Week 4: 2X promotion until exhausted (standard rate × 2)
* **Treasury Bootstrap DCA**: 3-month programmatic sale (Oct 15 - Jan 15)
#### No Lockups
* All allocations are immediately liquid upon receipt
* No vesting schedules or lockup periods
* Team tokens have no restrictions
### Economic Sustainability
The tokenomics model is designed to create a self-sustaining ecosystem where:
* Players are rewarded for skill and participation
* Developers are incentivized to build on the platform
* Token holders benefit from ecosystem growth
* Protocol revenue supports ongoing development
This balanced approach ensures long-term viability while maintaining decentralization and community ownership.
## Technical Architecture
Loot Survivor is built on Starknet using the Dojo engine, implementing a fully onchain game architecture where all game logic, state management, and randomness are handled by smart contracts.
### Technology Stack
> **🏆 Excellence Standard:** Follow these practices for production-ready code!
### Conclusion
The Loot Survivor architecture demonstrates how complex game mechanics can be implemented fully onchain while maintaining performance and user experience. The modular design allows for easy extension and modification, making it an ideal foundation for blockchain gaming.
## Smart Contracts Documentation
This document provides detailed information about the Loot Survivor smart contracts, their interfaces, and how to interact with them.
### Contract Overview
Loot Survivor's smart contracts are written in Cairo and deployed on Starknet. The contracts follow a modular architecture using the Dojo framework's Entity-Component-System (ECS) pattern.
### Core Contracts
#### Game Contract
The main orchestrator managing the entire game flow.
**Address (Mainnet)**: `0xbcb2386436161d8d3afea0a805a8610ab90af5cf5582d866b83e9cb779bef3`
##### Key Functions
##### start\_game
```cairo
fn start_game(
client_reward_address: ContractAddress,
weapon_type: WeaponType,
name: felt252,
golden_token_id: u256,
interface_camel: bool
) -> u256
```
* Starts a new adventure
* Returns the adventurer ID
* Requires payment (ETH or LORDS)
##### explore
```cairo
fn explore(adventurer_id: u256, till_beast: bool)
```
* Explores the dungeon
* `till_beast`: Continue until beast encounter if true
* Triggers obstacles and discoveries
##### attack
```cairo
fn attack(adventurer_id: u256, to_the_death: bool)
```
* Attacks the current beast
* `to_the_death`: Fight until death if true
* Calculates damage and rewards
##### flee
```cairo
fn flee(
adventurer_id: u256,
to_the_death: bool
)
```
* Attempts to flee from combat
* Success based on Dexterity
* May take damage on failure
##### upgrade
```cairo
fn upgrade(
adventurer_id: u256,
stat_upgrades: Stats,
items_to_purchase: Array
)
```
* Allocates stat points
* Purchases items from market
* Called after leveling up
#### Adventurer Contract
Manages adventurer data and progression.
**Address (Mainnet)**: `0x3befa9c969bf82bbfa0a96374da9f7aab172101298c0ff2611ec8c2fd02692`
##### Data Structures
##### Adventurer
```cairo
struct Adventurer {
// Identity
id: u256,
owner: ContractAddress,
name: felt252,
// Progression
level: u8,
experience: u32,
// Health
health: u16,
max_health: u16,
// Resources
gold: u16,
// Stats
strength: u8,
dexterity: u8,
vitality: u8,
intelligence: u8,
wisdom: u8,
charisma: u8,
luck: u8,
// Equipment
weapon: Item,
chest: Item,
head: Item,
waist: Item,
foot: Item,
hand: Item,
neck: Item,
ring: Item,
// Inventory
bag: Bag,
// State
beast_id: u32,
stat_points_available: u8,
actions_per_block: u8,
mutated: bool,
}
```
##### Stats
```cairo
struct Stats {
strength: u8,
dexterity: u8,
vitality: u8,
intelligence: u8,
wisdom: u8,
charisma: u8,
luck: u8,
}
```
##### Key Functions
##### get\_adventurer
```cairo
fn get_adventurer(adventurer_id: u256) -> Adventurer
```
* Returns full adventurer data
* Read-only function (no gas)
##### get\_adventurer\_stats
```cairo
fn get_adventurer_stats(adventurer_id: u256) -> Stats
```
* Returns just the stats
* Useful for calculations
##### update\_adventurer
```cairo
fn update_adventurer(adventurer: Adventurer)
```
* Internal function
* Updates adventurer state
#### Beast Contract
Handles beast generation and combat.
**Address (Mainnet)**: `0x66744a5847c4459e019511f390ba8a8da53c5d25de8cd4e24e5f3e450c5d038`
##### Data Structures
##### Beast
```cairo
struct Beast {
id: u32,
beast_type: BeastType,
tier: Tier,
level: u8,
health: u16,
starting_health: u16,
special_abilities: SpecialAbilities,
}
```
##### BeastType Enum
```cairo
enum BeastType {
// Starter (T5)
Rat, Gnome, Goblin, Skeleton,
// Common (T4)
Wolf, Orc, Troll, Zombie,
DireWolf, Bear, Spider, Ghoul,
// Uncommon (T3)
Minotaur, Cyclops, Griffin, Vampire,
Manticore, Phoenix, Dragon, Lich,
// Rare (T2)
Balrog, Titan, Leviathan, Tarrasque,
Typhon, Fenrir, Hydra, Colossus,
// Legendary (T1)
// ... 75 total beasts
}
```
##### Key Functions
##### generate\_beast
```cairo
fn generate_beast(
seed: felt252,
adventurer_level: u8
) -> Beast
```
* Creates a new beast encounter
* Level scales with adventurer
* Deterministic based on seed
##### calculate\_damage
```cairo
fn calculate_damage(
attacker_strength: u8,
weapon_type: WeaponType,
beast_type: BeastType,
is_critical: bool
) -> u16
```
* Calculates combat damage
* Includes type advantages
* Critical hit multiplier
#### Loot Contract
Manages item generation and evolution.
**Address (Mainnet)**: `0x66744a5847c4459e019511f390ba8a8da53c5d25de8cd4e24e5f3e450c5d038`
##### Data Structures
##### Item
```cairo
struct Item {
id: u32,
item_type: ItemType,
tier: Tier,
slot: Slot,
// Evolution
level: u8,
greatness: u8,
// Special properties
prefix: Option,
suffix: Option,
// Stats
damage: u16,
armor: u16,
stat_bonuses: Stats,
}
```
##### ItemType Enum
```cairo
enum ItemType {
// Weapons
Blade, Bludgeon, Magic,
// Armor
Cloth, Hide, Metal,
// Accessories
Ring, Amulet, Pendant,
}
```
##### Tier Enum
```cairo
enum Tier {
T1, // Legendary (most expensive)
T2, // Rare
T3, // Uncommon
T4, // Common
T5, // Starter (cheapest)
}
```
##### Key Functions
##### generate\_item
```cairo
fn generate_item(
seed: felt252,
slot: Slot,
tier: Tier
) -> Item
```
* Creates a new item
* Deterministic generation
* Tier affects rarity
##### evolve\_item
```cairo
fn evolve_item(
item: Item,
xp_gained: u32
) -> Item
```
* Levels up an item
* Unlocks suffixes at level 15
* Unlocks prefixes at level 20
#### Market Contract
Handles the in-game marketplace.
##### Data Structures
##### Market
```cairo
struct Market {
seed: felt252,
items: Array,
potion_price: u16,
refreshed_at: u64,
}
```
##### MarketItem
```cairo
struct MarketItem {
item: Item,
price: u16,
stock: u8,
}
```
##### Key Functions
##### generate\_market
```cairo
fn generate_market(
seed: felt252,
adventurer_level: u8,
charisma: u8
) -> Market
```
* Creates market inventory
* Prices based on charisma
* Refreshes on level up
##### purchase\_item
```cairo
fn purchase_item(
market: Market,
item_id: u32,
adventurer_gold: u16
) -> (Market, u16)
```
* Processes item purchase
* Returns updated market and remaining gold
### Events
#### Combat Events
```cairo
#[event]
struct AttackEvent {
adventurer_id: u256,
beast_id: u32,
damage_dealt: u16,
damage_taken: u16,
is_critical: bool,
}
#[event]
struct BeastSlainEvent {
adventurer_id: u256,
beast_id: u32,
beast_type: BeastType,
gold_earned: u16,
xp_earned: u32,
items_dropped: Array,
}
#[event]
struct FleeAttemptEvent {
adventurer_id: u256,
beast_id: u32,
success: bool,
damage_taken: u16,
}
```
#### Progression Events
```cairo
#[event]
struct LevelUpEvent {
adventurer_id: u256,
new_level: u8,
stat_points_gained: u8,
}
#[event]
struct ItemLevelUpEvent {
adventurer_id: u256,
item_id: u32,
new_level: u8,
suffix_unlocked: Option,
prefix_unlocked: Option,
}
```
#### Market Events
```cairo
#[event]
struct ItemPurchasedEvent {
adventurer_id: u256,
item_id: u32,
price: u16,
}
#[event]
struct MarketRefreshedEvent {
adventurer_id: u256,
seed: felt252,
items_available: u8,
}
```
### Integration Examples
#### Starting a Game
```typescript
// TypeScript/JavaScript
const startGame = async () => {
const tx = await gameContract.start_game(
rewardAddress, // Address for rewards
WeaponType.Blade, // Starting weapon
"Adventurer", // Name
0, // Golden token ID (0 if none)
false // Interface camel case
);
const receipt = await tx.wait();
const adventurerId = receipt.events[0].adventurer_id;
return adventurerId;
};
```
#### Combat Loop
```typescript
const combatLoop = async (adventurerId: bigint) => {
// Attack until victory or death
const tx = await gameContract.attack(
adventurerId,
true // to_the_death
);
await tx.wait();
// Check if adventurer survived
const adventurer = await adventurerContract.get_adventurer(adventurerId);
if (adventurer.health === 0) {
console.log("Game Over!");
}
};
```
#### Upgrading After Level Up
```typescript
const upgrade = async (adventurerId: bigint) => {
const statUpgrades = {
strength: 1,
dexterity: 0,
vitality: 0,
intelligence: 0,
wisdom: 0,
charisma: 0,
luck: 0,
};
const itemsToPurchase = [
{ item_id: 123, equip: true },
{ item_id: 456, equip: false },
];
await gameContract.upgrade(
adventurerId,
statUpgrades,
itemsToPurchase
);
};
```
### Gas Optimization
#### Batch Operations
```cairo
// Efficient: Single transaction
fn batch_actions(actions: Array) {
for action in actions {
process_action(action);
}
}
// Inefficient: Multiple transactions
fn single_action(action: Action) {
process_action(action);
}
```
#### Storage Packing
```cairo
// Packed storage (efficient)
struct PackedAdventurer {
// Multiple values in single felt252
packed_stats: felt252,
packed_equipment: felt252,
}
// Unpacked storage (less efficient)
struct UnpackedAdventurer {
strength: u8,
dexterity: u8,
vitality: u8,
// ... each stat separate
}
```
### Security Considerations
#### Access Control
All contracts implement access control:
```cairo
#[external(v0)]
fn admin_function() {
assert_caller_is_admin();
// Admin logic
}
fn assert_caller_is_admin() {
let caller = get_caller_address();
assert(caller == ADMIN_ADDRESS, 'Unauthorized');
}
```
#### Input Validation
All user inputs are validated:
```cairo
fn validate_stat_upgrade(stats: Stats) {
let total = stats.strength + stats.dexterity + // ...
assert(total <= available_points, 'Invalid points');
assert(stats.strength <= MAX_STAT, 'Stat too high');
}
```
#### Reentrancy Protection
Critical functions use reentrancy guards:
```cairo
fn critical_function() {
assert(!is_locked(), 'Reentrant');
set_locked(true);
// Function logic
set_locked(false);
}
```
### Testing Contracts
#### Unit Tests
```cairo
#[test]
fn test_combat_damage() {
let damage = calculate_damage(
strength: 10,
weapon_type: WeaponType::Blade,
beast_type: BeastType::Goblin,
is_critical: false
);
assert(damage > 0, 'Damage should be positive');
}
```
#### Integration Tests
```cairo
#[test]
fn test_full_game_flow() {
let adventurer_id = start_game(...);
explore(adventurer_id, false);
attack(adventurer_id, false);
upgrade(adventurer_id, ...);
// Assert final state
}
```
### Contract Addresses
#### Mainnet Contracts
| Contract | Address |
| ---------- | ------------------------------------------------------------------- |
| Game | `0xbcb2386436161d8d3afea0a805a8610ab90af5cf5582d866b83e9cb779bef3` |
| Adventurer | `0x3befa9c969bf82bbfa0a96374da9f7aab172101298c0ff2611ec8c2fd02692` |
| Beast | `0x66744a5847c4459e019511f390ba8a8da53c5d25de8cd4e24e5f3e450c5d038` |
| Loot | `0x66744a5847c4459e019511f390ba8a8da53c5d25de8cd4e24e5f3e450c5d038` |
| Market | `0x1e1c477f2ef896fd638b50caa31e3aa8f504d5c6cb3c09c99cd0b72523f07f7` |
#### Testnet Contracts (Sepolia)
| Contract | Address |
| ---------- | -------------------------------- |
| Game | `0x[TESTNET_GAME_ADDRESS]` |
| Adventurer | `0x[TESTNET_ADVENTURER_ADDRESS]` |
| Beast | `0x[TESTNET_BEAST_ADDRESS]` |
| Loot | `0x[TESTNET_LOOT_ADDRESS]` |
| Market | `0x[TESTNET_MARKET_ADDRESS]` |
### ABI Documentation
Full ABI specifications are available in the generated files:
* `/contracts/target/dev/[contract_name].contract_class.json`
### Upgradeability
Contracts use the Dojo framework's upgrade system:
```cairo
#[starknet::contract]
mod UpgradeableContract {
#[external(v0)]
fn upgrade(new_class_hash: ClassHash) {
assert_caller_is_admin();
replace_class_syscall(new_class_hash);
}
}
```
### Best Practices
#### Reading Contract State
```typescript
// Always use view functions for reading
const adventurer = await contract.get_adventurer(id);
// These are free (no gas)
```
#### Writing to Contracts
```typescript
// Batch operations when possible
const tx = await contract.batch_actions([
action1,
action2,
action3,
]);
// Single transaction = less gas
```
#### Error Handling
```typescript
try {
const tx = await contract.attack(adventurerId, true);
await tx.wait();
} catch (error) {
if (error.message.includes('Dead adventurer')) {
// Handle game over
}
}
```
### Conclusion
The Loot Survivor smart contracts provide a robust, gas-efficient foundation for fully onchain gaming. The modular architecture allows for easy extension while maintaining security and performance.
## Integration Guide
This guide explains how to integrate with Loot Survivor, whether you're building a frontend client, creating tools, or extending the game with additional features.
### Quick Start
#### Prerequisites
* Node.js 18+ or your preferred runtime
* Starknet wallet or programmatic account
* Basic understanding of Starknet and Cairo
#### Installation
##### JavaScript/TypeScript
```bash
# Using npm
npm install starknet @dojoengine/core
# Using pnpm
pnpm add starknet @dojoengine/core
# Using yarn
yarn add starknet @dojoengine/core
```
##### Python
```bash
pip install starknet-py
```
### Setting Up Connection
#### Initialize Provider
```typescript
import { Provider, constants } from 'starknet';
// Mainnet
const provider = new Provider({
sequencer: {
network: constants.NetworkName.SN_MAIN,
},
});
// Testnet (Sepolia)
const provider = new Provider({
sequencer: {
network: constants.NetworkName.SN_SEPOLIA,
},
});
```
#### Contract Instances
```typescript
import { Contract } from 'starknet';
import GameABI from './abis/Game.json';
import AdventurerABI from './abis/Adventurer.json';
const GAME_ADDRESS = "0xbcb2386436161d8d3afea0a805a8610ab90af5cf5582d866b83e9cb779bef3";
const ADVENTURER_ADDRESS = "0x3befa9c969bf82bbfa0a96374da9f7aab172101298c0ff2611ec8c2fd02692";
const gameContract = new Contract(GameABI, GAME_ADDRESS, provider);
const adventurerContract = new Contract(AdventurerABI, ADVENTURER_ADDRESS, provider);
```
### Wallet Integration
#### Using StarknetKit
```typescript
import { connect, disconnect } from '@starknet-io/get-starknet';
const connectWallet = async () => {
const starknet = await connect({
modalMode: "alwaysAsk",
modalTheme: "dark",
});
if (!starknet?.isConnected) {
throw new Error("Failed to connect wallet");
}
return starknet;
};
```
#### Using Cartridge Controller
```typescript
import Controller from '@cartridge/controller';
const controller = new Controller({
policies: [
{
target: GAME_ADDRESS,
method: 'attack',
},
{
target: GAME_ADDRESS,
method: 'explore',
},
],
rpc: "https://api.cartridge.gg/x/starknet/mainnet",
});
await controller.connect();
```
### Reading Game State
#### Get Adventurer Data
```typescript
interface Adventurer {
id: bigint;
owner: string;
name: string;
level: number;
health: number;
gold: number;
experience: number;
stats: Stats;
equipment: Equipment;
}
const getAdventurer = async (adventurerId: bigint): Promise => {
const result = await adventurerContract.get_adventurer(adventurerId);
return {
id: result.id,
owner: result.owner,
name: result.name,
level: Number(result.level),
health: Number(result.health),
gold: Number(result.gold),
experience: Number(result.experience),
stats: parseStats(result.stats),
equipment: parseEquipment(result.equipment),
};
};
```
#### Get Current Beast
```typescript
const getCurrentBeast = async (adventurerId: bigint) => {
const beast = await gameContract.get_current_beast(adventurerId);
if (!beast) return null;
return {
id: beast.id,
type: beast.beast_type,
level: Number(beast.level),
health: Number(beast.health),
maxHealth: Number(beast.starting_health),
};
};
```
#### Get Market Items
```typescript
const getMarketItems = async (adventurerId: bigint) => {
const market = await gameContract.get_market(adventurerId);
return market.items.map(item => ({
id: item.id,
name: item.name,
type: item.item_type,
tier: item.tier,
price: Number(item.price),
slot: item.slot,
}));
};
```
### Writing Transactions
#### Starting a Game
```typescript
const startAdventure = async (
account: Account,
weaponType: number,
name: string
) => {
const tx = await account.execute({
contractAddress: GAME_ADDRESS,
entrypoint: 'start_game',
calldata: [
account.address, // reward address
weaponType, // 0: Blade, 1: Bludgeon, 2: Magic
name, // adventurer name
0, // golden token (0 if none)
0, // interface camel case (0 for snake)
],
});
const receipt = await provider.waitForTransaction(tx.transaction_hash);
// Extract adventurer ID from events
const adventurerId = extractAdventurerIdFromEvents(receipt.events);
return adventurerId;
};
```
#### Combat Actions
```typescript
// Attack beast
const attack = async (
account: Account,
adventurerId: bigint,
tillDeath: boolean = false
) => {
const tx = await account.execute({
contractAddress: GAME_ADDRESS,
entrypoint: 'attack',
calldata: [
adventurerId.toString(),
tillDeath ? 1 : 0,
],
});
return await provider.waitForTransaction(tx.transaction_hash);
};
// Flee from combat
const flee = async (
account: Account,
adventurerId: bigint
) => {
const tx = await account.execute({
contractAddress: GAME_ADDRESS,
entrypoint: 'flee',
calldata: [
adventurerId.toString(),
0, // to_the_death
],
});
return await provider.waitForTransaction(tx.transaction_hash);
};
```
#### Exploration
```typescript
const explore = async (
account: Account,
adventurerId: bigint,
tillBeast: boolean = false
) => {
const tx = await account.execute({
contractAddress: GAME_ADDRESS,
entrypoint: 'explore',
calldata: [
adventurerId.toString(),
tillBeast ? 1 : 0,
],
});
return await provider.waitForTransaction(tx.transaction_hash);
};
```
#### Upgrading
```typescript
interface StatUpgrade {
strength: number;
dexterity: number;
vitality: number;
intelligence: number;
wisdom: number;
charisma: number;
luck: number;
}
interface ItemPurchase {
item_id: number;
equip: boolean;
}
const upgrade = async (
account: Account,
adventurerId: bigint,
stats: StatUpgrade,
items: ItemPurchase[]
) => {
const calldata = [
adventurerId.toString(),
// Stats (must sum to available points)
stats.strength,
stats.dexterity,
stats.vitality,
stats.intelligence,
stats.wisdom,
stats.charisma,
stats.luck,
// Items array
items.length,
...items.flatMap(i => [i.item_id, i.equip ? 1 : 0]),
];
const tx = await account.execute({
contractAddress: GAME_ADDRESS,
entrypoint: 'upgrade',
calldata,
});
return await provider.waitForTransaction(tx.transaction_hash);
};
```
### Event Listening
#### Setting Up Event Listeners
```typescript
import { events } from 'starknet';
const subscribeToEvents = (adventurerId: bigint) => {
// Listen for combat events
gameContract.on('AttackEvent', (event) => {
if (event.adventurer_id === adventurerId) {
console.log('Attack:', {
damage_dealt: event.damage_dealt,
damage_taken: event.damage_taken,
is_critical: event.is_critical,
});
}
});
// Listen for level up
gameContract.on('LevelUpEvent', (event) => {
if (event.adventurer_id === adventurerId) {
console.log('Level Up! New level:', event.new_level);
}
});
// Listen for death
gameContract.on('AdventurerDiedEvent', (event) => {
if (event.adventurer_id === adventurerId) {
console.log('Game Over! Final level:', event.level);
}
});
};
```
#### Processing Historical Events
```typescript
const getAdventurerHistory = async (adventurerId: bigint) => {
const events = await provider.getEvents({
address: GAME_ADDRESS,
from_block: { block_number: 0 },
to_block: 'latest',
keys: [[adventurerId.toString()]],
chunk_size: 100,
});
return events.events.map(parseEvent);
};
```
### Using Torii Indexer
#### GraphQL Queries
```typescript
const TORII_URL = "https://api.cartridge.gg/x/lootsurvivor/torii/graphql";
const query = `
query GetAdventurer($id: String!) {
adventurer(id: $id) {
id
owner
level
health
gold
experience
stats {
strength
dexterity
vitality
intelligence
wisdom
charisma
luck
}
}
}
`;
const fetchAdventurerData = async (adventurerId: string) => {
const response = await fetch(TORII_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
query,
variables: { id: adventurerId },
}),
});
const data = await response.json();
return data.data.adventurer;
};
```
#### WebSocket Subscriptions
```typescript
import { createClient } from 'graphql-ws';
const client = createClient({
url: 'wss://api.cartridge.gg/x/lootsurvivor/torii/ws',
});
const subscription = `
subscription OnAdventurerUpdate($id: String!) {
adventurerUpdated(id: $id) {
id
level
health
gold
}
}
`;
client.subscribe(
{
query: subscription,
variables: { id: adventurerId },
},
{
next: (data) => console.log('Update:', data),
error: (err) => console.error('Error:', err),
complete: () => console.log('Subscription complete'),
}
);
```
### Building Custom Frontends
#### React Hook Example
```typescript
import { useState, useEffect } from 'react';
const useAdventurer = (adventurerId: bigint) => {
const [adventurer, setAdventurer] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
const fetchData = async () => {
try {
setLoading(true);
const data = await getAdventurer(adventurerId);
setAdventurer(data);
} catch (err) {
setError(err);
} finally {
setLoading(false);
}
};
fetchData();
// Set up event listeners
const unsubscribe = subscribeToAdventurerUpdates(
adventurerId,
setAdventurer
);
return unsubscribe;
}, [adventurerId]);
return { adventurer, loading, error };
};
```
#### State Management
```typescript
import { create } from 'zustand';
interface GameStore {
adventurer: Adventurer | null;
beast: Beast | null;
market: MarketItem[];
setAdventurer: (adventurer: Adventurer) => void;
setBeast: (beast: Beast) => void;
setMarket: (items: MarketItem[]) => void;
attack: () => Promise;
flee: () => Promise;
explore: () => Promise;
}
const useGameStore = create((set, get) => ({
adventurer: null,
beast: null,
market: [],
setAdventurer: (adventurer) => set({ adventurer }),
setBeast: (beast) => set({ beast }),
setMarket: (market) => set({ market }),
attack: async () => {
const { adventurer } = get();
if (!adventurer) return;
const result = await attackBeast(adventurer.id);
// Update state based on result
},
// ... other actions
}));
```
### Building Game Tools
#### Leaderboard API
```typescript
const getLeaderboard = async (limit = 100) => {
const query = `
query GetLeaderboard($limit: Int!) {
adventurers(
orderBy: "level",
orderDirection: "desc",
limit: $limit
) {
id
owner
name
level
gold
timestamp
}
}
`;
const response = await fetch(TORII_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
query,
variables: { limit },
}),
});
const data = await response.json();
return data.data.adventurers;
};
```
#### Statistics Tracker
```typescript
const getPlayerStats = async (playerAddress: string) => {
const query = `
query GetPlayerStats($owner: String!) {
adventurers(where: { owner: $owner }) {
id
level
gold
experience
timestamp
died_at
}
}
`;
const response = await fetch(TORII_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
query,
variables: { owner: playerAddress },
}),
});
const data = await response.json();
// Calculate statistics
const adventures = data.data.adventurers;
return {
totalAdventures: adventures.length,
highestLevel: Math.max(...adventures.map(a => a.level)),
totalGold: adventures.reduce((sum, a) => sum + a.gold, 0),
averageLevel: adventures.reduce((sum, a) => sum + a.level, 0) / adventures.length,
};
};
```
### Error Handling
#### Common Errors
```typescript
const handleGameAction = async (action: () => Promise) => {
try {
const result = await action();
return { success: true, data: result };
} catch (error) {
// Handle specific errors
if (error.message.includes('Adventurer is dead')) {
return { success: false, error: 'GAME_OVER' };
}
if (error.message.includes('Insufficient gold')) {
return { success: false, error: 'INSUFFICIENT_FUNDS' };
}
if (error.message.includes('Invalid stat allocation')) {
return { success: false, error: 'INVALID_STATS' };
}
// Generic error
return { success: false, error: error.message };
}
};
```
#### Retry Logic
```typescript
const retryWithBackoff = async (
fn: () => Promise,
maxRetries = 3,
delay = 1000
) => {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (i === maxRetries - 1) throw error;
await new Promise(resolve => setTimeout(resolve, delay * (i + 1)));
}
}
};
```
### Testing Integration
#### Unit Tests
```typescript
import { describe, it, expect } from 'vitest';
describe('Game Integration', () => {
it('should start a new game', async () => {
const adventurerId = await startAdventure(
mockAccount,
WeaponType.Blade,
'Test Hero'
);
expect(adventurerId).toBeGreaterThan(0n);
});
it('should handle combat', async () => {
const result = await attack(mockAccount, adventurerId);
expect(result.status).toBe('ACCEPTED');
});
});
```
#### Integration Tests
```typescript
describe('Full Game Flow', () => {
it('should complete a full game cycle', async () => {
// Start game
const id = await startAdventure(account, 0, 'Hero');
// Explore
await explore(account, id, false);
// Combat
const beast = await getCurrentBeast(id);
if (beast) {
await attack(account, id, false);
}
// Check state
const adventurer = await getAdventurer(id);
expect(adventurer.experience).toBeGreaterThan(0);
});
});
```
### Performance Optimization
#### Caching Strategy
```typescript
class GameCache {
private cache = new Map();
private ttl = 5000; // 5 seconds
async get(key: string, fetcher: () => Promise) {
const cached = this.cache.get(key);
if (cached && Date.now() - cached.timestamp < this.ttl) {
return cached.data;
}
const data = await fetcher();
this.cache.set(key, { data, timestamp: Date.now() });
return data;
}
}
const cache = new GameCache();
const getCachedAdventurer = (id: bigint) =>
cache.get(`adventurer:${id}`, () => getAdventurer(id));
```
#### Batch Requests
```typescript
const batchGetAdventurers = async (ids: bigint[]) => {
const promises = ids.map(id => getAdventurer(id));
return await Promise.all(promises);
};
```
### Security Best Practices
#### Input Validation
```typescript
const validateAdventurerId = (id: any): bigint => {
if (typeof id !== 'bigint' && typeof id !== 'string') {
throw new Error('Invalid adventurer ID type');
}
const bigIntId = BigInt(id);
if (bigIntId <= 0n) {
throw new Error('Adventurer ID must be positive');
}
return bigIntId;
};
```
#### Rate Limiting
```typescript
class RateLimiter {
private requests = new Map();
private limit = 10; // requests per second
canMakeRequest(key: string): boolean {
const now = Date.now();
const requests = this.requests.get(key) || [];
// Remove old requests
const recent = requests.filter(t => now - t < 1000);
if (recent.length >= this.limit) {
return false;
}
recent.push(now);
this.requests.set(key, recent);
return true;
}
}
```
### Conclusion
This integration guide provides the foundation for building applications that interact with Loot Survivor. Whether you're creating a custom frontend, building tools, or extending the game, these patterns and examples will help you get started quickly and build robust integrations.
## Loot System
The loot system in Loot Survivor is inspired by the original Loot collection and forms the backbone of your adventurer's power progression.
Understanding how items work, their tiers, and special properties is essential
for survival in Death Mountain. Each piece of equipment can evolve and gain
powerful bonuses as you progress through the dangerous depths.
Loot item display showing tier and special properties
### Item Properties
Each item has several key properties that determine its effectiveness:
* **Tier** - Base power level (T1-T5)
* **Greatness** - Special enhancement level (0-20)
* **Suffix** - Name suffix at Greatness 15+
* **Prefixes** - Additional bonuses at Greatness 19+
* **+1 Modifier** - +1 modifier at Greatness 20
### Item Tiers
Items in Loot Survivor are categorized into 5 tiers, with T1 being the most powerful:
| Tier | Name | Rarity | Base Power | Drop Rate | Description |
| ------ | --------- | --------- | ------------- | --------- | ------------------------------------------ |
| **T1** | Legendary | Highest | 5× multiplier | \~0.066% | Best-in-slot items with maximum base stats |
| **T2** | Epic | Very High | 4× multiplier | \~0.2% | Powerful items with excellent stats |
| **T3** | Rare | High | 3× multiplier | \~0.4% | Good equipment with solid performance |
| **T4** | Uncommon | Medium | 2× multiplier | \~1.0% | Decent upgrades over starting gear |
| **T5** | Common | Low | 1× multiplier | \~1.65% | Basic gear and starting equipment |
**Tier Effects:**
* Higher tiers provide better base damage/protection
* Tier multiplier affects combat calculations
* Better tiers are more likely to have special properties
* All tiers can potentially have suffixes and prefixes
***
**🎮 Loot Survivor Implementation Note:**
Everything below this point represents **Loot Survivor's unique interpretation** of the original Loot collection. The Greatness System, combat types, materials, and their gameplay mechanics are specific to this game's implementation and not part of the base Loot specification.
## Greatness System
Greatness is a special property that enhances items beyond their base tier:
### Greatness Levels
| Greatness | Enhancement | Special Property |
| --------- | --------------- | -------------------------- |
| **1-14** | Base item | Standard tier bonuses only |
| **15** | Suffix unlocked | +3 stat bonus from suffix |
| **16-18** | Enhanced suffix | Suffix bonuses continue |
| **19** | Prefix unlocked | Additional stat bonuses |
| **20** | Stat Bonus | +1 assignable stat bonus |
### How Greatness Works
* Items always start at greatness 1
* Greatness increases the item's overall power
* Greatness 15+ items gain [suffix bonuses](/lootsurvivor/loot/suffix-boost)
* Greatness 19+ items gain additional prefix [prefixes](/lootsurvivor/loot/prefixes)
* Greatness 20 items get a +1 stat modifier
***
## Equipment Types
Loot Survivor features 8 equipment slots for different item types:
| Equipment Slot | Item Types | Function |
| -------------- | ------------------------------------- | -------- |
| **Weapon** | Katana, Wand, Club, Short Sword | Weapon |
| **Chest** | Divine Robe, Shirt, Demon Husk | Armor |
| **Head** | Crown, Cap, Helm | Armor |
| **Waist** | Ornate Belt, Sash, Heavy Belt | Armor |
| **Foot** | Divine Slippers, Boots, Shoes | Armor |
| **Hand** | Divine Gloves, Gloves, Gauntlets | Armor |
| **Neck** | Amulet, Pendant, Necklace | Jewelry |
| **Ring** | Platinum Ring, Gold Ring, Silver Ring | Jewelry |
***
## Combat Types & Materials
Items have dual classifications that affect combat performance:
### Weapon Types
**⚔️ Blade Weapons**
* Strong vs Hide armor
* Weak vs Metal armor
* Examples: Katana, Short Sword, Scimitar
**🔨 Bludgeon Weapons**
* Strong vs Metal armor
* Weak vs Cloth armor
* Examples: Club, Mace, Warhammer
**✨ Magic Weapons**
* Strong vs Cloth armor
* Weak vs Hide armor
* Examples: Wand, Book, Ghost Wand
### Armor Materials
**🛡️ Hide Armor**
* Resists Blade attacks
* Weak to Magic attacks
* Examples: Leather armor, Dragon skin
**⚡ Metal Armor**
* Resists Bludgeon attacks
* Weak to Blade attacks
* Examples: Chain mail, Plate armor
**🧙 Cloth Armor**
* Resists Magic attacks
* Weak to Bludgeon attacks
* Examples: Robes, Shirts
***
## Item Acquisition
### Discovery Methods
Items can be obtained through several methods:
| Method | Rate | Quality | Notes |
| ---------------------- | ------------------- | ----------- | ------------------------------- |
| **Exploration** | 3.3% of explores | Random tier | Primary acquisition method |
| **Market Purchase** | Level-dependent | Variable | Costs gold, refresh on level up |
| **Starting Equipment** | 1 weapon guaranteed | T5 only | Random weapon type |
### Market System
* Market refreshes completely on each level up
* Available items are randomly generated
* Item count increases with adventurer level
* CHA stat reduces purchase prices
* Market items follow same tier distribution as drops
***
## Item Management
### Inventory System
* **8 Equipment Slots** - One for each equipment type
* **15 Bag Slots** - Additional storage for backup items
* **Auto-equip** - New items automatically equip if slots are empty
* **Gold Conversion** - Duplicate items convert to gold if no space
### Item Usage
**Equipping Items:**
* Drag from bag to equipment slot
* Items provide immediate stat bonuses
* Combat type/material affects battle performance
* Can switch equipment during exploration (not in combat)
**Item Stacking:**
* Only one item per equipment slot
* Identical items convert to gold
* Higher tier items typically replace lower tier
* Consider suffix/prefix bonuses when deciding
***
## Special Properties
### Suffixes
Items with Greatness 15+ gain powerful suffix bonuses. See [Suffix Boost Guide](/lootsurvivor/loot/suffix-boost) for complete details.
### Prefixes
Items with Greatness 19+ gain additional prefix bonuses that stack with suffix effects. These same prefixes are also used for named beasts in Beast Mode NFTs.
**Complete Prefix & Suffix Reference:** See [Prefixes Guide](/lootsurvivor/loot/prefixes) for the full library of all 69 prefixes and 18 suffixes.
***
## Summary
The loot system provides deep character customization through equipment choices, tier progression, and special properties. Understanding how tiers, greatness, suffixes, and prefixes work together allows you to build powerful adventurers capable of surviving Death Mountain's greatest challenges.
**Key Loot Principles:**
* Higher tiers provide better base power
* Greatness 15+ items gain significant suffix bonuses
* Greatness 19+ items gain additional prefix bonuses
* Combat type and material matter for battle effectiveness
* Market refreshes provide new acquisition opportunities each level
## Jewelry Items
Jewelry items increase the Adventurer's Luck, which is directly proportional to their critical hit chance.
20 Luck = 20% chance of a critical hit.
100 Luck = 100% chance of a critical hit.
The total Luck the Adventurer receives from their jewelry is equal to the total level of all their jewelry, both equipped and in their bag. For example, if you have a level 20 Bronze Ring in your bag and a level 20 Gold Ring equipped, your Luck will be 40.
It is possible to achieve 100 Luck and therefore a 100% critical hit chance with enough jewelry items.
Jewelry items also provide special abilities, but those only apply when they are equipped. Those special abilities are:
| Item | Boost |
| ------------- | ------------------------------------------ |
| Pendant | 3% increase per level hide armor defence. |
| Necklace | 3% increase per level metal armor defence. |
| Amulet | 3% increase per level cloth armor defence. |
| Bronze Ring | No special ability (economy option). |
| Silver Ring | +1 bonus luck per level. |
| Gold Ring | 3% per level in gold rewards from beasts. |
| Platinum Ring | 3% per level in name match damage bonus. |
| Titanium Ring | 3% per level in critical hit damage bonus. |
## Item & Beast Prefixes
Prefixes are special name modifiers that appear on high-greatness items (Level 19+) and named beasts. This comprehensive reference covers all 69 prefixes and 18 suffixes used throughout Loot Survivor.
### Prefix System Overview
**Dual Usage:** Prefixes serve two important functions in the game:
* **Item Enhancement**: High-greatness items (19+) gain prefix bonuses for additional stats
* **Beast Names**: Named beasts (Level 19+) use these same prefixes for unique identities
* **NFT Collection**: Beast Mode NFTs mint with prefix names for collectible variety
> **Cross-System Integration:** The same 69 prefixes create both powerful equipment and collectible named beasts!
### Complete Prefix Library (69 Total)
#### 🌑 Dark Themes (17)
1. Agony
2. Apocalypse
3. Armageddon
4. Blight
5. Blood
6. Corruption
7. Damnation
8. Death
9. Demon
10. Dire
11. Doom
12. Dread
13. Ghoul
14. Gloom
15. Grim
16. Hate
17. Horror
#### Ultra Rare Prefixes
**Lights (#68)** and **Shimmering (#69)** are considered the most valuable and rare prefixes in the entire system, making items or beast NFTs with these names extremely sought after by collectors.
**Suffix Usage:** Only applies to items with Greatness 15+ for stat bonuses. See [Suffix Boost Guide](/lootsurvivor/loot/suffix-boost) for detailed stat effects.
### Usage Examples
#### Item Naming Examples
**High-Greatness Item Examples:**
* **"Doom Katana of Power"** - Prefix: Doom, Base: Katana, Suffix: of Power
* **"Shimmering Divine Robe of Giants"** - Prefix: Shimmering, Base: Divine Robe, Suffix: of Giants
* **"Blood Wand of Skill"** - Prefix: Blood, Base: Wand, Suffix: of Skill
### Cross-Reference Usage
#### When to Use This Page
**Reference Scenarios:**
1. **Item Identification**: Understanding what prefix names mean on your equipment
2. **Beast NFT Hunting**: Identifying valuable prefix combinations for collection
3. **Market Evaluation**: Determining item value based on prefix rarity
4. **Collection Planning**: Targeting specific prefixes for complete sets
5. **Cross-Game Integration**: Understanding naming for Summit game access
**Documentation Links:**
* Items with prefixes: Reference this page from item evaluation
* Named beasts: Reference this page from beast documentation
* NFT collecting: Use for understanding collectible variety
### See Also
* [Loot System](/lootsurvivor/loot) - Main equipment and tier information
* [Suffix Boost Guide](/lootsurvivor/loot/suffix-boost) - Detailed suffix stat effects
* [Beast Collectibles](/lootsurvivor/beasts/collectibles) - Named beast NFT system
* [Beast Overview](/lootsurvivor/beasts) - Combat types and beast information
## Suffix Boosts
When an item reaches Greatness 15, it gains a powerful suffix that provides significant stat bonuses. These suffixes are based on the [16 Orders of Divinity](https://docs.loot.foundation/canonical-principles/loot/the-16-orders) from the original Loot collection and follow canonical loot lore.
> **⚡ Power Boost:** Suffix bonuses can make a T3 item with the right suffix more powerful than a base T1 item!
### How Suffixes Work
* **Greatness Requirement:** Items must reach Greatness 15 to unlock suffix bonuses
* **Random Assignment:** Suffixes are randomly assigned based on the Orders of Divinity
* **Permanent Bonuses:** Suffix bonuses are permanent and stack with base item stats
* **Lore Integration:** Each suffix follows canonical Loot Foundation principles
***
## Complete Suffix List
### Suffix Bonuses by Order
| Item Suffix | Stat Bonuses | Total Bonus | Order Association |
| -------------------- | ----------------------------------------- | ----------- | --------------------------------- |
| **Of Power** | Strength +3 | +3 | Power-focused enhancement |
| **Of Giant** | Vitality +3 | +3 | Health and endurance boost |
| **Of Titans** | Strength +2, Charisma +1 | +3 | Balanced physical prowess |
| **Of Skill** | Dexterity +3 | +3 | Agility and precision enhancement |
| **Of Perfection** | Strength +1, Dexterity +1, Vitality +1 | +3 | Balanced all-around improvement |
| **Of Brilliance** | Intelligence +3 | +3 | Mental acuity enhancement |
| **Of Enlightenment** | Wisdom +3 | +3 | Spiritual awareness boost |
| **Of Protection** | Vitality +2, Dexterity +1 | +3 | Defensive-focused bonuses |
| **Of Anger** | Strength +2, Dexterity +1 | +3 | Aggressive combat enhancement |
| **Of Rage** | Wisdom +1, Strength +1, Charisma +1 | +3 | Controlled fury bonuses |
| **Of Fury** | Vitality +1, Charisma +1, Intelligence +1 | +3 | Passionate intensity boost |
| **Of Vitriol** | Intelligence +2, Wisdom +1 | +3 | Sharp mental enhancement |
| **Of the Fox** | Dexterity +2, Charisma +1 | +3 | Cunning and agility boost |
| **Of Detection** | Wisdom +2, Dexterity +1 | +3 | Awareness and reflexes |
| **Of Reflection** | Wisdom +2, Intelligence +1 | +3 | Contemplative wisdom boost |
| **Of the Twins** | Charisma +3 | +3 | Social influence enhancement |
***
## Suffix Categories
### Single Stat Focus
These suffixes provide maximum bonuses to one primary stat:
* **Of Power** - Pure Strength focus for maximum damage
* **Of Giant** - Pure Vitality focus for maximum health
* **Of Skill** - Pure Dexterity focus for escape mastery
* **Of Brilliance** - Pure Intelligence focus for obstacle avoidance
* **Of Enlightenment** - Pure Wisdom focus for ambush prevention
* **Of the Twins** - Pure Charisma focus for market optimization
### Balanced Combinations
These suffixes provide balanced stat distributions:
* **Of Perfection** - Equal bonuses across STR/DEX/VIT
* **Of Rage** - Equal bonuses across WIS/STR/CHA
* **Of Fury** - Equal bonuses across VIT/CHA/INT
### Specialized Builds
These suffixes target specific build archetypes:
* **Of Titans** - Combat-focused (STR+CHA)
* **Of Protection** - Defense-focused (VIT+DEX)
* **Of Anger** - Aggressive melee (STR+DEX)
* **Of Vitriol** - Mental mastery (INT+WIS)
* **Of the Fox** - Agile trader (DEX+CHA)
* **Of Detection** - Alert explorer (WIS+DEX)
* **Of Reflection** - Wise scholar (WIS+INT)
***
## Suffix Strategy
### Evaluating Suffix Value
When comparing items with suffixes, consider:
1. **Your Build Focus** - Does the suffix support your stat priorities?
2. **Current Weaknesses** - Does the suffix shore up weak areas?
3. **Base Tier vs Suffix** - A T3+suffix might beat a base T1
4. **Total Stat Impact** - All +3 bonuses are equally valuable mathematically
### Suffix Synergies
**Combat Builds:**
* **Of Power** - Maximum damage output
* **Of Titans** - Damage + market efficiency
* **Of Anger** - Damage + escape capability
**Survival Builds:**
* **Of Giant** - Maximum health pool
* **Of Protection** - Health + escape ability
* **Of Perfection** - Balanced survivability
**Utility Builds:**
* **Of the Fox** - Escape + market efficiency
* **Of Detection** - Awareness + agility
* **Of Reflection** - Mental mastery
***
## Summary
Suffix bonuses transform the loot system from simple tier progression to complex item evaluation. A well-rolled suffix can make any item tier competitive, while the wrong suffix might make you overlook a potentially powerful piece of equipment.
**Key Suffix Principles:**
* All suffixes provide exactly +3 total stat points
* Suffixes unlock at Greatness 15
* Suffix distribution matters more than individual bonuses
* Consider your build when evaluating suffix value
* Don't automatically dismiss lower tiers with good suffixes
## Combat Guide
Combat in Loot Survivor is a turn-based system where preparation meets execution. Every encounter tests your understanding of type advantages, stat optimization, and tactical decision-making. Master the art of battle to survive Death Mountain's deadliest challenges.
> **🎯 Combat Philosophy:** Turn-based combat means every action counts. Sometimes survival means avoiding the fight entirely.
### Battle Interface
Figure: Battle interface showing adventurer vs beast encounter
Combat follows a strict turn-based sequence where adventurers always act first:
Adventurer Turn - Choose your action:
⚔️ Attack the beast
🏃 Attempt to flee
🔄 Switch equipment (beast gets free attack)
Beast Counterattack - If not defeated or fled:
Beast automatically attacks back
Targets a random armor slot (1 of 5: Head, Chest, Waist, Foot, Hand)
Damage reduced by armor in that specific slot
Repeat - Combat continues until victory, defeat, or successful escape
> **💡 Key Insight:** Since beasts attack random armor slots, having balanced armor coverage is more important than stacking defense in one slot!
### Damage System
⚡ Understanding Power
Power is displayed in combat for the base damage before modifiers.
It appears as a number on item and beast info showing the raw damage potential.
Power = Weapon Level × (6 - Weapon Tier)
#### Combat Damage Modifiers
The full damage amount includes several factors during combat:
* **⚔️ Base Damage** - Your Power value (Weapon tier × level formula above)
* **🎯 Type Advantage** - +50% when strong, -50% when weak
* **💪 Strength Bonus** - +10% damage per STR point
* **✨ Critical Hits** - LUCK/100% chance for 100% bonus damage (see [Combat Mechanics](/lootsurvivor/combat) for details)
### Type Advantage System
{/* Brute - Top */}
🔨
Brute
Bludgeon + Metal
{/* Hunter - Bottom Left */}
⚔️
Hunter
Blade + Hide
{/* Magical - Bottom Right */}
✨
Magical
Magic + Cloth
{/* Center circular arrows */}
Bludgeon + Metal beats
Blade + Hide beats
Magic + Cloth beats
Bludgeon + Metal
#### Type Advantage Effects
**📈 With Advantage:**
* **Damage Multiplier:** +50%
* **Example:** 20 base damage → 30 damage output
* **Visual Cue:** Green damage numbers in combat log
**📉 With Disadvantage:**
* **Damage Multiplier:** -50%
* **Example:** 20 base damage → 10 damage output
* **Visual Cue:** Red damage numbers in combat log
#### Strategic Equipment Sets
🛡️ Full Armor Sets
Each armor type excels against specific attacks: Metal resists Blade, Hide resists Magic,
Cloth resists Bludgeon. But beware - each has a weakness!
⚔️ Offensive Priority
Your weapon choice matters more than armor. Remember: Bludgeon crushes Hide,
Blade slices Cloth, Magic pierces Metal. +50% damage is huge!
🎯 Beast Hunting
When hunting specific beasts, matching your full armor set to counter their attacks is powerful.
Know your target and gear up accordingly for maximum survivability.
💡 Pro Strategy: Early game, prioritize covering all armor slots with appropriate types over hunting for higher tiers!
***
## Combat Actions
### ⚔️ Attack Options
#### Single Attack
Execute one calculated strike against your opponent.
**Stat Influences:**
* **STR:** +10% damage per point
* **LUCK:** Critical hit chance (LUCK/100%)
* **Weapon Tier:** Base damage multiplier
**Best for:** Controlled combat, testing damage, conserving resources
#### Attack Until Death
Chain attacks automatically until victory or defeat.
**⚠️ High Risk Mode:**
* No control once initiated
* Fight continues until resolution
* Cannot flee mid-sequence
**Use when:**
* Beast health is very low
* You have type advantage
* Confident in victory
* Emergency/desperate situations
### 🏃 Flee Mechanics
**Flee Formula:**
```
Success Rate = (DEX / Level) × 100%
```
| DEX/Level | Success | Level 10 Example | Level 20 Example |
| --------- | ------- | ---------------- | ---------------- |
| 0.5 | 50% | DEX 5 | DEX 10 |
| 0.75 | 75% | DEX 7-8 | DEX 15 |
| 1.0 | 100% | DEX 10 | DEX 20 |
| 1.5 | 100% | DEX 15 | DEX 30 |
**Key Points:**
* DEX equal to level = 100% success
* Success rate caps at 100%
* Failed flee attempts waste a turn
* Ambush encounters have no additional penalties
### 🛡️ Equipment Switching
You can change your equipment mid-combat to gain type advantages, but the beast gets a free attack when you do. Strategic swapping can turn a losing fight into victory - switch to counter their type for +50% damage or -50% damage reduction.
> **💡 Important:** Bundle all gear changes into one action to minimize the number of free attacks the beast gets. Multiple switches still only give the beast one free attack!
***
## Combat Decision Making
When entering combat, consider these factors:
* **🏃 Flee** - When you have low HP, type disadvantage, or facing a stronger beast
* **🔄 Switch Gear** - When you have the wrong equipment type and need advantage
* **⚔️ Attack** - When you have good matchup and are confident in victory
* **💀 All-Out Attack** - When beast has very low HP and victory is guaranteed
***
## Combat Rewards
### Experience Points (XP)
💰 Victory Rewards
Defeating beasts grants XP and gold based on their power, with bonuses for finding items:
Base Reward Formulas:
Adventurer XP = Beast Power / 2
Item XP = 2 \* Adventurer XP
Gold = Beast Power / 2 (same as XP)
Level Decay:
XP rewards decrease as you level up (2% per level, max 95% reduction) Gold rewards do NOT decay - always full value!
#### Reward Calculation Examples
| Your Level | Beast (T3, Lv10) | Base Rewards | XP After Decay | Gold (No Decay) | Item XP |
| ---------- | ---------------- | ------------ | -------------- | --------------- | ------- |
| Level 1 | Power: 30 | 15 | 15 XP (0%) | 15 🪙 | 30 XP |
| Level 10 | Power: 30 | 15 | 12 XP (-20%) | 15 🪙 | 24 XP |
| Level 25 | Power: 30 | 15 | 7 XP (-50%) | 15 🪙 | 15 XP |
| Level 50+ | Power: 30 | 15 | 1 XP (-95%) | 15 🪙 | 2 XP |
> **💡 Tip:** The XP decay encourages fighting appropriate challenges, but gold rewards stay consistent - making every victory valuable!
***
## Summary
Combat success in Loot Survivor comes from understanding type advantages, optimizing your stats, and making tactical decisions. Every battle offers multiple approaches - from switching gear for advantages to knowing when discretion is the better part of valor.
**Key Combat Principles:**
* Type advantage provides significant damage bonuses/penalties
* STR scaling makes strength investment worthwhile for damage dealers
* DEX equal to your level guarantees successful escapes
* Gear switching can turn losing fights into victories
* Sometimes the best fight is the one you avoid
## Exploration Guide
Exploration is the heart of Loot Survivor's gameplay loop. Every step into the unknown brings potential rewards and deadly dangers. Understanding the exploration system is key to surviving Death Mountain's treacherous depths.
> **🎲 Random Encounters:** Every exploration is a roll of the dice with equal chances for discovery, obstacles, or beasts!
### Exploration Interface
Figure: Exploration interface with adventure log and market
***
## How Exploration Works
When you click "Explore", the game rolls for one of three equally likely outcomes:
* **📦 Item Discovery (33.33%)** - Find gold, potions, or equipment
* **🪨 Obstacle (33.33%)** - Environmental hazards to overcome
* **👹 Beast Encounter (33.33%)** - Mandatory combat encounters
### Item Discovery Breakdown
When you hit the 33% item discovery chance, it subdivides into:
* **💰 Gold (45% of discoveries)** - Currency for market purchases (\~15% of all explores)
* **🧪 Health Potion (45% of discoveries)** - Restores HP when used (\~15% of all explores)
* **⚔️ Equipment (10% of discoveries)** - Weapons, armor, jewelry (\~3.3% of all explores)
***
## Discovery Types
### 💰 Gold Discovery
**Formula:** `Gold = Random(1 to Adventurer Level)`
| Level | Gold Range | Average |
| ----- | ---------- | ------- |
| 5 | 1-5g | 3g |
| 10 | 1-10g | 5.5g |
| 20 | 1-20g | 10.5g |
| 30 | 1-30g | 15.5g |
| 50 | 1-50g | 25.5g |
**Key Features:**
* Amount scales with your level
* Can be saved between explorations
* CHA stat reduces market prices
* Essential for equipment upgrades
* **Maximum capacity: 511 gold**
> **💰 Gold Cap:** You can only carry up to 511 gold. Any excess is lost, so spend wisely!
### ⚔️ Equipment Discovery
Equipment drops are your primary source of gear upgrades. When you discover loot (3.3% of all explores), the tier distribution is:
| Item Tier | Drop Rate | Of All Explores | Description |
| ------------------ | --------- | --------------- | --------------- |
| **T5 (Common)** | 50% | \~1.65% | Basic gear |
| **T4 (Uncommon)** | 30% | \~1.0% | Decent upgrades |
| **T3 (Rare)** | 12% | \~0.4% | Good equipment |
| **T2 (Epic)** | 6% | \~0.2% | Powerful items |
| **T1 (Legendary)** | 2% | \~0.066% | Best in slot |
> **Item assigning:** Items are automatically equipped or added to bag if there are free slots. Otherwise, if items are already discovered or there is no space they are converted to gold.
### 🧪 Health Discovery
**Formula:** `HP = Random(2 to Level × 2)`
| Level | HP Range | Average | % of Max HP |
| ----- | -------- | ------- | ----------- |
| 5 | 2-10 HP | 6 HP | \~0.6% |
| 10 | 2-20 HP | 11 HP | \~1.1% |
| 20 | 2-40 HP | 21 HP | \~2.1% |
| 30 | 2-60 HP | 31 HP | \~3.0% |
| 50 | 2-100 HP | 51 HP | \~5.0% |
**Potion Information:**
* Found in 15% of all explores
* Instantly restores HP when discovered
* **Maximum health: 1023 HP** (adventurer cap)
> **❤️ Health Cap:** Adventurers have a maximum health of 1023 HP. Health potions cannot exceed this limit.
### ⭐ Experience Gains
Exploration provides consistent experience points for leveling up:
| XP Source | XP Gained | Scaling | Risk Level |
| ------------------ | ----------------------------------- | ------- | ---------- |
| **Item Discovery** | 1 | None | Safe |
| **Beast Kills** | Beast Level × (Tier Multiplier - 1) | Decayed | High |
| **Obstacles** | Same as above | Decayed | Medium |
***
## Beast Encounters
### ⚠️ Mandatory Combat
**IMPORTANT:** Discovering a beast during exploration **always locks you into combat**. There is no way to avoid the fight once a beast is encountered.
**Combat is Unavoidable:**
* Beast encounters force immediate battle
* No option to flee before combat begins
* You must fight until victory, defeat, or successful flee attempt
* See the [Battle Guide](/lootsurvivor/guide/battle) for detailed combat mechanics
### Beast Strength Calculation
When a beast is discovered, its level and health are determined by your adventurer level:
#### Beast Level Formula
```
Base Level = 1 + Random(0 to Adventurer Level × 3 - 1)
Final Level = Base Level + Difficulty Bonus
```
**Difficulty Bonuses by Adventurer Level:**
| Adventurer Level | Difficulty Bonus | Level Range | Average Level |
| ---------------- | ---------------- | ----------- | ------------- |
| **1-19** | +0 | 1-57 | \~29 |
| **20-29** | +10 | 11-97 | \~54 |
| **30-39** | +20 | 21-137 | \~79 |
| **40-49** | +40 | 41-187 | \~114 |
| **50+** | +80 | 81-230+ | \~155+ |
#### Beast Health Formula
```
Base Health = 1 + Random(0 to Adventurer Level × 20 - 1)
Final Health = Base Health + Health Bonus
```
**Health Bonuses by Adventurer Level:**
| Adventurer Level | Health Bonus | Health Range | Average Health |
| ---------------- | ------------ | ------------ | -------------- |
| **1-19** | +10 | 11-390 | \~200 |
| **20-29** | +100 | 101-680 | \~390 |
| **30-39** | +200 | 201-980 | \~590 |
| **40-49** | +400 | 401-1023\* | \~712 |
| **50+** | +500 | 501-1023\* | \~762 |
\*Capped at maximum health of 1023 HP
> **⚠️ Power Spikes:** Beasts get significantly stronger at levels 20, 30, 40, and 50. Plan your upgrades accordingly!
>
> **❤️ Beast Health Cap:** Like adventurers, beasts have a maximum health of 1023 HP.
### Ambush Disadvantages
Beast encounters during exploration catch you off-guard with several penalties:
* **⚡ Initiative Loss** - Beast attacks first in combat
* **🛡️ No Preparation** - Cannot switch gear before combat begins
### Ambush Avoidance
**Ambush Avoidance Formula:**
```
Avoidance Chance = (WIS / Level) × 100%
```
| WIS/Level | Avoidance | Level 10 Example | Level 20 Example |
| --------- | --------- | ---------------- | ---------------- |
| 0.5 | 50% | WIS 5 | WIS 10 |
| 0.75 | 75% | WIS 7-8 | WIS 15 |
| 1.0 | 100% | WIS 10 | WIS 20 |
| 1.5 | 100% | WIS 15 | WIS 30 |
**Key Points:**
* WIS equal to level = 100% avoidance
* Success rate caps at 100%
* Only applies to beast encounters
* Does not prevent the encounter entirely
> **👁️ Important:** Wisdom helps avoid the ambush penalties, but you will still be locked into combat when a beast is encountered.
***
## Environmental Challenges
### 🪨 Obstacle System
Obstacles are unavoidable environmental hazards with three distinct categories:
#### Obstacle Types
**✨ Magical Obstacles (25 types)**
* Examples: Demonic Altar, Vortex of Despair, Cursed Tomb
* **Counter:** Hide armor
**🗡️ Blade Obstacles (25 types)**
* Examples: Pendulum Blades, Poison Darts, Hidden Arrows
* **Counter:** Metal armor
**🔨 Bludgeon Obstacles (25 types)**
* Examples: Collapsing Ceiling, Rolling Boulder, Crushing Walls
* **Counter:** Cloth armor
#### Obstacle Level Calculation
When an obstacle is encountered, its level is determined using the same formula as beast levels:
```
Base Level = 1 + Random(0 to Adventurer Level × 3 - 1)
Final Level = Base Level + Difficulty Bonus
```
**Difficulty Bonuses by Adventurer Level:**
| Adventurer Level | Difficulty Bonus | Obstacle Level Range | Average Level |
| ---------------- | ---------------- | -------------------- | ------------- |
| **1-19** | +0 | 1-57 | \~29 |
| **20-29** | +10 | 11-97 | \~54 |
| **30-39** | +20 | 21-137 | \~79 |
| **40-49** | +40 | 41-187 | \~114 |
| **50+** | +80 | 81-230+ | \~155+ |
> **📊 Note:** Unlike beasts, obstacles don't have health - they deal damage based on their level if not avoided.
#### Damage Mitigation
| Method | Effect | Requirement |
| ----------------- | -------------------- | -------------------- |
| **Intelligence** | Complete avoidance | INT ≥ obstacle level |
| **Armor Match** | 50% damage reduction | Correct armor type |
| **No Protection** | Full damage | No mitigation |
***
## Summary
Exploration provides the foundation for your Death Mountain adventure through consistent rewards and progression opportunities. Understanding the 33/33/33 split between discoveries, obstacles, and beasts helps you make informed decisions about when and how to explore.
**Key Takeaways:**
* Equal chances for all three outcome types
* Higher levels = better gold and health discoveries
* LUCK influences equipment tier drops
* INT helps avoid obstacles, WIS helps avoid ambushes
* Choose exploration modes based on your current needs
## Getting Started with Loot Survivor
Welcome, adventurer! This guide will help you begin your journey into the depths of Death Mountain. Whether you're new to blockchain gaming or Starknet, we'll get you up and running quickly.
> **⚡ Fast Track:** Want to play right now? Click "Practice Mode" and start exploring immediately!
### Game Modes
🎮 Practice Mode
✓ Instant play
✓ No rewards or progression
✓ No wallet needed
Perfect for learning
🏆 Beast Mode
✓ Dungeon Ticket entry
✓ Collectible beasts
✓ Requires wallet setup
Full blockchain experience
> **Recommendation:** Start with Practice Mode to learn the basics, then upgrade to Beast Mode for the full experience.
### Play Anywhere
📱 Fully Mobile Ready
Loot Survivor is designed for seamless gameplay across all devices. Whether
you prefer the immersive desktop experience or the convenience of mobile
gaming, enjoy the same full-featured adventure anywhere you go.
🖥️
Desktop
AI-powered immersive visuals with detailed UI
Latest AI technology creates stunning visual experiences for deep
exploration sessions
📱
Mobile
Pixel-art adventurer for fast-paced gameplay
Classic pixel aesthetics optimized for quick sessions and touch controls
***
## Beast Mode Setup
> **Ready for the full experience?** Beast Mode offers real blockchain rewards, NFT beasts, and permanent progression.
### Prerequisites
**🔐 Wallet Required**
* Cartridge Controller
* Built for gaming with gasless transactions
* Supports social login and multi-platform access
**💰 Payment Options**
* Multiple crypto tokens accepted (ETH, USDC, STRK, and more)
* Credit card payments supported
* Variable ticket pricing based on demand
### Wallet Setup Process
#### Step 1: Create Controller Wallet
Choose your signup method:
🔐 Social Login - Discord, Google, GitHub
🔑 Passkey - Biometric authentication
💼 Existing Wallet - MetaMask, Phantom, Rabby
Benefits of Controller:
Gasless transactions for smooth gameplay
Social login convenience
Multi-platform access
Built specifically for gaming
Controller sign-up interface
#### Step 2: Connect and Purchase
Follow these steps:
🌐 Visit Game - Navigate to lootsurvivor.io
🔗 Connect Wallet - Click "Login" and approve
connection
🎟️ Buy Ticket - Purchase dungeon entry with crypto or
credit card (see Dungeon Tickets for details)
⚔️ Start Adventure - Create your adventurer
Pro Tips:
Keep some funds for multiple games
Ticket prices vary based on demand
Your progress saves to the blockchain
Dungeon ticket purchase interface
***
## Your First Adventure
### Understanding Your Adventurer
When you create a new adventurer, you'll receive:
* **⚔️ Starting Weapon** - Random Tier 5 weapon
* **📊 Base Stats** - 12 points randomly distributed
* **❤️ Health** - 100 HP + VIT bonus
### Core Game Loop
The adventure follows a simple cycle:
1. **🔍 Explore** - Search for items, gold, and XP
2. **⚔️ Combat** - Fight or flee from beasts
3. **📈 Level Up** - Allocate stat points
4. **🛍️ Market** - Buy equipment and potions
5. **🔄 Repeat** - Continue deeper into Death Mountain
**Goal:** Survive as long as possible!
### Game Interface Overview
#### Main HUD Elements
| Element | Icon | Description | Location |
| --------------- | ---- | ----------------------------- | ------------ |
| **Health Bar** | ❤️ | Current HP (100 + VIT bonus) | Top left |
| **XP Progress** | ⭐ | Experience toward next level | Below health |
| **Gold** | 🪙 | Currency for market purchases | Top right |
| **Equipment** | 🛡️ | 8 equipped item slots | Center panel |
| **Inventory** | 🎒 | 15 additional storage slots | Right panel |
#### Action Controls
* **🔍 Explore** - Continue deeper into the dungeon
* **⚔️ Attack** - Fight beasts you encounter
* **🏃 Flee** - Escape from combat encounters
* **📈 Upgrade** - Allocate stat points when available
* **🛍️ Market** - Buy equipment and potions
***
## Community & Support
Join the Loot Survivor community:
* **💬 Discord:** [discord.gg/lootsurvivor](https://discord.gg/Q36rUxS66c)
* **🐦 Twitter:** [@lootsurvivor](https://twitter.com/lootsurvivor)
* **🐙 GitHub:** [Report Issues](https://github.com/Provable-Games/death-mountain/issues)
***
## Ready to Begin?
Every adventure is unique, every death is permanent, and every decision matters. Start with **Practice Mode** to learn the basics, then upgrade to **Beast Mode** for the full blockchain experience!
## Loot Survivor: Guide
Welcome to the Loot Survivor guide! Here you'll find everything you need to get started and master the core mechanics. Whether you're a new adventurer or looking to understand the game systems, this guide covers the essential aspects of gameplay.
### Table of Contents
* [Getting Started](/lootsurvivor/guide/getting-started): Setting up your wallet and starting your first adventure
* [Explore](/lootsurvivor/guide/explore): Navigating the dungeon and discovering challenges
* [Battle](/lootsurvivor/guide/battle): Combat mechanics and defeating beasts
* [Upgrade](/lootsurvivor/guide/upgrade): Leveling up and stat allocation
### Overview
Loot Survivor is a fully onchain dungeon crawler roguelike where every decision could be your last. In this guide, you'll learn:
1. **How to onboard and set up your wallet** for seamless play on Starknet
2. **The core gameplay loop**—from exploring dungeons to battling beasts
3. **How to allocate stats** when leveling up your adventurer
4. **Combat mechanics** including type advantages and battle actions
Each section provides clear explanations and visuals to help you understand the game mechanics. Dive in and start your journey!
## Upgrade Guide
Leveling up and upgrading your adventurer is a pivotal moment in every Loot Survivor run. Each level brings stat points to allocate and opens the market with fresh items. Master the upgrade system to transform your adventurer from a fragile newcomer into an unstoppable force!
> **⚡ Power Spike:** Every level up is an opportunity to dramatically increase your power. Plan your upgrades carefully!
### Upgrade Overview
The upgrade system consists of three key components:
1. **Stat Allocation** - Distribute points to enhance your adventurer's capabilities
2. **Market Refresh** - Access new items with each level up
3. **Purchase Decisions** - Buy equipment and potions from the market
### Upgrade Interface
Figure: Upgrade interface with stat menu
***
## Stat Allocation
### Stat Point Distribution
You receive **1 stat point per level** to allocate among:
| Stat | Effect per Point | Primary Use |
| -------- | ------------------------------ | -------------------- |
| **STR** | +10% attack damage | Combat damage |
| **DEX** | Improves flee success | Escaping from beasts |
| **VIT** | +15 HP max & current | Health and survival |
| **INT** | Aids obstacle avoidance | Avoiding obstacles |
| **WIS** | Helps evade beast ambushes | Ambush prevention |
| **CHA** | Gold discount on items/potions | Market purchases |
| **LUCK** | ❌ Cannot upgrade | Item discovery only |
> **🎯 Allocation Note:** Consider focusing on 2-3 primary stats rather than spreading points evenly across all stats.
***
## Market System
### How Markets Generate
🎲 Market Generation Mechanics
Each level up generates a unique market through random selection:
25 Rolls: The game rolls for 25 random items
No Duplicates: If the same item is rolled multiple times, it only appears once
Variable Size: Markets can have 1-25 items depending on duplicate rolls
Level Locked: The same market persists for your entire level
Fresh on Level Up: New random items appear when you reach the next level
#### Market Contents
Markets can contain:
* **⚔️ Weapons** - All tiers and types
* **🛡️ Armor** - Head, chest, waist, foot, and hand pieces
* **💍 Jewelry** - Rings and necklaces for stat boosts
* **🧪 Potions** - Health and other consumables
#### Market Strategy
* **Check Everything:** With limited rolls, valuable items might be rare
* **Plan Purchases:** The market won't refresh until next level
* **CHA Benefits:** Higher Charisma reduces all market prices
* **Gold Management:** Save for critical upgrades vs. immediate needs
> **💡 Pro Tip:** A small market (few items) means many duplicate rolls occurred. Don't expect it to have everything you need!
## Beast Collectibles
In **Beast Mode** defeating uncollected named beasts in Loot Survivor will mint an NFT to your wallet. There is a fixed supply of **93,225** uniquely generated Beasts across **75 species** (1,243 variants per species) to be collected.
Regular Static
Shiny Static
Regular Animated
Shiny Animated
### Beast Mode NFT System
**NFT Minting:** Defeating uncollected named beasts automatically mints collectible NFTs to your wallet
**Beast Mode Features:**
* **Named Beast Focus**: Only special named beasts (Level 19+) mint NFTs
* **First Victory Bonus**: NFTs only mint on first defeat of each named beast
* **Automatic Collection**: No manual claiming - NFTs appear directly in your wallet
* **Permanent Ownership**: Each NFT represents a unique named beast victory
> **Collect Them All:** Build your personal gallery of defeated legendary named beasts!
### Collection Overview
* **Fully onchain artwork + metadata**: Images and JSON are generated and rendered directly from smart contracts
* **Born onchain**: Beasts are earned in Loot Survivor using verifiable randomness; every step is recorded onchain
* **Battle‑ready NFTs**: Each Beast mints with combat stats (level, health), type, and tier compatible with gameplay
* **Live ranking within species**: Each species tracks ranks #1–#1,243 as they mint; when complete, a King Beast is crowned
* **Credibly neutral traits**: Onchain state includes defeat timestamp and the last Adventurer to slay that Beast
* **Level & Health**: Combat stats encoded at mint
* **Tier & Type**: T1–T5 tier and one of Magical, Hunter, Brute
* **Name & Prefix**: Base species name plus optional prefix (e.g., "Doom Kraken")
* **Defeat Timestamp**: Onchain record of when the Beast was defeated
* **Provenance Fields**: Credibly neutral traits like last slayer enable onchain leaderboards and history
### NFT Minting Requirements
#### Named Beast NFT Mechanics
**Level Requirement:** Only beasts level 19+ can gain special names and be collected\
**Name Structure:** \[Prefix] \[Suffix] \[Beast Name] = Unique NFT\
**Example:** "Doom Shadow" Kraken and "Demon Moon" Kraken mint as separate collectibles
#### NFT Minting Rules
**First Victory Only:** Each named beast can only mint one NFT per wallet\
**Automatic Process:** No manual claiming - NFT appears immediately after victory\
**Unique Metadata:** Each NFT contains beast stats, prefix, and victory timestamp\
**Permanent Record:** NFTs serve as proof of your legendary victories
> **Complete Reference:** Visit the loot section for the full categorized list of all 69 prefixes!
### Tier Logo Colors
* **Tier 1 (Legendary)**: Orange logo — most powerful
* **Tier 2 (Epic)**: Purple logo
* **Tier 3 (Rare)**: Blue logo
* **Tier 4 (Uncommon)**: Green logo
* **Tier 5 (Common)**: White logo
### Contract & Source Code
* [Mainnet Contract](https://voyager.online/nft-contract/0x046da8955829adf2bda310099a0063451923f02e648cf25a1203aac6335cf0e4)
* [Source Code](https://github.com/Provable-Games/beasts/tree/v1.0.1)
### NFT Ownership Benefits
#### Digital Asset Value
* **True Ownership**: NFTs belong to you, not the game
* **Transferable Assets**: Trade or sell your named beast NFTs
* **Provable Rarity**: Onchain verification of NFT scarcity
* **Permanent Record**: Victory achievements stored forever on Starknet
***
*The Beasts are a generative art collection where the algorithm is the decisions of the adventurers in the Loot Survivor dungeon.*
### See Also
* [Beast Overview](/lootsurvivor/beasts) - Complete beast guide and combat types
* [Combat Mechanics](/lootsurvivor/combat) - Damage calculations and combat system
* [Battle Guide](/lootsurvivor/guide/battle) - Tactical combat strategies
## Beasts
Beasts are the creatures you'll encounter and battle throughout your adventures in Loot Survivor. Understanding beast types, tiers, and combat advantages is crucial for survival and progression.
### Beast Overview
**75 unique beasts** populate Loot Survivor, each with distinct characteristics:
* **3 Combat Types**: Magical, Hunter, and Brute
* **5 Tiers**: T1 (Legendary) to T5 (Common)
* **Special Names**: High-level beasts gain name prefixes at level 19+
* **Dynamic Generation**: Each encounter uses VRF seeds for true randomness
> **Combat Focus:** Every beast follows the rock-paper-scissors combat system - choose your equipment wisely!
High-level beasts (Level 19+) can gain **special name prefixes** that provide:
* **Enhanced Combat Power**: Named beasts are significantly stronger
* **Bonus Rewards**: Higher gold and XP rewards
* **Collectible Value**: Named beast encounters become permanent achievements
**Full Named Beast:** "**Doom** **Phoenix**" or "**Blood** **Kraken**"
> **Pro Tip:** Named beasts are dangerous but offer the best rewards and collectible potential!
### Beast Encounter Mechanics
#### Generation System
* **VRF Seeds**: True randomness for beast selection (configurable in settings)
* **Level Scaling**: Beast power increases with your adventurer level
* **Tier Distribution**: Higher tiers become more common at lower levels
* **Special Names**: 19+ level beasts can gain name prefixes randomly
#### Combat Rewards
```
Gold Reward = (Tier Multiplier × Beast Level) ÷ 2
XP Reward = Minimum 4 + beast tier bonuses
```
**Bonus Multipliers:**
* Critical hits from LUCK stat
* Name match bonuses (weapon/armor names matching beast names)
* Type advantage damage (+50%)
### See Also
* [Combat Mechanics](/lootsurvivor/combat) - Detailed damage calculations
* [Battle Guide](/lootsurvivor/guide/battle) - Combat tactics and interface
* [Loot System](/lootsurvivor/loot) - Equipment and weapons
* [Beast Collectibles](/lootsurvivor/beasts/collectibles) - Achievement system
* [Wanted Beasts](/lootsurvivor/beasts/wanted-beasts) - Special bounties with STRK rewards
## Wanted Beasts
### Starkware & Cartridge Partnership
Loot Survivor has partnered with Starkware and Cartridge to bring an exclusive promotion featuring 100,000 STRK tokens distributed across three legendary Beasts. This collaboration celebrates the launch of SURVIVOR and rewards the most skilled adventurers who can defeat these special creatures.
#### Prize Distribution
The 100,000 STRK prize pool is split between three unique Beasts, each offering substantial rewards to the adventurer who claims victory:
"Torment Bane" Balrog
STRK Reward: 33,333 STRK
Location: The Molten Depths
Special Traits: Ancient demon of fire and shadow, Wielder of eternal flames
"Pain Whisper" Warlock
STRK Reward: 33,333 STRK
Location: The Shadow Sanctum
Special Traits: Master of dark arts, Collector of tormented souls
"Demon Grasp" Dragon
STRK Reward: 33,334 STRK
Location: The Dragon's Lair
Special Traits: Guardian of ancient treasures, Corrupted by demonic influence
#### How It Works
1. **Find the Beast**: These special Beasts spawn randomly in the dungeon
2. **Defeat to Claim**: The first adventurer to defeat each Beast claims the STRK reward
3. **Automatic Distribution**: STRK tokens are automatically sent to the winning adventurer's wallet
4. **One Winner per Beast**: Each Beast can only be defeated once for the reward
#### Promotion Period
This promotion runs indefinitely. These special Beasts will continue to spawn in the dungeon, offering adventurers ongoing opportunities to claim the STRK rewards. The promotion remains active until all three unique Beasts have been defeated and the full 100,000 STRK has been distributed.
#### About Our Partners
**Starkware** - The technology company behind Starknet, providing the scalable infrastructure that powers Loot Survivor's fully onchain gameplay.
**Cartridge** - The gaming infrastructure platform enabling seamless wallet experiences and player onboarding for Starknet games.
This partnership demonstrates the strong ecosystem support for Loot Survivor and commitment to rewarding skilled players with meaningful prizes.
## Applications
Platforms and applications that use the Embeddable Game Standard to embed, orchestrate, and distribute games.
### Denshokan
Denshokan (伝承館 - "Hall of Legends") is the reference implementation of the Embeddable Game Standard. It is organized as a 6-package workspace and provides the complete stack:
* **Token Contract** - ERC721 with all game-components composed (settings, objectives, minter, context, renderer, enumerable)
* **Game Registry** - Discovers and catalogs registered games
* **Viewer Contract** - Efficient on-chain batch queries and filtering with 30+ query methods
* **Indexer** - Apibara-based event indexer writing to PostgreSQL
* **REST API** - Hono-based API with filtering, pagination, and WebSocket
* **Client** - React frontend with Cartridge Controller integration
* **SDK** - `@provable-games/denshokan-sdk` for frontend developers
Denshokan includes two reference games (Number Guess and Tic-Tac-Toe) that demonstrate the full game lifecycle from contract to UI.
> **Tip:** Use Denshokan as a starting point for your own EGS deployment, or connect to the existing Denshokan instance with the SDK.
### Budokan: Permissionless Tournaments
Budokan uses EGS to provide a fully permissionless tournament protocol. With EGS, games no longer need to implement their own leaderboard or revenue logic. Budokan:
* Accepts any supported token for entry fees and prizes
* Offers extensive customization for tournament formats, entry requirements, and prize structures
* Handles all leaderboard, prize, and entry logic on behalf of the game
* Mints game tokens for tournament entrants with specific settings and timing

*Figure 1: Budokan overview page.*
> **Tip:** By integrating with Budokan, game developers can focus on gameplay while the platform handles tournaments, rewards, and community engagement.
### Eternum: Embedded Mini-Games
Eternum, a next-generation MMO, leverages EGS to embed mini-games directly into its core experience. In Season 1, Eternum introduced a quest system powered by EGS:
* Seamless integration of third-party mini-games as quests
* Emergence of new strategies and gameplay loops
* A more dynamic, deconstructed MMO experience

*Figure 2: Eternum Quest.*
Embedding games within Eternum allows mini-games to reach a much wider audience while bringing diverse gameplay experiences to Eternum's core player base.
### Why Build Applications with EGS?
* **Diverse game library** - Instantly access every EGS-compliant game
* **Easy integration** - A single `mint()` call starts a game; `score()` and `game_over()` validate results
* **Automatic callbacks** - Get notified when scores update or games complete via `IMetagameCallback`
* **No per-game integration** - The standard interface means one integration works for all games
* **Royalties** - Respect game creator royalties automatically via ERC-2981
### Related Guides
* [Embeddable Game Standard Overview](/embeddable-game-standard)
* [Building a Platform](/embeddable-game-standard/building-a-platform)
* [Budokan Tournaments](/budokan)
* [Frontend Integration](/embeddable-game-standard/frontend)
import { ContractTable } from "../../components/ContractTable";
## Architecture
> **Source**: [denshokan](https://github.com/Provable-Games/denshokan) — turnkey implementation of the EGS architecture (token contract, registry, indexer, API, and client).
The Embeddable Game Standard is built around three contract roles: **Metagame** (the platform), **MinigameToken** (the shared ERC721), and **Minigame** (the game logic). These roles communicate through well-defined interfaces discovered via SRC5.
### System Diagram
```
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Metagame │──mint──▶│ MinigameToken │◀──reg───│ Registry │
│ (Platform) │ │ (ERC721) │ │ │
│ │◀callback│ │──read──▶│ Minigame │
│ │ │ ┌────────────┐ │ │ (Your Game)│
└─────────────┘ │ │ CoreToken │ │ └─────────────┘
│ │ Minter │ │
│ │ Settings │ │
│ │ Objectives │ │
│ │ Context │ │
│ │ Renderer │ │
│ │ Lifecycle │ │
│ └────────────┘ │
└──────────────────┘
```
#### MinigameToken (Center)
The MinigameToken is an ERC721 contract that composes multiple game-components. Each token represents a single game session. The token ID is a packed `felt252` encoding immutable game data (game ID, settings, timestamps, flags) directly into the ID itself.
**Composed components:**
* **CoreTokenComponent** - Base lifecycle: mint, update, game over
* **MinterComponent** - Tracks who minted each token (platforms, users)
* **SettingsComponent** - Stores game setting configurations
* **ObjectivesComponent** - Tracks achievement completion
* **ContextComponent** - Optional mutable context data
* **RendererComponent** - Custom token URI rendering
* **SkillsComponent** - Per-token AI agent skills address override
* **ERC721EnumerableComponent** - On-chain token iteration
#### Minigame (Right)
Your game contract implements `IMinigameTokenData` to expose score and game-over status. When the token contract calls `update_game()`, it reads your game's state and syncs it to the token.
#### Metagame (Left)
A platform contract that mints tokens and optionally receives callbacks. If the minter implements `IMetagameCallback` (discoverable via SRC5), the token automatically dispatches:
* `on_game_action(token_id, score)` on every `update_game()` call
* `on_game_over(token_id, final_score)` when a game completes
* `on_objective_complete(token_id)` when an objective is met
#### Registry
The registry maps game contracts to metadata (name, description, developer, genre, image, royalties). Games self-register and receive a creator NFT that controls royalty payments.
### Game Lifecycle
```
1. Setup Game contract deploys and registers with the Registry
2. Mint Platform or user calls mint() on MinigameToken
→ Creates packed token ID with game_id, settings, timing
3. Play Player interacts with the Minigame contract
→ Game updates its internal state (score, progress)
4. Sync Anyone calls update_game(token_id) on MinigameToken
→ Token reads score/game_over from Minigame via IMinigameTokenData
→ If minter supports IMetagameCallback, dispatches callbacks
5. Complete Game marks game_over = true
→ Final sync writes permanent result to token
```
### Component Relationships
| Component | Depends On | Purpose |
| ------------------- | ----------------------------------- | --------------------------------------------- |
| CoreTokenComponent | ERC721, SRC5 | Base mint/update/lifecycle |
| MinterComponent | CoreToken | Track minting addresses with incrementing IDs |
| SettingsComponent | Minigame (IMinigameTokenSettings) | Store named setting configurations |
| ObjectivesComponent | Minigame (IMinigameTokenObjectives) | Track named objectives and completion |
| ContextComponent | Metagame (IMetagameContext) | Store per-token context from platform |
| RendererComponent | - | Delegate token URI to external contract |
| SkillsComponent | - | Per-token AI agent skills address override |
### SRC5 Interface Discovery
EGS uses [SRC5](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-5.md) (Starknet's equivalent of ERC-165) for runtime interface detection. Before calling an interface method, contracts check `supports_interface(interface_id)`.
This enables safe, optional integration: a token can check if a minter supports callbacks before dispatching, and a platform can check if a game supports settings before querying them.
Interface IDs are defined alongside their traits in the [game-components](https://github.com/Provable-Games/game-components) source. See the [SRC5 reference →](/embeddable-game-standard/advanced/src5) for a full listing.
### Deployed Contracts
:::note
Mainnet contracts are coming soon. The addresses below are for **Sepolia testnet**.
:::
#### Denshokan Token = `minigame_token_address`
The **Denshokan Token** contract above is the shared MinigameToken (ERC721) that all EGS games can use. Whenever you see `minigame_token_address` in the docs or in code (e.g. the game initializer, `pre_action`, `post_action`), this is the address to pass.
Using the shared Denshokan contract gives you:
* **Indexing & API** — your game is automatically indexed by the Denshokan indexer, giving you REST API, WebSocket, and SDK access out of the box
* **Registry integration** — your game appears in the shared game registry alongside all other EGS games
* **Platform compatibility** — any EGS platform (tournaments, quests, arcades) can mint tokens for your game immediately
* **Token rendering** — default SVG rendering and metadata for all tokens
You can deploy your own MinigameToken contract if you need custom behavior, but most games should use the shared Denshokan contract.
### Data Flow
```
┌─────────────────────────────────────────┐
│ Starknet Blockchain │
│ │
mint() ──────────▶│ MinigameToken ◀──── Minigame │
update_game() ───▶│ │ │ │
│ ▼ │ │
│ Events (Transfer, │ │
│ ScoreUpdate, │ │
│ GameOver) │ │
└───────┬──────────────────┘ │
│
┌───────▼───────┐
│ Indexer │ (Apibara)
│ ┌───────┐ │
│ │ Decode│ │
│ │ Events│ │
│ └───┬───┘ │
└───────┼──────┘
│
┌───────▼───────┐
│ PostgreSQL │
└───────┬───────┘
│
┌───────────┼───────────┐
│ │ │
┌──────▼─────┐ ┌──▼──┐ ┌──────▼──────┐
│ REST API │ │ WS │ │ RPC (direct) │
└──────┬─────┘ └──┬──┘ └──────┬───────┘
│ │ │
┌──────▼───────────▼───────────▼──────┐
│ denshokan-sdk │
│ (DenshokanClient + React hooks) │
└─────────────────────────────────────┘
```
The SDK provides three data paths:
1. **REST API** - Indexed data with filtering, pagination, and aggregation
2. **WebSocket** - Real-time event subscriptions (scores, mints, game over)
3. **RPC** - Direct contract reads for on-chain truth (ERC721 methods, batch queries)
Smart fallback: if the API is unavailable, the SDK automatically falls back to RPC.
## Embeddable Game Standard: FAQ
Developer-oriented FAQ for the Embeddable Game Standard (EGS) on Starknet. For deeper dives, follow the links to the relevant guide pages.
### General
**What is the Embeddable Game Standard?**
An open protocol for building composable, provable on-chain games on Starknet. It defines how games expose their logic, how platforms mint and manage game tokens, and how frontends display real-time game state. See the [Overview](/embeddable-game-standard).
**What problem does EGS solve?**
On-chain games are silos. Each game reinvents token minting, score tracking, and settings management. Platforms that want to embed multiple games must write custom integration code for each one. EGS provides a common interface so games can be listed in tournaments, embedded as quests, and tracked across platforms without per-game integration work.
**What is Denshokan?**
Denshokan is the turnkey implementation of EGS — a deployed token contract, registry, indexer, API, and client. If you don't want to deploy your own token contract, you can register your game with the existing Denshokan deployment and start minting immediately.
**What is game-components?**
The [game-components](https://github.com/Provable-Games/game-components) library provides modular Cairo components (MinigameComponent, MetagameComponent, SettingsComponent, etc.) that you compose into your contracts. See the [Reference](/embeddable-game-standard/reference).
**What is the denshokan-sdk?**
A TypeScript SDK with React hooks and WebSocket subscriptions for querying games, tokens, players, and activity. See [Frontend Integration](/embeddable-game-standard/frontend).
**What games currently use EGS?**
Dark Shuffle, Loot Survivor, zKube, Nums, and Dope Wars all implement the EGS interface. See [Games](/embeddable-game-standard/games).
### Building a Game
**What's the minimum I need to implement to make my game EGS-compliant?**
1. Implement `IMinigameTokenData` — expose `score()` and `game_over()` for your game
2. Register `IMINIGAME_ID` via SRC5
3. Register with the game Registry
4. Call `assert_token_ownership`, `pre_action`, and `post_action` in every player-facing action
See the [Quick Start](/embeddable-game-standard/building-a-game/quick-start) for a full walkthrough.
**What are `pre_action` and `post_action`?**
`pre_action` validates that a token is playable (not game over, not expired, objective not already completed). `post_action` syncs your game's score and game\_over state back to the token contract. Every player-facing action must call both. See [Lifecycle & Playability](/embeddable-game-standard/building-a-game/lifecycle).
**Why do I need `assert_token_ownership`?**
A player should never be able to act on a token they don't own. This should be the first check in every action function, before `pre_action`.
**My game has multiple contracts. How do I call pre\_action/post\_action from other contracts?**
Import the library functions directly and pass the denshokan token address:
```cairo
use game_components_embeddable_game_standard::minigame::minigame::{
assert_token_ownership, pre_action, post_action,
};
fn action(ref self: ContractState, token_id: felt252) {
let token_address = self.minigame_token_address.read();
assert_token_ownership(token_address, token_id);
pre_action(token_address, token_id);
// ... game logic ...
post_action(token_address, token_id);
}
```
Only the contract initialized with the MinigameComponent can use `self.minigame.pre_action(token_id)`. See the [Quick Start](/embeddable-game-standard/building-a-game/quick-start#multi-contract-games-library-functions).
**What happens if I forget to call `post_action`?**
The token contract won't know when scores change or games end. Score updates won't be emitted, game\_over transitions won't be recorded, and platform callbacks won't fire.
**Are settings and objectives required?**
No. Settings (difficulty modes) and objectives (achievements) are optional extensions. Your game works without them. See [Settings & Objectives](/embeddable-game-standard/building-a-game/settings-and-objectives).
**How does scoring work?**
Your contract implements `score()` and `game_over()`. The token contract reads these via `post_action` and emits `ScoreUpdate` events. You define the scoring formula — EGS doesn't prescribe one. See [Score & Game Over](/embeddable-game-standard/building-a-game/score-and-game-over).
**Should `game_over` be reversible?**
No. Once `game_over()` returns true, it should stay true. The token contract treats this as a permanent state transition. Reversing it would break platform integrations and tournament results.
### Token Lifecycle
**How are game tokens minted?**
A platform (or the player directly) calls `mint()` on the token contract, specifying the game address, optional settings, start/end times, and other parameters. The token ID is a packed felt252 encoding all this metadata.
**How does the lifecycle (start/end) work?**
The minter provides `start` and `end` as absolute Unix timestamps. The contract converts these to relative delays for packing into the token ID. A token is playable when the current time is between start and end. `start=0` means immediately playable, `end=0` means never expires. See [Lifecycle & Playability](/embeddable-game-standard/building-a-game/lifecycle).
**What are packed token IDs?**
Token IDs encode game metadata (game ID, minter, settings, lifecycle, objective, flags) into a single felt252. This allows reading token properties without any storage lookups or RPC calls. See [Packed Token IDs](/embeddable-game-standard/advanced/packed-token-ids).
**What error do I get if a token isn't playable?**
Specific messages for each case:
* `"Token is not playable - game is over"`
* `"Token is not playable - objective already completed"`
* `"Token is not playable - game has not started (now={}, start={})"`
* `"Token is not playable - game has expired (now={}, end={})"`
### Building a Platform
**What is a Metagame?**
A platform contract (tournament system, quest platform, social app) that mints game tokens and orchestrates gameplay. It uses the MetagameComponent to track its token contract and receive callbacks. See [Building a Platform](/embeddable-game-standard/building-a-platform).
**How do callbacks work?**
When `post_action` updates a token, the token contract checks if the minter supports `IMetagameCallback` via SRC5. If so, it dispatches `on_game_action`, `on_game_over`, or `on_objective_complete`. The `MetagameCallbackComponent` handles caller verification automatically — you just implement the `MetagameCallbackHooksTrait`. See [Callbacks](/embeddable-game-standard/building-a-platform/callbacks).
**Do I need to verify the caller in my callback implementation?**
No. The `MetagameCallbackComponent` enforces `assert_only_token` automatically before delegating to your hooks. You just implement the business logic.
**What is the Registry?**
A contract that maps game addresses to incrementing IDs, enabling multi-game token contracts. Games register once, and the registry provides discovery for platforms. See [Registry & Discovery](/embeddable-game-standard/building-a-platform/registry).
**What platforms currently use EGS?**
* **Budokan**: Permissionless tournament protocol. Any EGS game can be used in tournaments with custom entry fees and prize pools.
* **Eternum**: MMO that embeds EGS games as quests, extending gameplay through mini-game integrations.
### Frontend
**How do I query game data?**
Use the `denshokan-sdk` to query games, tokens, players, and activity through the Denshokan API. The SDK provides typed responses and handles pagination. See [denshokan-sdk](/embeddable-game-standard/frontend/sdk).
**How do I get real-time updates?**
Subscribe via WebSocket hooks (`useScoreUpdates`, `useGameActivity`, etc.) for live score changes, game completions, and minting events. See [WebSocket Subscriptions](/embeddable-game-standard/frontend/websockets).
**Can I decode token IDs client-side?**
Yes. The SDK provides `decodeTokenId()` which unpacks the felt252 into all its fields (game ID, minter, settings, lifecycle, etc.) without any RPC calls. See [Types Reference](/embeddable-game-standard/frontend/types).
### More Resources
* [Quick Start](/embeddable-game-standard/building-a-game/quick-start) — Build a Number Guess game step by step
* [Architecture](/embeddable-game-standard/architecture) — How the layers fit together
* [game-components Reference](/embeddable-game-standard/reference) — Interface and struct documentation
* [Games](/embeddable-game-standard/games) — Live games built with EGS
* [Applications](/embeddable-game-standard/applications) — Platforms using EGS
import { GameCard } from "../../components/GameCard";
## Games
Games that implement the Embeddable Game Standard. Each game exposes `IMinigameTokenData` and can be embedded in any EGS-compatible platform.
### Why Build Games with EGS?
* **Instant distribution**: Your game is automatically available in any EGS platform (Budokan, Denshokan, and more)
* **Focus on gameplay**: The standard handles token minting, score tracking, and metadata - you write game logic
* **Permissionless settings**: Anyone can create custom difficulty modes for your game
* **Community objectives**: Players and organizers can define their own achievement goals
* **Royalties**: Earn royalties on secondary sales via ERC-2981 with dynamic receiver resolution
### Getting Started
See the [Building a Game](/embeddable-game-standard/building-a-game) guide to make your game EGS-compatible.
## Embeddable Game Standard
The Embeddable Game Standard (EGS) is an open protocol for building composable, provable on-chain games on Starknet. It defines how games expose their logic, how platforms mint and manage game tokens, and how frontends display real-time game state.
For a high-level overview of why EGS matters, see the [EGS presentation deck](https://provable.games/decks/egs/index.html).
### The Problem
On-chain games are silos. Each game reinvents token minting, score tracking, settings management, and leaderboard logic. Platforms that want to embed multiple games must write custom integration code for each one. There's no standard way for a tournament system, a quest platform, or a social app to discover, launch, and validate games.
### Three Pillars
EGS is built on three layers:
| Layer | What It Is | Who Uses It |
| ------------------------------------------------------------ | -------------------------------------------------------------------------- | ---------------------------------------------- |
| [**game-components**](/embeddable-game-standard/reference) | Modular Cairo component library for Starknet | Game and platform developers writing contracts |
| [**Denshokan**](https://github.com/Provable-Games/denshokan) | Turnkey implementation: token contract, registry, indexer, API, and client | Teams that want a ready-made deployment |
| [**denshokan-sdk**](/embeddable-game-standard/frontend) | TypeScript SDK with React hooks and WebSocket subscriptions | Frontend developers integrating game data |
### What You Can Build
**Games** that are automatically compatible with any EGS platform:
* Implement a single trait (`IMinigameTokenData`) to expose score and game-over status
* Optionally add settings (difficulty modes), objectives (achievements), and custom metadata
* Your game becomes mintable, trackable, and embeddable anywhere
**Platforms** that aggregate and orchestrate games:
* Mint game tokens on behalf of users with a single `mint()` call
* Receive automatic callbacks when scores update or games complete
* Run tournaments, quests, and reward systems across any EGS-compliant game
**Frontends** that display real-time game data:
* Query games, tokens, players, and activity through a unified API
* Subscribe to live score updates and game completions via WebSocket
* Decode packed token IDs client-side for instant display without RPC calls
### Architecture at a Glance
```
Metagame ──→ MinigameToken (ERC721) ──→ Minigame
│ ▲ │ │
│ │ └── Registry ├── Settings (optional)
│ │ └── Objectives (optional)
│ └── IMetagameCallback (on_game_action, on_game_over, on_objective_complete)
└── Context (optional)
```
**Game Lifecycle**: Setup → Mint → Play → Sync (`update_game()`) → Complete (`game_over()`)
[Learn more about the architecture →](/embeddable-game-standard/architecture)
### AI-Assisted Development with Context7
All EGS repositories are indexed on [Context7](https://context7.com) and can be queried by AI coding assistants (Claude, Cursor, Copilot, etc.) for up-to-date documentation and code examples.
| Library | Context7 ID | Snippets |
| -------------------------------------------------------------------- | --------------------------------- | -------- |
| [This documentation](https://github.com/Provable-Games/docs) | `/provable-games/docs` | 1289 |
| [game-components](https://github.com/Provable-Games/game-components) | `/provable-games/game-components` | 183 |
| [denshokan](https://github.com/Provable-Games/denshokan) | `/provable-games/denshokan` | 270 |
| [denshokan-sdk](https://github.com/Provable-Games/denshokan-sdk) | `/provable-games/denshokan-sdk` | 80 |
#### Claude Code
Context7 is available as an MCP server. Add it to your Claude Code config:
```bash
claude mcp add context7 -- npx -y @upstash/context7-mcp
```
Then ask questions referencing the library — for example: *"Using `/provable-games/game-components`, how do I implement IMinigameTokenData?"*
#### OpenAI Codex
Add Context7 to your `codex.md` or system prompt:
```
When working with EGS, fetch up-to-date docs via Context7 MCP using these library IDs:
- /provable-games/docs
- /provable-games/game-components
- /provable-games/denshokan
- /provable-games/denshokan-sdk
```
#### Other tools
Any tool that supports MCP servers (Cursor, Windsurf, etc.) can use Context7. See the [Context7 docs](https://context7.com) for setup instructions.
### Quick Links
| I want to... | Start here |
| -------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Build a game | [Building a Game](/embeddable-game-standard/building-a-game) |
| Build a platform that embeds games | [Building a Platform](/embeddable-game-standard/building-a-platform) |
| Integrate game data in my frontend | [Frontend Integration](/embeddable-game-standard/frontend) |
| Look up a specific interface or struct | [game-components Reference](/embeddable-game-standard/reference) |
| See working examples | [Games](/embeddable-game-standard/games) and [Applications](/embeddable-game-standard/applications) |
| Understand packed token IDs or SRC5 | [Advanced Topics](/embeddable-game-standard/advanced) |
## game-components Reference
> **Source**: [game-components](https://github.com/Provable-Games/game-components)
The `game-components` library provides modular Cairo components for building EGS-compliant contracts on Starknet. Each component is a self-contained unit that can be composed into your contract.
### Package Overview
| Package | Crate Name | Purpose |
| ------------------------------ | ------------------------------------------ | ---------------------------------------------------------------------------- |
| **interfaces** | `game_components_interfaces` | All trait definitions, structs, and interface IDs |
| **embeddable\_game\_standard** | `game_components_embeddable_game_standard` | Token, Minigame, Metagame, Registry components |
| **metagame** | `game_components_metagame` | Leaderboard, registration, entry gating, entry fees, prizes, ticket booth |
| **economy** | `game_components_economy` | Tokenomics: buyback (Ekubo TWAMM), stream token |
| **utilities** | `game_components_utilities` | Math, distribution, encoding, SVG rendering |
| **presets** | `game_components_presets` | Ready-to-deploy contracts: LeaderboardPreset, AutonomousBuyback, StreamToken |
### Dependency Graph
```
interfaces ◀─── embeddable_game_standard
▲ ▲
│ │
├── metagame ├── utilities
├── economy └── presets
└── utilities
```
All packages depend on `interfaces` for trait definitions. The `embeddable_game_standard` package is the most complex, composing Token, Minigame, Metagame, and Registry components.
### Installation
Add the packages you need to your `Scarb.toml`:
```toml
[dependencies]
starknet = "2.15.1"
# Core - Token, Minigame, Metagame, Registry
game_components_embeddable_game_standard = { git = "https://github.com/Provable-Games/game-components", tag = "v1.1.0" }
# Leaderboard, registration, entry gating, entry fees, prizes
game_components_metagame = { git = "https://github.com/Provable-Games/game-components", tag = "v1.1.0" }
# Tokenomics: buyback, stream token
game_components_economy = { git = "https://github.com/Provable-Games/game-components", tag = "v1.1.0" }
# Math, distribution, encoding, SVG rendering
game_components_utilities = { git = "https://github.com/Provable-Games/game-components", tag = "v1.1.0" }
# Ready-to-deploy contracts
game_components_presets = { git = "https://github.com/Provable-Games/game-components", tag = "v1.1.0" }
# OpenZeppelin (required)
openzeppelin_token = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v3.0.0" }
openzeppelin_introspection = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v3.0.0" }
openzeppelin_access = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v3.0.0" }
```
### Reference Pages
#### Core Components
* [MinigameToken (ERC721)](/embeddable-game-standard/reference/token) — The core token contract with packed IDs and component composition
* [Token Extensions](/embeddable-game-standard/reference/token-extensions) — Minter, Renderer, Skills, Settings, Objectives, and Context extensions
* [MinigameComponent](/embeddable-game-standard/reference/minigame) — Game logic foundation: `IMinigameTokenData`, settings, objectives
* [MetagameComponent](/embeddable-game-standard/reference/metagame) — Platform foundation: context, callbacks
* [RegistryComponent](/embeddable-game-standard/reference/registry) — Game registration, discovery, and metadata
#### Metagame Package
* [Metagame Extensions](/embeddable-game-standard/reference/metagame-extensions) — Leaderboard, Registration, Entry Requirements, Entry Fees, Prizes
## Metagame Extensions
The `game_components_metagame` package provides components for competitive features: leaderboards, registration, entry gating, entry fees, and prizes. These are separate from the core EGS `embeddable_game_standard` package and used by platform contracts like Budokan.
```toml
[dependencies]
game_components_metagame = { git = "https://github.com/Provable-Games/game-components", tag = "v1.1.0" }
```
### Leaderboard
Multi-context leaderboard that supports multiple simultaneous rankings (tournaments, seasons, etc.).
#### ILeaderboard
```cairo
pub const ILEADERBOARD_ID: felt252 =
0x381684b12c5a80d08222695ee5eca750b99e56cb53101a47378c542859907e1;
#[starknet::interface]
pub trait ILeaderboard {
fn submit_score(
ref self: TState, context_id: u64, token_id: felt252, score: u64, position: u32,
) -> LeaderboardResult;
fn get_entries(self: @TState, context_id: u64) -> Array;
fn get_top_entries(self: @TState, context_id: u64, count: u32) -> Array;
fn get_position(self: @TState, context_id: u64, token_id: felt252) -> Option;
fn qualifies(self: @TState, context_id: u64, score: u64) -> bool;
fn is_full(self: @TState, context_id: u64) -> bool;
fn get_leaderboard_length(self: @TState, context_id: u64) -> u32;
fn get_config(self: @TState, context_id: u64) -> LeaderboardStoreConfig;
}
```
#### ILeaderboardAdmin
```cairo
#[starknet::interface]
pub trait ILeaderboardAdmin {
fn configure(
ref self: TState,
context_id: u64,
max_entries: u32,
ascending: bool,
game_address: ContractAddress,
);
fn clear(ref self: TState, context_id: u64);
fn owner(self: @TState) -> ContractAddress;
fn transfer_ownership(ref self: TState, new_owner: ContractAddress);
}
```
#### IGameDetails
Game contracts implement this so the leaderboard can read scores:
```cairo
#[starknet::interface]
pub trait IGameDetails {
fn score(self: @TState, token_id: felt252) -> u64;
}
```
#### Leaderboard Data Structures
```cairo
#[derive(Drop, Serde, Copy)]
pub struct LeaderboardEntry {
pub id: felt252,
pub score: u64,
}
#[derive(Drop, Serde, Copy)]
pub struct LeaderboardConfig {
pub max_entries: u32,
pub ascending: bool,
pub allow_ties: bool,
}
#[derive(Drop, Serde, Copy)]
pub struct LeaderboardStoreConfig {
pub max_entries: u32,
pub ascending: bool,
pub game_address: ContractAddress,
}
#[derive(Drop, Serde, Copy)]
pub enum LeaderboardResult {
Success,
InvalidPosition,
LeaderboardFull,
ScoreTooLow,
ScoreTooHigh,
DuplicateEntry,
InvalidConfig,
}
```
### Registration
Tracks entries (participants) per context. Used by tournament contracts to manage who has entered.
#### IRegistration
```cairo
#[starknet::interface]
pub trait IRegistration {
fn get_entry(self: @TState, context_id: u64, entry_id: u32) -> Registration;
fn entry_exists(self: @TState, context_id: u64, entry_id: u32) -> bool;
fn is_entry_banned(self: @TState, context_id: u64, entry_id: u32) -> bool;
fn get_entry_count(self: @TState, context_id: u64) -> u32;
}
```
#### Registration Struct
```cairo
#[derive(Copy, Drop, Serde)]
pub struct Registration {
pub context_id: u64,
pub entry_id: u32,
pub game_token_id: felt252,
pub has_submitted: bool,
pub is_banned: bool,
}
```
### Entry Requirements
Gates entry to contexts based on token ownership, allowlists, or custom extension logic.
#### IEntryRequirement
```cairo
pub const IENTRY_REQUIREMENT_ID: felt252 =
0x153355c05540b99cd8196c632c72891a6039efdc0b4097d8161fbeed3809182;
#[starknet::interface]
pub trait IEntryRequirement {
fn get_entry_requirement(self: @TState, context_id: u64) -> Option;
fn get_qualification_entries(
self: @TState, context_id: u64, proof: QualificationProof,
) -> QualificationEntries;
}
```
#### Entry Requirement Data Structures
```cairo
#[derive(Copy, Drop, Serde, PartialEq)]
pub struct EntryRequirement {
pub entry_limit: u32,
pub entry_requirement_type: EntryRequirementType,
}
#[derive(Copy, Drop, Serde, PartialEq)]
pub enum EntryRequirementType {
token: ContractAddress, // Must hold an NFT from this contract
allowlist: Span, // Must be on the allowlist
extension: ExtensionConfig, // Custom gating logic
}
#[derive(Copy, Drop, Serde, PartialEq)]
pub enum QualificationProof {
NFT: NFTQualification,
Address: ContractAddress,
Extension: Span,
}
#[derive(Copy, Drop, Serde)]
pub struct QualificationEntries {
pub context_id: u64,
pub qualification_proof: QualificationProof,
pub entry_count: u32,
}
#[derive(Copy, Drop, Serde, PartialEq, starknet::Store)]
pub struct NFTQualification {
pub token_id: u256,
}
```
### Entry Fees
Manages fee collection and distribution for paid contexts (tournaments with buy-ins).
#### IEntryFee
```cairo
pub const IENTRY_FEE_ID: felt252 =
0x2386e28587616f249621004456b4ed72932c1f731b2a732d87d8a722ee739a1;
#[starknet::interface]
pub trait IEntryFee {
fn get_entry_fee(self: @TState, context_id: u64) -> Option;
}
```
#### Entry Fee Data Structures
```cairo
#[derive(Drop, Serde, PartialEq)]
pub struct EntryFeeConfig {
pub token_address: ContractAddress, // ERC20 token for payment
pub amount: u128, // Fee amount
pub game_creator_share: Option, // Basis points (10000 = 100%)
pub refund_share: Option, // Refunded to each depositor
pub additional_shares: Span,
}
#[derive(Copy, Drop, Serde, PartialEq)]
pub struct AdditionalShare {
pub recipient: ContractAddress,
pub share_bps: u16, // Basis points (10000 = 100%)
}
```
Fee distribution order:
1. `game_creator_share` goes to the game creator
2. `refund_share` is returned to each depositor
3. `additional_shares` go to specified recipients
4. Remainder is distributed to winners based on the `Distribution` strategy
#### Distribution
```cairo
#[derive(Drop, Copy, Serde, PartialEq)]
pub enum Distribution {
Linear: u16, // Linear decay with step size
Exponential: u16, // Exponential decay with base
Uniform, // Equal split
Custom: Span, // Custom basis point shares per position
}
```
### Prizes
Manages ERC20 and ERC721 prize pools for contexts.
#### IPrize
```cairo
pub const IPRIZE_ID: felt252 =
0x2a7a3be3dafc2154ab2780a63f0457adc535ad295bc44ce46cc3fbb11019641;
#[starknet::interface]
pub trait IPrize {
fn get_prize(self: @TState, prize_id: u64) -> PrizeData;
fn get_total_prizes(self: @TState) -> u64;
fn is_prize_claimed(self: @TState, context_id: u64, prize_type: PrizeType) -> bool;
}
```
#### Prize Data Structures
```cairo
#[derive(Drop, Serde)]
pub struct PrizeData {
pub id: u64,
pub context_id: u64,
pub token_address: ContractAddress,
pub token_type: TokenTypeData,
pub sponsor_address: ContractAddress,
}
#[derive(Drop, Serde)]
pub struct PrizeConfig {
pub token_address: ContractAddress,
pub token_type: TokenTypeData,
}
#[derive(Drop, Serde)]
pub enum TokenTypeData {
erc20: ERC20Data,
erc721: ERC721Data,
}
#[derive(Drop, Serde)]
pub struct ERC20Data {
pub amount: u128,
pub distribution: Option,
pub distribution_count: Option,
}
#[derive(Copy, Drop, Serde, starknet::Store)]
pub struct ERC721Data {
pub id: u128,
}
#[derive(Copy, Drop, Serde, PartialEq)]
pub enum PrizeType {
Single: u64, // Single winner prize (prize_id)
Distributed: (u64, u32), // Multi-winner prize (prize_id, position)
}
```
## MetagameComponent
The MetagameComponent is the foundation for platform contracts that integrate with EGS games. It provides context management, game state callbacks, and the base interface that platforms embed.
### Core Interface: IMetagame
```cairo
pub const IMETAGAME_ID: felt252 =
0x7997c74299c045696726f0f7f0165f85817acbb0964e23ff77e11e34eff6f2;
#[starknet::interface]
pub trait IMetagame {
fn context_address(self: @TContractState) -> ContractAddress;
fn default_token_address(self: @TContractState) -> ContractAddress;
}
```
* `context_address` — returns the address of the contract providing context data for tokens
* `default_token_address` — returns the default MinigameToken contract address this platform uses
### Context Extension
Platforms can attach context data to tokens. The token contract checks for this interface via SRC5 before reading context.
#### IMetagameContext
```cairo
pub const IMETAGAME_CONTEXT_ID: felt252 =
0x1633419b5abcc4c0bbed8bd37a363fbe6de5bd25908761ab6dcda6a9b598ca9;
#[starknet::interface]
pub trait IMetagameContext {
fn has_context(self: @TState, token_id: felt252) -> bool;
}
```
#### IMetagameContextDetails
```cairo
#[starknet::interface]
pub trait IMetagameContextDetails {
fn context_details(self: @TState, token_id: felt252) -> GameContextDetails;
}
```
#### IMetagameContextSVG
```cairo
#[starknet::interface]
pub trait IMetagameContextSVG {
fn context_svg(self: @TState, token_id: felt252) -> ByteArray;
}
```
### Callback Extension
Metagame contracts can receive automatic callbacks from token contracts when game state changes. This enables tournament score aggregation without manual syncing.
#### IMetagameCallback
```cairo
pub const IMETAGAME_CALLBACK_ID: felt252 =
0x3b4312c1422de8c35936cc79948381ab8ef9fd083d8c8e20317164690aa1600;
#[starknet::interface]
pub trait IMetagameCallback {
/// Called on every update_game() call
fn on_game_action(ref self: TState, token_id: u256, score: u64);
/// Called when game_over transitions to true
fn on_game_over(ref self: TState, token_id: u256, final_score: u64);
/// Called when the objective is completed
fn on_objective_complete(ref self: TState, token_id: u256);
}
```
The token contract checks if the minter supports `IMETAGAME_CALLBACK_ID` via SRC5 before dispatching callbacks. See [Callbacks & Automation](/embeddable-game-standard/building-a-platform/callbacks) for integration details.
### Data Structures
#### GameContextDetails
```cairo
#[derive(Drop, Serde, Clone)]
pub struct GameContextDetails {
pub name: ByteArray,
pub description: ByteArray,
pub id: Option,
pub context: Span,
}
```
#### GameContext
```cairo
#[derive(Drop, Serde, Copy, Clone)]
pub struct GameContext {
pub name: felt252,
pub value: felt252,
}
```
## MinigameComponent
The MinigameComponent is the foundation that every game contract embeds. It handles registration with the game registry, initialization, and provides the interface that the token contract calls to read game state.
### Core Interface: IMinigameTokenData
Every game **must** implement this trait:
```cairo
#[starknet::interface]
pub trait IMinigameTokenData {
fn score(self: @TState, token_id: felt252) -> u64;
fn game_over(self: @TState, token_id: felt252) -> bool;
fn score_batch(self: @TState, token_ids: Span) -> Array;
fn game_over_batch(self: @TState, token_ids: Span) -> Array;
}
```
Interface ID: `IMINIGAME_ID` - must be registered via SRC5.
### Optional Interfaces
#### IMinigameDetails
Rich game state for display:
```cairo
#[starknet::interface]
pub trait IMinigameDetails {
fn token_name(self: @TState, token_id: felt252) -> ByteArray;
fn token_description(self: @TState, token_id: felt252) -> ByteArray;
fn game_details(self: @TState, token_id: felt252) -> Array;
fn token_name_batch(self: @TState, token_ids: Span) -> Array;
fn token_description_batch(self: @TState, token_ids: Span) -> Array;
fn game_details_batch(
self: @TState, token_ids: Span,
) -> Array>;
}
```
#### IMinigameTokenSettings
Configurable game modes:
```cairo
#[starknet::interface]
pub trait IMinigameTokenSettings {
fn create_settings(
ref self: TState,
name: ByteArray,
description: ByteArray,
settings: Span,
) -> u32;
fn settings_exists(self: @TState, settings_id: u32) -> bool;
fn settings_count(self: @TState) -> u32;
fn settings_details(self: @TState, settings_id: u32) -> GameSettingDetails;
fn settings_details_batch(
self: @TState, settings_ids: Span,
) -> Array;
}
```
#### IMinigameTokenObjectives
Trackable achievements:
```cairo
#[starknet::interface]
pub trait IMinigameTokenObjectives {
fn create_objective(
ref self: TState,
name: ByteArray,
description: ByteArray,
objectives: Span,
) -> u32;
fn objective_exists(self: @TState, objective_id: u32) -> bool;
fn objectives_count(self: @TState) -> u32;
fn completed_objective(self: @TState, token_id: felt252, objective_id: u32) -> bool;
fn objectives_details(self: @TState, objective_id: u32) -> GameObjectiveDetails;
fn objectives_details_batch(
self: @TState, objective_ids: Span,
) -> Array;
fn completed_objective_batch(
self: @TState, token_ids: Span, objective_id: u32,
) -> Array;
}
```
### Component Storage
The MinigameComponent stores:
* MinigameToken address
* Settings contract address
* Objectives contract address
```cairo
#[storage]
struct Storage {
token_address: ContractAddress,
settings_address: ContractAddress,
objectives_address: ContractAddress,
}
```
### Initialization
```cairo
self.minigame.initializer(
game_creator, // Address that receives creator NFT
game_name, // "Number Guess"
game_description, // "Guess the secret number"
game_developer, // "Provable Games"
game_publisher, // "Provable Games"
game_genre, // "Puzzle"
game_image, // Image URL
game_color, // Option - hex color
client_url, // Option - game client URL
renderer_address, // Option - custom renderer
settings_address, // Option - settings provider
objectives_address, // Option - objectives provider
minigame_token_address, // MinigameToken contract address
royalty_fraction, // Option - basis points
skills_address, // Option - AI agent skills
version, // u64 - game version number
);
```
During initialization, the component:
1. Registers the game with the MinigameRegistry
2. Stores the assigned game\_id
3. Registers SRC5 interfaces (`IMINIGAME_ID`)
### Events
```cairo
#[event]
enum Event {
ScoreUpdate: ScoreUpdate,
GameOver: GameOver,
}
#[derive(Drop, starknet::Event)]
struct ScoreUpdate {
#[key]
token_id: felt252,
score: u64,
}
#[derive(Drop, starknet::Event)]
struct GameOver {
#[key]
token_id: felt252,
final_score: u64,
}
```
### Data Structures
#### GameDetail
```cairo
#[derive(Drop, Serde, Copy)]
pub struct GameDetail {
pub name: felt252,
pub value: felt252,
}
```
#### GameSettingDetails
```cairo
#[derive(Drop, Serde)]
pub struct GameSettingDetails {
pub name: ByteArray,
pub description: ByteArray,
pub settings: Span,
}
#[derive(Drop, Serde)]
pub struct GameSetting {
pub name: felt252,
pub value: felt252,
}
```
#### GameObjectiveDetails
```cairo
#[derive(Drop, Serde)]
pub struct GameObjectiveDetails {
pub name: ByteArray,
pub description: ByteArray,
pub objectives: Span,
}
#[derive(Drop, Serde, Copy)]
pub struct GameObjective {
pub name: felt252,
pub value: felt252,
}
```
## MinigameRegistryComponent
The MinigameRegistryComponent manages game registration, discovery, and metadata. It is itself an ERC721 — registering a game mints a creator NFT that controls royalties.
For usage examples and integration patterns, see [Registry & Discovery](/embeddable-game-standard/building-a-platform/registry).
### IMinigameRegistry
```cairo
pub const IMINIGAME_REGISTRY_ID: felt252 =
0x2ff8aa8dda405faf0eb17c5f806d7482b7352cf91fa9668e9ddf030f14b2ee9;
#[starknet::interface]
pub trait IMinigameRegistry {
// Discovery
fn game_count(self: @TState) -> u64;
fn game_id_from_address(self: @TState, contract_address: ContractAddress) -> u64;
fn game_address_from_id(self: @TState, game_id: u64) -> ContractAddress;
fn game_metadata(self: @TState, game_id: u64) -> GameMetadata;
fn is_game_registered(self: @TState, contract_address: ContractAddress) -> bool;
fn skills_address(self: @TState, game_id: u64) -> ContractAddress;
// Registration
fn register_game(
ref self: TState,
creator_address: ContractAddress,
name: ByteArray,
description: ByteArray,
developer: ByteArray,
publisher: ByteArray,
genre: ByteArray,
image: ByteArray,
color: Option,
client_url: Option,
renderer_address: Option,
royalty_fraction: Option,
skills_address: Option,
version: u64,
) -> u64;
// Admin
fn set_game_royalty(ref self: TState, game_id: u64, royalty_fraction: u128);
// Batch queries
fn game_metadata_batch(self: @TState, game_ids: Span) -> Array;
fn games_registered_batch(
self: @TState, addresses: Span,
) -> Array;
fn get_games(self: @TState, start: u64, count: u64) -> Array;
// Filtered queries
fn get_games_by_developer(
self: @TState, developer: ByteArray, start: u64, count: u64,
) -> Array;
fn get_games_by_publisher(
self: @TState, publisher: ByteArray, start: u64, count: u64,
) -> Array;
fn get_games_by_genre(
self: @TState, genre: ByteArray, start: u64, count: u64,
) -> Array;
}
```
### GameMetadata
```cairo
#[derive(Drop, Serde, Clone, starknet::Store)]
pub struct GameMetadata {
pub contract_address: ContractAddress,
pub name: ByteArray,
pub description: ByteArray,
pub developer: ByteArray,
pub publisher: ByteArray,
pub genre: ByteArray,
pub image: ByteArray,
pub color: ByteArray,
pub client_url: ByteArray,
pub renderer_address: ContractAddress,
pub skills_address: ContractAddress,
pub royalty_fraction: u128,
pub created_at: u64,
pub version: u64,
}
```
### Component Storage
```cairo
#[storage]
struct Storage {
game_counter: u64,
game_id_by_address: Map,
game_metadata: Map,
}
```
### Events
```cairo
#[derive(Drop, starknet::Event)]
struct GameMetadataUpdate {
#[key]
game_id: u64,
metadata: GameMetadata,
}
#[derive(Drop, starknet::Event)]
struct GameRegistryUpdate {
#[key]
game_id: u64,
contract_address: ContractAddress,
}
#[derive(Drop, starknet::Event)]
struct GameRoyaltyUpdate {
#[key]
game_id: u64,
royalty_fraction: u128,
}
```
### Hooks
The registry component provides hooks for custom behavior:
```cairo
pub trait MinigameRegistryHooksTrait {
fn before_register_game(
ref self: TContractState,
caller_address: ContractAddress,
creator_address: ContractAddress,
);
fn after_register_game(
ref self: TContractState,
game_id: u64,
creator_address: ContractAddress,
);
}
```
The Denshokan implementation uses `after_register_game` to mint a creator ERC721 to the `creator_address`.
## Token Extensions
The MinigameToken supports optional extensions that add functionality beyond the core `IMinigameToken` interface. Each extension has its own SRC5 interface ID and can be independently checked and queried.
### Minter Extension
Tracks which contracts have minted tokens. Each minter receives an auto-incrementing ID that gets packed into token IDs.
#### IMinigameTokenMinter
```cairo
pub const IMINIGAME_TOKEN_MINTER_ID: felt252 =
0x2198424b9ee68499f53f33ad952598acbd6d141af6c6863c9c56b117063acca;
#[starknet::interface]
pub trait IMinigameTokenMinter {
fn get_minter_address(self: @TState, minter_id: u64) -> ContractAddress;
fn get_minter_id(self: @TState, minter_address: ContractAddress) -> u64;
fn minter_exists(self: @TState, minter_address: ContractAddress) -> bool;
fn total_minters(self: @TState) -> u64;
}
```
Minters are registered automatically on first mint. The minter ID (truncated to 40 bits) is packed into the token ID so it can be decoded without storage lookups.
### Renderer Extension
Allows per-token custom renderers. When a token has a custom renderer, `token_uri()` delegates to that contract instead of the default renderer.
#### IMinigameTokenRenderer
```cairo
pub const IMINIGAME_TOKEN_RENDERER_ID: felt252 =
0x2899a752da88d6acf4ed54cc644238f3956b4db3c9885d3ad94f6149f0ec465;
#[starknet::interface]
pub trait IMinigameTokenRenderer {
fn get_renderer(self: @TState, token_id: felt252) -> ContractAddress;
fn has_custom_renderer(self: @TState, token_id: felt252) -> bool;
fn reset_token_renderer(ref self: TState, token_id: felt252);
// Batch operations
fn reset_token_renderer_batch(ref self: TState, token_ids: Span);
fn get_renderer_batch(
self: @TState, token_ids: Span,
) -> Array;
}
```
The renderer address can be set at mint time via `MintParams.renderer_address`, or overridden later by the token owner using `set_token_renderer` on the core token interface.
### Skills Extension
Per-token AI agent skills. Each token can override the game's default skills provider with a custom one.
#### ISkills
The external contract interface that skills providers implement:
```cairo
pub const ISKILLS_ID: felt252 =
0x39fae678a19cd9b999da1d9ad54f00e686406974a4ced6f7eb51c8959aabd98;
#[starknet::interface]
pub trait ISkills {
fn skills(self: @TState, token_id: felt252) -> ByteArray;
}
```
#### IMinigameTokenSkills
The token extension interface for per-token skills address management:
```cairo
pub const IMINIGAME_TOKEN_SKILLS_ID: felt252 =
0x33846532a9b9e859675aaa1a6c3ae6a45ccf1920c83e2d34898fa2f116201b3;
#[starknet::interface]
pub trait IMinigameTokenSkills {
fn get_skills_address(self: @TState, token_id: felt252) -> ContractAddress;
fn has_custom_skills(self: @TState, token_id: felt252) -> bool;
fn reset_token_skills(ref self: TState, token_id: felt252);
// Batch operations
fn reset_token_skills_batch(ref self: TState, token_ids: Span);
fn get_skills_address_batch(
self: @TState, token_ids: Span,
) -> Array;
}
```
Resolution order: per-token override > game-level default (from registry) > zero address (no skills).
### Settings Extension
Stores game settings metadata on the token contract. The game contract creates settings via `create_settings`, and the token contract stores the display metadata for SDK/RPC queries.
#### IMinigameTokenSettings
```cairo
pub const IMINIGAME_TOKEN_SETTINGS_ID: felt252 =
0x3c6f5c714fef5141bb7edbbbf738c80782154e825a5675355c937aa9bc07bae;
#[starknet::interface]
pub trait IMinigameTokenSettings {
fn create_settings(
ref self: TState,
game_address: ContractAddress,
creator_address: ContractAddress,
settings_id: u32,
settings_details: GameSettingDetails,
);
}
```
Called by the `SettingsComponent` in the game contract during `create_settings`. The token contract emits events that the indexer picks up for SDK queries.
### Objectives Extension
Stores objective metadata on the token contract. Mirrors the pattern of the Settings extension.
#### IMinigameTokenObjectives
```cairo
pub const IMINIGAME_TOKEN_OBJECTIVES_ID: felt252 =
0x1e9f4982a68b67ddda6e894e8e620fe12ae877cf303308fe16814ceb2706077;
#[starknet::interface]
pub trait IMinigameTokenObjectives {
fn create_objective(
ref self: TState,
game_address: ContractAddress,
creator_address: ContractAddress,
objective_id: u32,
objective_details: GameObjectiveDetails,
);
}
```
Called by the `ObjectivesComponent` in the game contract during `create_objective`. The token contract stores and indexes the metadata.
### Context Extension
The context extension is an SRC5-only marker — there is no corresponding trait. The constant is used to indicate that a token contract supports context data:
```cairo
pub const IMINIGAME_TOKEN_CONTEXT_ID: felt252 =
0x02b329e82f6f6b94f8949b36c5dc95acf86c6083b08d99bc81e399b4b0e8d19a;
```
Context data is attached to tokens at mint time via `MintParams.context` and is read through the metagame's [IMetagameContextDetails](/embeddable-game-standard/reference/metagame#imetagamecontextdetails) interface.
## MinigameToken (ERC721)
The MinigameToken is the central ERC721 contract that represents game sessions. It composes multiple game-components and packs immutable game data directly into the token ID.
### IMinigameTokenMixin
The full token interface combines core ERC721, game lifecycle, and optional extensions:
#### Core Methods
```cairo
// Minting
fn mint(ref self: TState, params: MintParams) -> felt252;
fn mint_batch(ref self: TState, params: Array) -> Array;
// Game lifecycle
fn update_game(ref self: TState, token_id: felt252);
fn update_game_batch(ref self: TState, token_ids: Span);
// Token metadata
fn token_metadata(self: @TState, token_id: felt252) -> TokenMetadata;
fn token_metadata_batch(self: @TState, token_ids: Span) -> Array;
fn token_mutable_state(self: @TState, token_id: felt252) -> TokenMutableState;
fn token_mutable_state_batch(self: @TState, token_ids: Span) -> Array;
// Game address resolution
fn token_game_address(self: @TState, token_id: felt252) -> ContractAddress;
fn token_game_address_batch(self: @TState, token_ids: Span) -> Array;
// Playability
fn is_playable(self: @TState, token_id: felt252) -> bool;
fn is_playable_batch(self: @TState, token_ids: Span) -> Array;
```
#### Player Name Methods
```cairo
fn player_name(self: @TState, token_id: felt252) -> felt252;
fn player_name_batch(self: @TState, token_ids: Span) -> Array;
fn update_player_name(ref self: TState, token_id: felt252, name: felt252);
fn update_player_name_batch(ref self: TState, updates: Span);
```
#### Settings Extension
```cairo
fn settings_id(self: @TState, token_id: felt252) -> u32;
fn settings_id_batch(self: @TState, token_ids: Span) -> Array;
```
#### Objectives Extension
```cairo
fn objective_id(self: @TState, token_id: felt252) -> u32;
fn objective_id_batch(self: @TState, token_ids: Span) -> Array;
```
#### Minter Extension
```cairo
fn minted_by(self: @TState, token_id: felt252) -> felt252;
fn minted_by_batch(self: @TState, token_ids: Span) -> Array;
```
#### Full State & Batch Extensions
```cairo
fn token_full_state_batch(
self: @TState, token_ids: Span,
) -> Array;
fn mint_batch_recipients(
ref self: TState, params: Array, recipients: Array,
) -> Array;
fn game_address(self: @TState) -> ContractAddress;
fn game_registry_address(self: @TState) -> ContractAddress;
fn client_url(self: @TState, token_id: felt252) -> ByteArray;
fn assert_is_playable(self: @TState, token_id: felt252);
```
#### TokenFullState
```cairo
#[derive(Copy, Drop, Serde)]
pub struct TokenFullState {
pub token_id: felt252,
pub owner: ContractAddress,
pub player_name: felt252,
pub is_playable: bool,
pub game_address: ContractAddress,
pub game_over: bool,
pub completed_objective: bool,
pub lifecycle: Lifecycle,
}
```
#### Soulbound Extension
```cairo
fn is_soulbound(self: @TState, token_id: felt252) -> bool;
fn is_soulbound_batch(self: @TState, token_ids: Span) -> Array;
```
#### Renderer Extension
```cairo
fn renderer_address(self: @TState, token_id: felt252) -> ContractAddress;
fn renderer_address_batch(self: @TState, token_ids: Span) -> Array;
fn set_token_renderer(ref self: TState, token_id: felt252, renderer: ContractAddress);
fn reset_token_renderer(ref self: TState, token_id: felt252);
```
#### Skills Extension
```cairo
fn skills_address(self: @TState, token_id: felt252) -> ContractAddress;
fn skills_address_batch(self: @TState, token_ids: Span) -> Array;
fn set_token_skills(ref self: TState, token_id: felt252, skills: ContractAddress);
fn reset_token_skills(ref self: TState, token_id: felt252);
```
### MintParams
```cairo
#[derive(Drop, Serde)]
pub struct MintParams {
pub game_address: ContractAddress,
pub player_name: Option,
pub settings_id: Option,
pub start: Option,
pub end: Option,
pub objective_id: Option,
pub context: Option,
pub client_url: Option,
pub renderer_address: Option,
pub skills_address: Option,
pub to: ContractAddress,
pub soulbound: bool,
pub paymaster: bool,
pub salt: u16,
pub metadata: u16,
}
```
### TokenMetadata
```cairo
#[derive(Copy, Drop, Serde)]
pub struct TokenMetadata {
pub game_id: u64,
pub minted_at: u64,
pub settings_id: u32,
pub lifecycle: Lifecycle,
pub minted_by: u64,
pub soulbound: bool,
pub game_over: bool,
pub completed_objective: bool,
pub has_context: bool,
pub objective_id: u32,
pub paymaster: bool,
pub metadata: u16,
}
```
### TokenMutableState
Only two fields are mutable after minting:
```cairo
#[derive(Copy, Drop, Serde)]
pub struct TokenMutableState {
pub game_over: bool,
pub completed_objective: bool,
}
```
These are stored separately and packed into a single `felt252` using `StorePacking` (2 bits total).
### Packed Token IDs
Token IDs are `felt252` values with 13 fields packed into 251 bits. This allows reading immutable token data without any storage lookups.
See [Packed Token IDs](/embeddable-game-standard/advanced/packed-token-ids) for the bit layout and decoding.
## Frontend Integration
> **Always use `@provable-games/denshokan-sdk` for client-side interactions.** The SDK handles data source selection, fallback, type safety, and packed token ID decoding automatically. Direct RPC calls should only be needed for write operations.
> **Source**: [denshokan-sdk](https://github.com/Provable-Games/denshokan-sdk)
The `@provable-games/denshokan-sdk` provides everything you need to integrate EGS game data into your frontend: a client for querying data, React hooks for declarative UI, and WebSocket subscriptions for real-time updates.
### Installation
```bash
npm install @provable-games/denshokan-sdk
# or
pnpm add @provable-games/denshokan-sdk
```
**Peer dependencies** (install if you need them):
* `react >=18.0.0` - Required for React hooks
* `starknet >=9.0.0` - Required for RPC methods
### Quick Start
#### Vanilla TypeScript
```typescript
import { DenshokanClient } from "@provable-games/denshokan-sdk";
const client = new DenshokanClient({
chain: "mainnet",
});
// List all registered games
const games = await client.getGames();
// Get a specific token
const token = await client.getToken("0x123...");
// Decode a packed token ID (no RPC call needed)
const decoded = client.decodeTokenId("0x123...");
console.log(decoded.gameId, decoded.settingsId, decoded.mintedAt);
```
#### React
```tsx
import {
DenshokanProvider,
useGames,
useToken,
} from "@provable-games/denshokan-sdk/react";
function App() {
return (
);
}
function GameList() {
const { data: games, isLoading, error } = useGames();
if (isLoading) return
Loading...
;
if (error) return
Error: {error.message}
;
return (
{games?.data.map((game) => (
{game.name}
))}
);
}
```
### Data Source Architecture
The SDK provides three data paths, automatically choosing the best one:
| Source | Speed | Freshness | Use Case |
| ------------- | --------- | ---------------------- | ------------------------------------------------------ |
| **REST API** | Fast | Indexed (slight delay) | Lists, search, aggregation, pagination |
| **WebSocket** | Real-time | Live | Score updates, new mints, game completions |
| **RPC** | Slower | On-chain truth | ERC721 methods, batch contract reads, write operations |
#### Smart Fallback
If the API is unavailable, the SDK automatically falls back to RPC:
```
Request → Try API → Success → Return data
→ Failure → Try RPC → Success → Return data
→ Failure → Throw DataSourceError
```
Configure the primary source:
```typescript
const client = new DenshokanClient({
chain: "mainnet",
primarySource: "api", // Default: try API first, fallback to RPC
// or
primarySource: "rpc", // Always use RPC (no API dependency)
});
```
### Three Integration Options
#### 1. React Hooks (Recommended)
Best for React apps. Handles loading states, caching, and re-fetching automatically.
```tsx
const { data, isLoading, error, refetch } = useGames();
```
[React Hooks Reference →](/embeddable-game-standard/frontend/react-hooks)
#### 2. DenshokanClient
Best for non-React apps, server-side code, or when you need full control.
```typescript
const client = new DenshokanClient({ chain: "mainnet" });
const games = await client.getGames();
```
[SDK Reference →](/embeddable-game-standard/frontend/sdk)
#### 3. WebSocket Subscriptions
Best for live dashboards, real-time leaderboards, and notifications. Eight typed hooks provide per-channel subscriptions with event buffering:
```tsx
import { useScoreUpdates } from "@provable-games/denshokan-sdk/react";
const { lastEvent, events, isConnected } = useScoreUpdates({
gameIds: [1],
bufferSize: 50,
});
```
Or use the client directly:
```typescript
const unsub = client.subscribe(
{ channels: ["scores", "game_over"], gameIds: [1] },
(message) => console.log(message),
);
```
[WebSocket Reference →](/embeddable-game-standard/frontend/websockets)
## React Hooks
The SDK provides React hooks for declarative data fetching. All hooks return `{ data, isLoading, error, refetch }` and handle loading states automatically.
### Setup
Wrap your app with `DenshokanProvider`:
```tsx
import { DenshokanProvider } from "@provable-games/denshokan-sdk/react";
function App() {
return (
);
}
```
#### Provider Props
```typescript
interface DenshokanProviderProps {
children: ReactNode;
config?: DenshokanClientConfig; // Create a new client from config
client?: DenshokanClient; // Or pass an existing client
}
```
You can pass either `config` (and a client will be created) or `client` (to reuse an existing instance).
#### Accessing the Client
```tsx
import { useDenshokanClient } from "@provable-games/denshokan-sdk/react";
function MyComponent() {
const client = useDenshokanClient();
// Use client for custom queries or write operations
}
```
### Data Hooks
#### Games
```tsx
import { useGames, useGame, useGameStats } from "@provable-games/denshokan-sdk/react";
function GameList() {
const { data: games, isLoading } = useGames({ limit: 20, offset: 0 });
return games?.data.map(game => (
);
}
```
:::note
When `includeUri: true` is passed to `useTokens` or `usePlayerTokens`, an additional `isLoadingUri` flag is returned. It is `true` while token URIs are being fetched in the background via batch RPC. The main `data` is available immediately — URIs populate asynchronously.
:::
#### Players
```tsx
import { usePlayerStats, usePlayerTokens } from "@provable-games/denshokan-sdk/react";
function PlayerProfile({ address }: { address: string }) {
const { data: stats } = usePlayerStats(address);
const { data: tokens } = usePlayerTokens(address, {
gameAddress: "0x1234...",
});
return (