Skip to content

proofofgame/find2earn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skullcoin Labs — Encrypted NFT Contracts (eNFT)

Smart contracts powering Encrypted NFT (eNFT) primitive and the Seed Phrase Hunt game mode on Stacks (Bitcoin L2).

NFTs with two layers: public metadata visible to everyone, and a private payload accessible only to the current owner.
This enables incomplete-information games on-chain — negotiation, bluffing, and strategy that transparent ledgers normally make difficult.


What’s inside

Contract Purpose
skullcoin-competitive-seed-base Core game logic — minting, burning, payouts, sale control
skullcoin-competitive-seed-phase1 Phase 1 NFT collection (base tier)
skullcoin-competitive-seed-phase2 Phase 2 NFT collection (upgrade tier, created via Phase 1 burns)

Seed Phrase Hunt (game mode)

Each NFT carries a hidden BIP-39 seed phrase word as its private payload. Players mint, trade, and negotiate to assemble a complete phrase that unlocks a prize.

Upgrade loop: burning 5× Phase 1 NFTs → mints 1× Phase 2 NFT, creating a deflationary “merge” mechanic that makes rarer payloads harder to obtain.


Deployed contracts (Mainnet)

Replace the links below with the exact Hiro Explorer URLs that open correctly.


Contract API

Game control (owner-only)

Function Description
flip-sale Toggle public minting on/off
flip-burn Toggle burning (phase upgrades) on/off
deposit-ft Deposit SIP-010 tokens into the contract (prize pool)
withdraw-ft Withdraw SIP-010 tokens from the contract
withdraw-stx Withdraw STX from the contract

Player actions

Function Description
claim-one Mint 1 NFT
claim-five Mint 5 NFTs
claim-ten Mint 10 NFTs
claim-twenty-five Mint 25 NFTs
burn-phase-1 Burn 5 Phase 1 NFTs → receive Phase 2 NFT
burn-phase-2 Burn 5 Phase 2 NFTs → receive higher-tier reward (mode-specific)

Read-only

Function Description
sale-enabled Check if public minting is active
burn-enabled Check if burning is active

Internal (implementation detail)

Function Description
claim Single-mint helper used by batch functions
send-ft-to-winner Distribute SIP-010 prize tokens under game-defined conditions

How the encrypted layer works (high level)

The contracts handle ownership, transfers, minting, burning, and payouts.
The private payload is gated by ownership: only the current owner can access/decrypt it via a signed request.

Current model (v1 — hybrid):

  • On-chain: NFT ownership + commitment hash + transfer/burn logic
  • Off-chain (app layer): encrypted payload storage + owner-gated decryption
  • Commitment hash prevents payload swaps (the app must match the on-chain commitment)

Roadmap (optional): We aim to reduce trust assumptions over time (e.g., more on-chain storage / stronger verification guarantees).
See SIP + docs for the evolving spec and security considerations.


Development

Requirements: Clarinet (Hiro) — https://github.com/hirosystems/clarinet

# Run tests
clarinet test

# Check contracts
clarinet check

# Console (local devnet)
clarinet console

Project structure:

contracts/ # Clarity smart contracts settings/ # Clarinet deployment configs Clarinet.toml # Project manifest

License

GPL-3.0

About

Core protocol logic: Encrypted NFTs

Topics

Resources

License

Stars

Watchers

Forks

Contributors