1
Initial Failure
The transaction fails on mainnet with a generic
HostError(Value, InvalidInput).2
Run Decode
Run
grat decode <hash>. Grat identifies that the InvalidInput happened inside the Token contract during a transfer call.3
Esclate to Trace
Run
grat trace <hash>. The hierarchical timeline shows that the swap contract passed a negative amount to the token contract.4
Root Cause Found
The root cause is a slippage calculation bug in the
swap contract that resulted in a negative value under extreme market conditions.