Assuming standard flow of events
- User, who is owner of address
Aapproves to spend
XERC20 tokens, using
approvemethod to a smart-contract
- Then, user calls
Sto spend that amount
Xand do its work.
What if in-between 1 and 2, someone else, who can call
S will invoke spending from address
Is there any protection from that in ETH itself, e.g. to check if
S is called by the user who gave the approval (and not someone else)?
What if someone watching me, when I use uniswap, e.g. and calls its smart-contract instead of me? After I give approval, but before the swap tx sinks in?
What is the standard way to handle that risk, if it exists?