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

未关闭
#23,896 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
43/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
solidity
领域
release

调研方向

Start with the linked write-up and the TokenPoolFactory 2.0.0 reference, then compare the stated 1.5.1 and 2.0.0 burn-mint deployment arguments and selectors. Check the CCIP mainnet directory entries for 0G and Plume; done means the deployed factory matches 2.0.0 and can deploy a usable BurnMintTokenPool 2.0.0 with the intended hooks value.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Go
星标
8.3k
派生
2k
平均合并
1 天 17 小时
30 天内合并 PR
120

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

smartcontractkit/chainlink 的其他 Issue

查看 smartcontractkit/chainlink 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。