Submitted by pauliax, also found by 0xRajeev, and shw
Function approveTransferERC20 is vulnerable to the sandwich attack. Similar to the ERC20 approve issue described here. A malicious delegate can scout for a approveTransferERC20 change and sandwich that (delegatedTransferERC20 amount A, approveTransferERC20 amount A->B, delegatedTransferERC20 amount B). It is more of a theoretical issue and mostly depends on the honesty of the delegators. If we can assume that delegators are trustable actors, then this is very unlikely to happen.
Possible mitigation could be to replace approveTransferERC20 with increasing/decreasing functions.
xyz-ctrl (Visor) acknowledged:
ztcrypto (Visor) commented:
