Cat on-chain · A living pet powered by Solana
Maya is a living, on-chain cat.
She lives entirely on the Solana blockchain.
Anyone on the internet can feed her, play with her, and keep her alive — together.
If the community stops caring…
Maya’s health decays.
And if neglected long enough, she dies forever.
This is not a simulation.
This is a shared responsibility.
- 🧠 Single global pet (not NFTs, not copies)
- ⛓ On-chain state is the source of truth
- 🌐 Anyone can interact
- 💸 Feeding costs SOL
- ⏳ Time-based decay
- ☠️ Permanent death
Maya lives only if the world keeps her alive.
Anyone can:
- 🍽 Feed Maya → increases health & happiness (costs SOL)
- 🧶 Play with Maya → increases happiness
- ⏳ Let time pass → health & happiness decay automatically
- Hunger and happiness decay over time
- Decay is enforced on-chain
- If hunger reaches
0, Maya dies permanently
- Every interaction is public
- Latest feeders are visible
- The chain remembers who cared
- Global PDA for Maya
- Time-based decay logic
- SOL escrow inside the pet account
- Owner-only withdrawal
- Emitted events for real-time UI
- Wallet-based interaction (Phantom)
- Real-time account & event subscriptions
- Animated cat (happy, sad, eating, dead)
- Live health & happiness bars
- Feed history & community activity
- Solana
- Anchor
- Rust
- Next.js
- @coral-xyz/anchor
- @solana/wallet-adapter
- Three.js / React Three Fiber (for 3D cat)
make sure you are running validator
solana-test-validator --resetanchor buildanchor Deploycd maya/appnpm install && npm run devvoila! keep your pet alive
Inside
app/Create a.env.local.exampleand place this
# Maya Frontend Configuration
# Copy this to .env.local and update the values
# The Program ID of your deployed Anchor program
NEXT_PUBLIC_PROGRAM_ID=JSkdjZGLt8gKvFsQCB2Kzd7ERgUEk1FXNJEeUiw9PWM
# The Public Key that is authorized to initialize the pet (defined in lib.rs)
NEXT_PUBLIC_OWNER_KEY=9Yz1ZHg1SFzrhHgVXKnLSBSUBtzo8uTsmwHpkzcbmNzv
# The Solana RPC Endpoint to connect to
NEXT_PUBLIC_RPC_ENDPOINT=http://localhost:8899
Change program id, and wallet id (owner key, only this wallet can initialize the pet) according to your choice.
Inside
programs/maya/src/constants.rs
Change
OWNER: pubkeyas your choice.
Make sure your
program idinlib.rsandAnchor.tomlis matching.
(these keys should match with the keys that you pasted on frontend .env)
