Skip to content

raunit-dev/seeker_staking

Repository files navigation

Seeker Staking

SKR-only custodial season ledger for the Seeker game.

Contract Flow

deposit -> play -> settle -> release -> withdraw

Users deposit real SKR into the team vault. Gameplay changes only the on-chain ledger. settle_war is atomic — it slashes the loser and credits all winners in one transaction. MagicBlock session tokens, created once during onboarding, are validated as the user's standing consent for the program to modify their User PDA.

Authority Model

  • admin: team/multisig authority for config, seasons, releases, withdrawals, and vault operations.
  • game_authority: backend hot signer; the only on-chain signer for settle_war.
  • user MagicBlock session: standing consent for the program to modify the user's PDA (no signing on each settle).

game_authority is stored by the backend, but it is intentionally not the admin key. Store it in a KMS/HSM/secret manager, fund it with limited SOL, monitor usage, and rotate it from admin if it is ever exposed.

Setup

Install:

  • Rust + Cargo
  • Solana CLI
  • Anchor CLI 0.32.1
  • Node.js + Yarn
  • Surfpool 1.2.x

Then:

yarn install
anchor build

Test

# terminal 1
yarn surfpool

# terminal 2
yarn test
  • flow.md: quick product/backend flow
  • spec.md: full protocol spec
  • tests/seeker_staking.ts: Surfpool mainnet-fork test suite

SDK : Will be added once the contract is finalized (TS support)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors