-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
When using get_amount for certain uniswap_v4 pools it errors
Note: although the example below is from unichain, this also occurs on base and ethereum.
For now I'm just ignoring these pools.
Here is an example using quickstart
lib/tycho-simulation $ cargo run --example quickstart -- --sell-token 0x0000000000000000000000000000000000000000 --buy-token 0x0555e30da8f98308edb960aa94c0db47230d2b9c --chain unichain
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.72s
Running `target/debug/examples/quickstart --sell-token 0x0000000000000000000000000000000000000000 --buy-token 0x0555e30da8f98308edb960aa94c0db47230d2b9c --chain unichain`
Loading tokens from Tycho... tycho-unichain-beta.propellerheads.xyz
Tokens loaded: 117723
thread 'main' panicked at examples/quickstart/main.rs:152:10:
Buy token not found
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
lib/tycho-simulation $ pwd
/Users/johnwhitton/dev/jincubator/solver/lib/tycho-simulation
lib/tycho-simulation $ cargo run --example quickstart -- --sell-token 0x0000000000000000000000000000000000000000 --buy-token 0x0555e30da8f98308edb960aa94c0db47230d2b9c --chain unichain
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.50s
Running `target/debug/examples/quickstart --sell-token 0x0000000000000000000000000000000000000000 --buy-token 0x0555e30da8f98308edb960aa94c0db47230d2b9c --chain unichain`
Loading tokens from Tycho... tycho-unichain-beta.propellerheads.xyz
Tokens loaded: 117707
thread 'main' panicked at examples/quickstart/main.rs:152:10:
Buy token not found
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
lib/tycho-simulation $And here is a log from my implementation
🚨 CRITICAL ERROR: Overflow panic in get_amount_out!
🚨 Problematic Pool ID: 0x410723c1949069324d0f6013dba28829c4a0562f7c81d0f7cb79ded668691e1f
🚨 Pool Protocol: uniswap_v4
🚨 From Token: ETH (0x0000000000000000000000000000000000000000)
🚨 To Token: UNKNOWN (0x0555e30da8f98308edb960aa94c0db47230d2b9c)
🚨 Input Amount: ETH 1 (1000000000000000000 wei)
🚨 Panic Info: Any { .. }
🚨 Exiting due to overflow error in pool 0x410723c1949069324d0f6013dba28829c4a0562f7c81d0f7cb79ded668691e1fMetadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo