I see a lot of BAD JUMP DESTINATION transactions here: https://etherscan.io/address/0x3958b4ec427f8fa24eb60f42821760e88d485f7f
SNX token calls tokenFallback on Uniswap contract in the middle of exchange and it seems Uniswap proxy handles this problem in a wrong way.
Proxy code is:
CALLDATASIZE
PUSH1 0x00
PUSH1 0x00
CALLDATACOPY
PUSH2 0x1000
PUSH1 0x00
CALLDATASIZE
PUSH1 0x00
PUSH20 0x2157a7894439191e520825fe9399ab8655e0f708
GAS
DELEGATE_CALL
ISZERO
PC
JUMPI
PUSH2 0x1000
PUSH1 0x00
RETURN
What does the latest part after DELEGATE_CALL means can anyone describe what should happen after DELEGATE_CALL reverts internally?
It seems Uniswap exchange called by another smart contract will eat all of its gas.