Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 2.16 KB

File metadata and controls

62 lines (46 loc) · 2.16 KB

👑 Throne: King of Solana

A decentralized on-chain game inspired by King of the Ether, rebuilt for Solana.
Players compete to claim virtual thrones by paying SOL. Each new monarch deposes the previous one, potentially earning them rewards - but risk losing everything if the X-day ancient curse ends their reign.


📜 Rules

  1. Claim Price

    • Starting price: starting_price_lamports lamports (the smallest unit of value in SOL crypto).
    • Each successful claim increases the price by price_adjust_percent%.
    • If a monarch is cursed, the throne resets to the starting price.
  2. Claiming the Throne

    • User sends the exact claim price in SOL along with a chosen name.
    • If throne is empty (initial or cursed):
      • Full claim price goes to the throne’s treasury.
    • If throne is occupied (monarch alive):
      • Previous monarch receives (100% - commission) of claim price.
      • Throne’s treasury receives the commission_bps %.
  3. Ancient Curse

    • Each monarch reign lasts curse_duration_secs days (between 1 and 90 days).
    • If time expires, monarch is cursed and throne resets.
    • No compensation is given to the cursed monarch.
  4. Multiple Thrones

    • Any user can create their own throne.
    • Each throne has:
      • Its own treasury account (defined by creator).
      • Its own economic flow.
    • A creation fee (constant for now) must be paid to the global treasury when creating a new throne.

⚙️ Build

cd programs
cargo build-sbf

🧪 Testing

cargo test -- --no-capture

🔮 Roadmap

[+] Multiple thrones support -> allow multiple throne instances in the contract.
[+] Configurable Thrones -> dynamic throne settings.
[+] Core Test Coverage -> ensure critical functionality is tested.
[ ] Editable Throne Configurations -> update throne parameters after initialization.
[ ] Global treasury governance
[ ] User PDA Accounts -> replace direct wallet accounts usage with PDA.
[ ] On-Chain Monarch Metadata -> store and manage monarch identifiers in smart contract.
[ ] Web client