chainlink icon indicating copy to clipboard operation
chainlink copied to clipboard

[SMRT] TokenPoolFactory 1.5.1 on 0G and Plume stores address(160) as the hooks of a 2.0 burn-mint pool

Open u2135 opened this issue 2 months ago • 1 comments

Description

On 0G and on Plume, deploying BurnMintTokenPool 2.0.0 through the TokenPoolFactory that is actually on the chain succeeds, and the resulting pool cannot move tokens.

Both factories are TokenPoolFactory 1.5.1. On the burn-mint path that version appends an empty address[] allowlist. For this argument list the third constructor word is the offset of that empty array, 0xa0. BurnMintTokenPool 2.0.0 reads the third word as the hooks address, so the pool stores address(160).

The constructor rejects a zero token, a zero router, and a zero RMN proxy. It does not reject a nonzero hooks address, so the deploy goes through. There is no code at address(160). The pool calls that address on lock, burn, release, and mint, and the call reverts. Nothing is stolen and no extra supply is minted. The pool just cannot be used.

The full write-up is here: https://hackmd.io/@u2135/chainlink-0g-factory-deployment-gap

Basic Information

Read on 3 October 2026 from the CCIP mainnet directory and from typeAndVersion() / getOnRamp(5009297550715157269) on each chain. 5009297550715157269 is the Ethereum mainnet selector. Both routers report Router 1.2.0. This is the on-ramp version, not a claim that every contract on the lane is 2.0.0.

Chain Chain id TokenPoolFactory 1.5.1 On-ramp toward Ethereum
0G 16661 0x094Ffe96db4e8bC05CF3D4bD4aCc4B7E770ba7d8 OnRamp 2.0.0 0xE274394930b6DE984acDDFfea11dd555209A82AA
Plume 98866 0xF41a468dBcD9f626ceB56E8691Df3d5B7bdd3015 OnRamp 2.0.0 0x402430ca607c52a99aa82ab4c726001d4203c9e7

The 0G factory is not a proxy, and owner() reverts, so the chain cannot upgrade the contract that is already there.

The same 1.5.1 factory is also listed on Edge (3343), Zora (7777777), Merlin (4200), and Metal L2 (1750). Their on-ramps toward Ethereum are still OnRamp 1.6.0 or EVM2EVMOnRamp 1.5.0, so a 1.5 pool still matches those lanes. The factory becomes the same problem when it is given 2.0 pool bytecode. Addresses are in the write-up.

The 1.5.1 bytecode contains deployTokenAndTokenPool (0xeb03cac1) and deployTokenPoolWithExistingToken (0x169ed058). Those are the pre-lockbox selectors. The 2.0 factory selectors are not in that bytecode.

Steps to Reproduce

  1. Call typeAndVersion() on either factory above. It returns TokenPoolFactory 1.5.1.
  2. On the burn-mint path the factory appends abi.encode(token, decimals, new address[](0), rmnProxy, router).
  3. With those five values, the third word of the head is the offset of the empty array, 0xa0 (160).
  4. The BurnMintTokenPool 2.0.0 constructor is (token, uint8 decimals, address hooks, rmnProxy, router). It stores that word as hooks, which decodes as address(160).
  5. Deployment succeeds, because a nonzero hooks address is allowed.
  6. The next lock, burn, release, or mint calls address(160) and reverts.

Until a 2.0 factory is on the chain, the workaround is to deploy BurnMintTokenPool 2.0.0 directly and pass address(0) as hooks.

Additional Information

The fix should be to deploy TokenPoolFactory 2.0.0 where the directory still lists 1.5.1. 0G and Plume are the two where the on-ramp toward Ethereum is already 2.0.0.

2.0 factory reference: https://docs.chain.link/ccip/evm/api-reference/v2.0.0/token-pool-factory

The 1.5.1 burn-mint constructor still takes the allowlist as its third argument: https://docs.chain.link/ccip/api-reference/evm/v151/burn-mint-token-pool

Write-up: https://hackmd.io/@u2135/chainlink-0g-factory-deployment-gap

u2135 avatar Oct 04 '26 07:10 u2135

Would you be able to share whether TokenPoolFactory 2.0.0 deployment on 0G and Plume is planned, or if direct pool deployment is expected to remain the workaround for now?

DefiAudit0x avatar Nov 09 '26 20:11 DefiAudit0x