-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fork not working as expected #20
Comments
Gathered some more data on this: The CSWAP token is a fee on transfer token. When transferred, it also sends itself a portion of then funds. In the real transaction on mainnet (that worked), the user received above the minimum, and the router did not revert. I've verified that the previous transfer (anywhere on mainnet) was in block 19,726,290, and the next transfer was in block 19,726,299, meaning this TX in 19,726,294 didn't have other transfers of that coin in it, nor in adjacent blocks around it. The fee on transfer Uniswap router function works by checking the user's before balance, against their balance after the swap. The initial user CSWAP balanceOf perfectly match in both the revm fork sim and the live transaction. However the after balance in fork is far lower, indicating that a much smaller amount transfer.
Oddly enough, multiplying the ✅ Verified that the initial storage slots for the Uniswap 2 pools balances match exactly. |
Wow, great detective work! Thank you @DanielVF! |
Problem:
This tx simulates on tenderly or cast without issue but fails with pyrevm (see below for tx details). There are no other txs for that pool in the block.
Code
Error
it fails with:
Error can be decoded to
UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT
Transaction details
The text was updated successfully, but these errors were encountered: