You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #105 (escrow-at-mint) removed the B-3 ownership CPI from the transfer hook. process_execute is now validation-only and performs no writes. Yet:
ExtraAccountMetaList still declares entry 5 (PositionNft PDA) and entry 6 (Portfolio) as writable (processor.rs:655-658)
RepairExtraMetas docs (instruction.rs:119-124) justify its existence entirely by: "the transfer hook CPIs into percolator-prog with TransferPortfolioOwnership (tag 72), which mutates owner… Without portfolio writable, the CPI fails."
That CPI no longer exists in the hook.
Source Impact
Not exploitable — the hook can't write the portfolio during a Token-2022 CPI anyway. But every NFT transfer now takes an unnecessary write-lock on the shared portfolio account, serializing against other portfolio transactions based on an obsolete requirement.
Fix
Flip entries 5 and 6 in build_extra_account_metas / RepairExtraMetas to read-only
Verify the wrapper no longer needs them writable for B-3 (which under escrow it shouldn't at transfer time)
Bug
PR #105 (escrow-at-mint) removed the B-3 ownership CPI from the transfer hook.
process_executeis now validation-only and performs no writes. Yet:ExtraAccountMetaListstill declares entry 5 (PositionNft PDA) and entry 6 (Portfolio) as writable (processor.rs:655-658)RepairExtraMetasdocs (instruction.rs:119-124) justify its existence entirely by: "the transfer hook CPIs into percolator-prog with TransferPortfolioOwnership (tag 72), which mutates owner… Without portfolio writable, the CPI fails."That CPI no longer exists in the hook.
Source Impact
Not exploitable — the hook can't write the portfolio during a Token-2022 CPI anyway. But every NFT transfer now takes an unnecessary write-lock on the shared portfolio account, serializing against other portfolio transactions based on an obsolete requirement.
Fix
build_extra_account_metas/RepairExtraMetasto read-onlyRepairExtraMetasrationale to reflect Design: minting does not escrow the position — minter retains direct control until first NFT transfer (contradicts documented custody) #105's custody modelLabels: cleanup, performance