Skip to content

pNFT

pNFT (Programmable NFT)

pNFT (Programmable NFT) is an enhanced NFT standard launched by Metaplex that adds an on-chain rules engine to NFTs, enabling more complex ownership and transfer logic.

Core Concept

Rules Engine pNFTs can define on-chain rules that control: - Who can transfer - When transfers are allowed - Transfer conditions - Delegation permissions - Burn conditions

Use Cases - Game items (soulbound, upgradeable) - Membership benefits (non-transferable) - Tickets (scalper prevention) - Compliance NFTs (KYC verification)

Rule Types

1. Transfer Rules Control NFT transfers: - Whitelist/blacklist addresses - Time locks - Require specific signatures - Require burning other NFTs

2. Delegation Rules Control delegation permissions: - Allow/deny specific programs - Delegation type restrictions - Time limits

3. Burn Rules Control NFT burning: - Who can burn - Burn conditions - Post-burn actions

4. Sale Rules Control marketplace trading: - Allowed marketplaces - Royalty enforcement - Price limits

Rule Sets

Defining Rule Sets

pub struct RuleSet {
    pub owner: Pubkey,
    pub operations: HashMap<Operation, Vec<Rule>>,
}

pub enum Operation {
    Transfer,
    Delegate,
    Sale,
    Burn,
}

Rule Example

{
  "Transfer": [
    {
      "type": "AdditionalSigner",
      "publicKey": "authority_key"
    },
    {
      "type": "Namespace",
      "field": "Collection",
      "value": "verified_collection"
    }
  ]
}

Use Cases

Soulbound NFTs Non-transferable NFTs:

Rule: Transfer -> Permanently prohibited

Use cases: - Achievement badges - Education certificates - Identity credentials

Game Items Upgradeable, bindable items:

Rules:
- Transfer -> Requires "unbind" program call
- Delegate -> Only game contracts allowed

Membership Cards Time-limited membership benefits:

Rules:
- Transfer -> Requires platform authorization
- Sale -> Prohibited on unofficial marketplaces

Tickets Anti-scalper tickets:

Rules:
- Transfer -> Limited number of transfers
- Sale -> Price ceiling

Creating pNFTs

Using Token Metadata

import { createNft } from "@metaplex-foundation/mpl-token-metadata";

await createNft(umi, {
  mint,
  name: "My pNFT",
  uri: "https://...",
  sellerFeeBasisPoints: 500,
  tokenStandard: TokenStandard.ProgrammableNonFungible,
  ruleSet: ruleSetAddress, // Rule set address
}).sendAndConfirm(umi);

Rule Execution

Validation Process 1. User initiates transfer 2. Token Metadata program calls the rule set 3. Rule set validates conditions 4. Pass -> Execute transfer 5. Fail -> Reject transaction

Example: Requires Additional Signer

// Transfer requires additional signature
transfer_pnft(
    &nft_mint,
    &from,
    &to,
    &authority,      // Additional signer
    &rule_set,
)?;

Token Standard Comparison

Feature NFT pNFT cNFT
Cost Medium Medium Very Low
Programmability None Strong None
Compression No No Yes
Rules Engine No Yes No
Use Case Art Games/Membership Large-scale distribution

Ecosystem Support

Wallets Mainstream wallets gradually supporting pNFT's special transfer logic.

Marketplaces Markets need to understand and respect pNFT rules.

Gaming Unity, Unreal plugins support pNFTs.

Advantages

Flexibility Can implement complex business logic.

Enforcement Rules are enforced at the protocol level and cannot be bypassed.

Composability Can interact with other Solana programs.

Challenges

Complexity Rule design and implementation is more complex than standard NFTs.

User Experience Some rules may confuse users (e.g., "why can't I transfer?").

Market Support Markets need to understand pNFT rules.

Future Direction

Richer Rules Community developing more rule types.

Tool Improvements Simpler rule creation and management tools.

Standardization Standardization of common rule patterns.

  • Rule Set: Collection of rules defining pNFT behavior
  • Token Metadata: Metaplex's NFT metadata standard
  • Soulbound: Non-transferable tokens
  • Token Standard: pNFT is one variant of the TokenStandard enum