Twin Treasury: Allowlist Still Drains, Mission Reverts
Same poisoned invoice prompt injection specifying a recognized company vendor. Real architectural comparison on Avalanche Fuji GuardedTreasury.
No evidence file (twin.live.json or twin.dryrun.json) found. Run scripts/twin-treasury.ts to execute fork simulation or broadcast.
Treasury A: Global Allowlist Mode
This contract in global-allowlist mode (payee root = 0x0)
The attacker tricks the agent with a poisoned invoice naming a recognized vendor. Because the contract only checks a global allowlist and the amount <= perTxCap, funds are immediately drained via safeTransfer in propose().
Treasury B: Mission-Scoped Guard (MissionPay)
Owner-signed Merkle payee root per mission
When the attacker attempts to divert payment to a non-mission vendor, the contract validates the Merkle root on-chain and rejects the transaction with PayeeNotInMissionSet. Simultaneously, the authorized mission payee with valid proof is successfully paid.
Core Takeaway from Twin Treasury
Global allowlists fail against indirect prompt injection when an attacker instructs the agent to pay another recognized vendor. Only mission-scoped payee roots bound on-chain block diverted payments while safely executing payouts to legitimate vendors.