I have two seemingly identical transactions in terms of input data, yet one continues to fail with ‘ds-math-sub-underflow‘. The transaction that works was done through the Uniswap v2 add liquidity UI interface. The failing one is sent programmatically.
When looking into the input data both are identical apart from the deadline which of course is fine. The only other difference I was able to conclude on Etherscan is the 'Txn type' field which is using EIP-1559 rather than 'Legacy' on the passing transaction.
Is there any advice to remedy the failing transaction? The error log also shows:
- reason: 'transaction failed'
- code: 'CALL_EXCEPTION'
along with the generated tx object itself. If the full error log from the failed tx object is required, let me know.
Attached is the current code snippet of above image.
Cheers.
1
in website UI is actually1e18
in the background code (if the token has 18 decimals)