code-423n4 / 2021-10-slingshot-findings

0 stars 0 forks source link

msg.value should be 0 when input token is not native #95

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

function _transferFromOrWrap in Slinshot should require that msg.value is 0 when fromToken != nativeToken to prevent ETH from being accidentally sent together with some other token and be left in the contract to grab for the mempool snipers.

Recommended Mitigation Steps

require(msg.value == 0, "...");

tommyz7 commented 2 years ago

Not a bug in my opinion, just validation, should be non-critical

alcueca commented 2 years ago

Zero checks are optional to the sponsor.