smart-contracts
smart-contracts copied to clipboard
proxy - check sufficient token src amount before calling transfer
Its a valid scenarios that use doesn't have sufficient source amount. happens when a few trades from same account are called and are being mined.
problem: with current code. transferFrom will fail and consume all gas. solution: check srcAmount before calling transfer