On-chain registry mapping token symbols to verified mints. DNS for Solana token symbols.
# Build and run all tests
anchor test# Setup
cd app && npm install
# Register a symbol (5 years, pays SOL via Pyth oracle)
npx tsx demo.ts init
npx tsx demo.ts register BONK DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 5
# Lookup
npx tsx demo.ts lookup BONK
npx tsx demo.ts lookup-mint DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263
npx tsx demo.ts pda BONK
# Manage
npx tsx demo.ts renew BONK 3 # extend registration
npx tsx demo.ts update-mint BONK <NEW_MINT> # change associated mint
npx tsx demo.ts transfer BONK <NEW_OWNER> # transfer ownership
npx tsx demo.ts cancel BONK # cancel and reclaim rentconst [symbolPda] = PublicKey.findProgramAddressSync(
[Buffer.from("symbol"), Buffer.from("BONK")],
TNS_PROGRAM_ID
);
const account = await program.account.symbol.fetch(symbolPda);
// account.mint, account.owner, account.expiresAt| Instruction | Description |
|---|---|
initialize |
Initialize protocol config (admin) |
update_config |
Update config parameters (admin) |
register_symbol |
Register a new symbol |
renew_symbol |
Extend registration |
expire_symbol |
Crank to expire past grace period |
update_mint |
Change associated mint (owner) |
transfer_ownership |
Transfer symbol ownership |
update_sns_domain |
Link SNS .sol domain |
- Base: $10/year (USD, converted via Pyth SOL/USD oracle)
- Multi-year discounts: 5% (2yr) → 25% (10yr)
- 90-day grace period after expiration
- 10% keeper reward for expire cranks
- Genesis: Admin-only registration for all symbol types
- Open: Verified → mint authority, Reserved → admin, Not listed → anyone
- Full: All restrictions removed, anyone can register any symbol
TradFi symbols are reserved to prevent collisions with future RWA tokenization. Data is fetched from Wikipedia (major indexes) and FMP (full market coverage).
# Fetch index data only (no API key needed)
pnpm fetch:reserved:indexes
# Fetch all data including FMP (requires API key)
pnpm fetch:reserved
# Regenerate Rust code from JSON data
pnpm generate:reservedAPI Key: FMP data requires a Financial Modeling Prep API key. Copy .env.example to .env and add your key.