Bug
The #131 portfolio_gone escape hatch only fires for data_is_empty() || lamports() == 0 (processor.rs:1017). A wrapper-owned portfolio that is still funded/non-empty but fails decode_portfolio (e.g., a future layout migration flips magic/version/discriminator) takes the else branch → verify_portfolio_program + decode_portfolio → PortfolioDecodeFailed → EmergencyBurn reverts forever.
The NFT, its rent, and the escrowed position are all stranded.
Source Impact
This is the explicitly deferred #110B (README.md:131-135). It's coupled to M-1: a silent layout drift (M-1) is precisely what would make a live portfolio "undecodable."
Risk
- Rent lockup: NFT holder can't reclaim ~0.02 SOL per stranded NFT
- Escrow lockup: position remains escrowed to the NFT program's PDA forever, inaccessible even via direct portfolio operations
- Requires abnormal core state (modified magic/version), so low-severity, but high-impact when it happens
Fix
Add a graceful fallback path in EmergencyBurn: if the portfolio fails decode, skip the eligibility check and just proceed with burning the NFT + closing accounts. The position was already escrowed and can't be modified anyway; the holder just wants their rent back.
Labels: security, deferred
Bug
The #131
portfolio_goneescape hatch only fires fordata_is_empty() || lamports() == 0(processor.rs:1017). A wrapper-owned portfolio that is still funded/non-empty but failsdecode_portfolio(e.g., a future layout migration flips magic/version/discriminator) takes theelsebranch →verify_portfolio_program+decode_portfolio→PortfolioDecodeFailed→ EmergencyBurn reverts forever.The NFT, its rent, and the escrowed position are all stranded.
Source Impact
This is the explicitly deferred #110B (README.md:131-135). It's coupled to M-1: a silent layout drift (M-1) is precisely what would make a live portfolio "undecodable."
Risk
Fix
Add a graceful fallback path in EmergencyBurn: if the portfolio fails decode, skip the eligibility check and just proceed with burning the NFT + closing accounts. The position was already escrowed and can't be modified anyway; the holder just wants their rent back.
Labels: security, deferred