Documentation
Everything you need to know about Skaf's PDA design tools.
$ Getting Started
What is Skaf?
Skaf is a PDA (Program Derived Address) design simulator for Solana. It lets you visually design account structures, check for seed collisions, simulate write-lock contention, and generate production-ready Anchor code — all before writing a single line of on-chain code.
Who is it for?
- >Solana developers designing account architectures
- >Protocol architects planning PDA seed structures
- >Auditors reviewing existing program account layouts
- >Teams migrating or refactoring on-chain programs
Quick start
# PDA Designer
The visual PDA designer is the core of Skaf. It provides a canvas-based interface for designing Solana account structures with drag-and-drop seed management.
Adding a PDA
Configuring seeds
Each PDA can have multiple seeds. In the Properties Panel, click "Add Seed" to add one. Available seed types:
Fixed byte string
Dynamic string value
32-byte public key
1-byte unsigned int
2-byte unsigned int
4 or 8-byte unsigned int
Canvas controls
- PanClick and drag on empty canvas area
- ZoomMouse wheel or pinch gesture
- SelectClick on a node
- Multi-selectShift + click multiple nodes
- DeleteSelect a PDA, then click the delete button on the node header or Properties Panel
! Collision Check
Collision checking verifies that none of your PDA seed combinations produce overlapping on-chain addresses. Skaf cross-checks every combination across your entire design.
How to run
Reading results
Each PDA account gets a status card showing its derived address and check result. Node borders on the canvas also update to reflect the status:
> Code Export
Skaf generates production-ready Anchor code from your PDA design, including account structs with seeds constraints and instruction context boilerplate.
How to export
Generated output
The code generator produces four sections:
#[account]
pub struct UserPosition {
pub authority: Pubkey,
pub amount: u64,
pub bump: u8,
}
#[derive(Accounts)]
pub struct CreatePosition<'info> {
#[account(
init,
payer = authority,
space = 8 + 32 + 8 + 1,
seeds = [b"position", authority.key().as_ref()],
bump,
)]
pub position: Account<'info, UserPosition>,
#[account(mut)]
pub authority: Signer<'info>,
pub system_program: Program<'info, System>,
}% Rent Calculator
Every Solana account requires a minimum balance to be rent-exempt. Skaf calculates the exact SOL cost based on the account's data size.
How it works
Space calculation
The total account size = 8 bytes (Anchor discriminator) + your data fields. Common field sizes:
< IDL Reverse Engineer
Analyze any deployed Solana program by its ID. Skaf fetches the on-chain IDL, parses account structures, and maps the entire PDA topology into a readable graph.
How to use
Use cases
- >Auditing existing programs — understand account layout at a glance
- >Migration planning — visualize old structure before designing the new one
- >Learning — study how top Solana protocols structure their PDAs
- >Documentation — generate visual account maps for your team
anchor idl init). If no IDL is found, Skaf will notify you. Most major Anchor-based protocols have published IDLs.= Template Gallery
Browse pre-built PDA patterns from real Solana protocols. Each template includes complete account hierarchies, seed structures, and space allocations.
How to use
Available patterns
Pool, tick array, position, vault accounts
Reserve, obligation, market accounts
Listing, escrow, collection PDAs
Stake pool, user stake, reward accounts
Proposal, vote record, realm accounts
Vault, deposit receipt, authority PDAs
~ Lock Analysis
Lock Analysis simulates Solana's Sealevel write-lock behavior against your PDA design. It runs 100 concurrent transactions and shows per-account contention scores, identifying bottlenecks before you deploy.
How to run
Reading results
Each account card displays:
- >Color-coded risk bar (green → yellow → red)
- >Read count vs. write count from the simulation
- >Contention score as a percentage (0-100%)
- >Risk level: low / medium / high / critical
- >Bottleneck flag — whether this account serializes transactions
Optimization strategies
Split hot accounts into N partitions
Derive unique PDA per user wallet
Rotate accounts by time window
Separate config from mutable state
* Token Tiers
Most Skaf features are free. Holding $SKAF tokens unlocks higher limits and premium features. Connect your Solana wallet to check your tier automatically.