Use unchecked math and cache values #208
Labels
bug
Something isn't working
G (Gas Optimization)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pauliax
Vulnerability details
Impact
'unchecked' directive can be used where an underflow/overflow cannot happen, e.g. here:
Also, to reduce gas usage,
msg.value-amountEth
should be cached and not re-calculated several times.The text was updated successfully, but these errors were encountered: