1. Isolated Vault Derivation
Every lifetime wrap creates a fresh Core asset. That address derives a program-owned vault authority, whose associated token account holds only that Punk's backing.
vault_authority = PDA(["vault", core_asset]) token_vault = ATA(vault_authority, configured_mint)
The backing record binds the Core asset, configured token mint, deposited amount, tier, and lifetime sequence. There is no shared custody wallet and no private key for the vault authority.
2. Program Instructions
A. initialize(args)
- Binds one mint, token program, lock amount, supply limit, royalties, names, and renderer URI base.
- Rejects live mint or freeze authorities and behavior-changing Token-2022 extensions.
- Creates the singleton Config PDA and Metaplex Core collection.
B. wrap(tier_index)
- Transfers the exact configured base-unit amount into a fresh asset-specific token vault.
- Mints a transferable Metaplex Core asset into the caller's wallet.
- Creates the tier backing record and a lifetime-sequence metadata URI atomically.
C. unwrap(tier_index)
- Decodes the Core account and requires the signer to be its current owner.
- Returns the complete token-vault balance to that owner.
- Burns the Core asset and closes the token vault and backing record in the same transaction.
- Returns the live tier to the reusable pool while never reusing the old asset address or URI.
3. Upgrade Policy
The program is intentionally designed for an upgradeable first deployment so defects can be corrected. Production authority should move to a multisig, remain transparent, and only be revoked after testing, independent review, and protocol maturity.