Repository navigation
Conversation
SwapHood V3 is PancakeSwap V3 with two extra fee tiers (80/ts 10 and 1800/ts 50). Reuse ethereum-pancakeswap-v3 through a new robinhood-swaphood-v3 manifest, UniswapV3State for simulation and the shared Robinhood UniswapV3Executor for execution. map_protocol_changes panicked on Initialize for any fee tier outside 100/500/2500/10000. PancakeV3Pool.initialize writes 3200 first and only overrides it for 100 and 500, so fall back to 3200 like the contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
price_printer and quickstart only list protocols that are live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Document fee_to_default_protocol_fees as a doc comment, point the reference link at the 3200 default, shorten the v0.1.4 changelog and drop its inaccurate claim about SwapHood's pool code, and note the SetFeeProtocol covered by the fee 1800 integration test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Indexes SwapHood V3 on Robinhood Chain. SwapHood V3 is PancakeSwap V3 with two extra fee tiers:
80(tick spacing 10) and1800(tick spacing 50).0x0ec554f0bff0be6c99d1e95c8015bb0950f6a2c7(PancakeV3Factory), firstPoolCreatedat block 7,020,627. The pool deployer0xcb42…f1b2emits noPoolCreated.ethereum-pancakeswap-v3with the newrobinhood-swaphood-v3.yaml, componentsswaphood_v3_poolUniswapV3StateUniswapV3SwapEncoder, executor0x33E8602FeDD1215CB04c865C66648DbA5b81fb75Substreams change
map_protocol_changespanicked withUnexpected fee valueonInitializefor any tier other than 100, 500, 2500 and 10000.PancakeV3Pool.initializewrites a protocol fee of 3200 and overrides it only for tiers 100 (3300) and 500 (3400). The module now returns 3200 for every other tier as well. Output for the existing manifests does not change. Package version: 0.1.4.Protocol fees do not affect quotes.
UniswapV3Statedoes not read them.On-chain check of the protocol fee defaults
SetFeeProtocolemits the previous value. The first event on a pool therefore shows whatinitializewrote. Pools that were never changed show it inslot0.SetFeeProtocolon0x18ab…)SetFeeProtocolon0x6356…)SetFeeProtocolon0xdd59…)SetFeeProtocolon0x124b…and0x0816…)slot0of0xae6c…, never changed)slot0of0xc6cf…, never changed)SwapHood's pool code is not identical to
PancakeV3Pool. Besides thecollectProtocolchange (it also accepts calls from aPairFeesV3contract,0x626a…6f3c), itssetFeeProtocolaccepts values above Pancake's 4000 cap. Pools have been set to 8000, 8500, 9000 and 10000. The substreams take these values fromSetFeeProtocol, so they are indexed as is.Testing
cargo test -p ethereum-pancakeswap-v3: 6 passed.cargo nextest run -p tycho-execution: 304 passed.integration_test_robinhood_swaphood_v3.tycho.yaml: two cases, each from pool creation to the first swap.SetFeeProtocolfrom 3200 to 10000.protocols/testingharness. The Docker build failed on network errors.🤖 Generated with Claude Code