NFT · Blockchain
Kaiju Cards
On-chain NFT summoning game on Solana
Overview
Kaiju Cards is a blockchain card game on Solana. Players spend Gems, the game's SPL token, to summon new Kaiju from a selected card, and each summon mints a brand-new NFT on-chain.
I wrote the Rust/Anchor program that handles summoning, Gem escrow, and NFT minting, and worked on the Node.js backend alongside another developer — the server that prepares each summon and co-signs it.
What it does
- Summoning: spend Gems (SPL token) on a selected card to mint a new Kaiju NFT
- Gem escrow inside the program, withdrawn by the admin to a fee collector
- NFT minting with Metaplex on-chain metadata from a program-derived mint
- Server co-signing: every summon needs the admin and Kaiju creator signatures
- Admin-updatable config: authorities, Gems mint, and fee collector
The hard parts
Summoning as one atomic transaction
A summon moves the player's Gems into escrow, creates the new mint, creates the player's token account, writes Metaplex metadata, and mints the NFT. The program does all of it in a single instruction, so a summon either fully succeeds or leaves nothing behind — no paid-but-unminted states.
Only the game can mint
Metadata and card stats come from the game, not the player. The instruction requires signatures from both the admin and the Kaiju creator, checked against the on-chain config — so the server approves every summon and nobody can mint a Kaiju by calling the program directly.
Program-derived mints
Each new card's mint is a PDA derived from a per-summon seed, created and initialized by the program itself. Mint addresses are deterministic and controlled by the program, and summon state is recorded in its own account for the backend to track.