feat: add Pancake Infinity on Robinhood - #649
Open
svccentaur wants to merge 1 commit into
Open
svccentaur wants to merge 1 commit into
svccentaur wants to merge 1 commit into
Conversation
🛡️ Immunefi PR ReviewsWe noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below: Once submitted, we'll take care of assigning a reviewer and follow up here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
20, including its separate VaultDeployment reference: PancakeSwap v4 - Robinhood Mainnet
Public corroboration:
infinity-coreRobinhood config,infinity-peripheryRobinhood config, and PancakeSwap Infinity contract addresses.Deployment verification
The deployment addresses were independently corroborated against PancakeSwap's public Robinhood configuration and contract-address documentation:
0x38Ab3f2CE00973A51d3A2A04d634C9bcbf20e4e10x4F922d5B15e6691e0469663E4F5C4177f23c5FaF0xeE04c68742e6Bf434bE8039580D2e89BBE55bc6f0x7e283FDEe79d0D06973316e74EaEf58c2854f6AA0x52544649ED200E222d3B377ea1A5f68D48c56A270x6ceE884e614388819BF96b5e2c716FE231d162f8No BinPoolManager is configured for Robinhood.
Deterministic deployment and creation bytecode
0xfbd4…ad26succeeded at block56,732,884.keccak256("INFINITY-CORE/VAULT/1.0.0") = 0x617e7acf5e1dcffa09da0a69265d6ee6a4ed234247cc85a87a9d3a8aa12d523dcomputeAddressresult is exactly0x4F922d5B15e6691e0469663E4F5C4177f23c5FaFinfinity-corecommit891259f0xb51fc0b2a847148a8e21e9c218aa9d3b166cc158861dc97c80c8632fef1c1cd1, equal to the hash supplied to the CREATE3 factory0xbfcc…080asucceeded at block56,743,018.keccak256("INFINITY-CORE/CLPoolManager/1.0.0") = 0x1ce097c42cfd92b6f569ca1f93494471fa6d073a600e2a0dbf560f22790035aecomputeAddressresult is exactly0xeE04c68742e6Bf434bE8039580D2e89BBE55bc6f0xb6c453f70b68443c3cf7465176b9ef0707b4820a3d0139f2eb4a88b9e1a88b68, equal to the hash supplied to the CREATE3 factoryThe reproduction used Solidity
0.8.26+commit.8a97fa7a, via IR, optimizer runs25,666, Cancun EVM, and no metadata bytecode hash, matching the upstream repository configuration.Runtime bytecode
keccak256 = 0x79d6412f6d93607104d7c2fa76d4e5f5d77c29002187d818f24f04e54127e90b; exact match to the locally compiled deployed bytecode.keccak256 = 0xc7a718bdecefbe9d1a1708097bc856f9c13d87701f050cedbafcafe01fd42064; exact match after linking the Vault immutable at all five compiler-reported immutable offsets, with zero differing bytes.61cd131, which introduced transient application-deficit accounting and an end-of-lock deficit check. The Robinhood runtime exactly matches the post-fix source rather than an unexplained fork.Onchain configuration and live-pool checks
4663.CLPoolManager.vault()returns the configured Robinhood Vault.Vault.isAppRegistered(CLPoolManager)returnstrue.Vault.owner()is0x7e283FDEe79d0D06973316e74EaEf58c2854f6AA;pendingOwner()is0xfa206DAB60c014bEb6833004D8848910165e6047.CLPoolManager.owner()is0x52544649ED200E222d3B377ea1A5f68D48c56A27, whoseowner()is the pool owner above.CLPoolManager.protocolFeeController()is0x6ceE884e614388819BF96b5e2c716FE231d162f8, whoseowner()is also the pool owner above.CLPoolManager.paused()isfalse.0xdde13ccbbcd10c5fc3351c284eabc77114d2a88078eb1cfd20062124e939d4cfresolves to WETH/USDG, the configured CLPoolManager, zero hook, fee90, and parameters ending in0x10000; its liquidity at block60,170,000was34,004,700,804,492.The separate PancakeSwap V3 constants were also reviewed. Robinhood's published V3 logical factory is
0x0BFb…1865, while Settler intentionally uses deployer0x41ff…071c9with init hash0x6ce8…f7e2because V3 pool CREATE2 derivation is performed from the deployer. Pancake Infinity does not derive pools via an init hash; it identifies them by PoolManager plus PoolId.Security properties
revertUnknownPoolManagerId.0retains the existing Orvex manager and Vault, while ID2selects Pancake Infinity's manager and Vault.Tests
0.8.34compilation of the Robinhood production contracts0.8.34compilation of the Robinhood integration test0.8.34and0.8.2560,170,000: 8 passed, 0 failed, 10 intentionally skippedgit diff --checkGas Optimization
The manager and Vault selection reads the already-encoded first fill directly in memory and does not add an ABI field or storage access. New WETH/USDG gas snapshots:
251,773224,129229,107215,597The Robinhood taker-submitted Settler runtime is 20,245 bytes, leaving 4,331 bytes below the EIP-170 limit. MetaTxn is 18,184 bytes and Intent is 18,991 bytes.
Prompted by: duncancmt