CHALLENGE ARENA

CHALLENGES

Standalone coding challenges to sharpen your Solana skills.

LIVE CHALLENGE
BEGINNERtoken

Associated Token Constraint

Ensure a given token account is the valid ATA for a user.

50 XP
START CHALLENGE →
ALL MISSIONS (50)
BEGINNERtoken

Associated Token Constraint

Ensure a given token account is the valid ATA for a user.

50 XP
START CHALLENGE →
BEGINNERrust-anchor

Custom Errors

Define custom error codes using Anchor's error! macro.

50 XP
START CHALLENGE →
ADVANCEDsecurity

Account Discriminator Checking

Anchor checks 8-byte discriminators automatically to stop type cosplay. How do you do it manually?

100 XP
START CHALLENGE →
INTERMEDIATErust-anchor

Keccak256 Hash

Hash arbitrary data on-chain using Keccak256.

75 XP
START CHALLENGE →
ADVANCEDpda

CPI Signer Seeds

Sign a CPI call with a PDA.

100 XP
START CHALLENGE →
INTERMEDIATEtoken-extensions

Non-Transferable Mint

Create soulbound tokens that cannot be sent to others.

75 XP
START CHALLENGE →
INTERMEDIATEtoken-extensions

Immutable Owner Extension

Prevent token account ownership from being transferred.

75 XP
START CHALLENGE →
INTERMEDIATEtoken-extensions

Token-2022 Memo Transfer

Require all token transfers to include a memo.

75 XP
START CHALLENGE →
ADVANCEDcpi

Set Return Data

Return arbitrary bytes to the caller of your program.

100 XP
START CHALLENGE →
ADVANCEDrust-anchor

Fallback Instruction

Handle unknown instruction discriminators dynamically.

100 XP
START CHALLENGE →
INTERMEDIATEcpi

System Transfer CPI

Transfer native SOL via System Program.

75 XP
START CHALLENGE →
INTERMEDIATEcpi

Token Burn CPI

Burn SPL tokens via CPI.

75 XP
START CHALLENGE →
INTERMEDIATEcpi

Token Mint CPI

Mint new SPL tokens via CPI.

75 XP
START CHALLENGE →
INTERMEDIATEcpi

Token Transfer CPI

Transfer SPL tokens via Cross-Program Invocation.

75 XP
START CHALLENGE →
INTERMEDIATEtoken

Mint Constraint

Verify specific properties of a Token Mint account.

75 XP
START CHALLENGE →
INTERMEDIATEsecurity

Owner Constraint

Verify that an account is owned by a specific program.

75 XP
START CHALLENGE →
INTERMEDIATEsecurity

Address Constraint

Hardcode a specific required public key for an account.

75 XP
START CHALLENGE →
INTERMEDIATEsecurity

Has One Constraint

Ensure an account field matches another passed-in account.

75 XP
START CHALLENGE →
INTERMEDIATEpda

PDA Bump Constraint

Store and verify the bump seed on an initialized PDA.

75 XP
START CHALLENGE →
INTERMEDIATEpda

PDA Seeds

Derive a Program Derived Address using static strings.

75 XP
START CHALLENGE →
ADVANCEDfundamentals

Realloc Constraint

Dynamically increase the size of an existing account.

100 XP
START CHALLENGE →
BEGINNERfundamentals

Init Constraint

Initialize a brand new account.

50 XP
START CHALLENGE →
BEGINNERsecurity

Signer Constraint

Ensure a transaction was signed by a specific account.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Mut Constraint

Mark an account as mutable so state changes persist.

50 XP
START CHALLENGE →
BEGINNERsecurity

Unchecked Accounts

Safely declare accounts where you manually verify properties.

50 XP
START CHALLENGE →
ADVANCEDrust-anchor

Account Loader

Load zero-copy accounts using AccountLoader.

100 XP
START CHALLENGE →
ADVANCEDrust-anchor

Zero Copy Deserialization

Bypass Borsh serialization constraints for massive accounts by reading bytes directly.

100 XP
START CHALLENGE →
ADVANCEDrust-anchor

Box Large Accounts

Prevent stack overflow errors on huge accounts by boxing them.

100 XP
START CHALLENGE →
INTERMEDIATEfundamentals

Init Space: Vector

Calculate space for a Vec of u64s.

75 XP
START CHALLENGE →
INTERMEDIATEfundamentals

Init Space: String

Calculate space for a String of known maximum length.

75 XP
START CHALLENGE →
BEGINNERfundamentals

Init Space: u64

Calculate exact account size for an account storing a u64.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Init Space: Pubkey

Calculate exact account size for an account storing a single Pubkey.

50 XP
START CHALLENGE →
ADVANCEDfundamentals

Epoch Schedule Sysvar

Fetch information about the current epoch schedule.

100 XP
START CHALLENGE →
INTERMEDIATEfundamentals

Rent Sysvar (Exemption)

Calculate minimum balance for rent exemption programmatically.

75 XP
START CHALLENGE →
INTERMEDIATEfundamentals

Clock Sysvar (Time)

Read the current network timestamp directly inside your instruction.

75 XP
START CHALLENGE →
BEGINNERrust-anchor

Error Macro Return

Return an error early using the err! macro.

50 XP
START CHALLENGE →
BEGINNERrust-anchor

Message Macro Logging

Log messages and variables to the Solana program logs.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Require Greater Than or Equal

Assert one value is greater than or equal to another.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Require Greater Than

Assert one value is strictly greater than another.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Require Equal Values

Assert two numeric values are equal.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Require Keys Not Equal

Assert two pubkeys are strictly different using Anchor's macro.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Require Keys Equal

Assert two pubkeys are identical using Anchor's built-in macro.

50 XP
START CHALLENGE →
BEGINNERsecurity

Checked Math: Division

Prevent divide-by-zero panics using checked division.

50 XP
START CHALLENGE →
BEGINNERsecurity

Checked Math: Multiplication

Prevent integer overflow using checked multiplication.

50 XP
START CHALLENGE →
BEGINNERsecurity

Checked Math: Subtraction

Prevent integer underflow vulnerabilities using checked subtraction.

50 XP
START CHALLENGE →
BEGINNERsecurity

Checked Math: Addition

Prevent integer overflow vulnerabilities by using checked math instead of standard addition.

50 XP
START CHALLENGE →
BEGINNERfundamentals

Create Associated Token Account

Create an Associated Token Account (ATA) for a user using Anchor's init_if_needed. ATAs are the standard way to hold tokens on Solana.

50 XP
START CHALLENGE →
ADVANCEDsecurity

Prevent Close Account Attack

Fix a vulnerable close_account instruction that doesn't properly zero out account data. Apply the secure closing pattern to prevent state reuse attacks.

100 XP
START CHALLENGE →
BEGINNERrust-anchor

Emit Anchor Events

Add structured event emission to an Anchor program using the emit! macro. Events are the primary way to index on-chain activity for frontends and analytics.

40 XP
START CHALLENGE →
INTERMEDIATEtoken-extensions

Token-2022 Transfer Fee Extension

Configure a Token-2022 mint with a transfer fee extension. Every time tokens move, a percentage goes to the fee authority. The foundation of protocol revenue on Solana.

75 XP
START CHALLENGE →