code-423n4 / 2022-01-yield-findings

1 stars 0 forks source link

Use newer solidity version for `extcodesize` optimization #73

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

0x0x0x

Vulnerability details

I'd recommend at least 0.8.10. New extcodesize optimization that saves 100 gas for high level external calls that returns.

GalloDaSballo commented 2 years ago

This is the one time where the "use higher pragma" advice is valid because the warden mentioned a specific optimization offered by newer compoilers

GalloDaSballo commented 2 years ago

Actually, I looked for proof about this finding, and was able to find only one proof, which is the release notes for Solidity 0.8.1 https://github.com/ethereum/solidity/releases?page=2

Because of this, and because the code is in 0.8.6 that means the improvement is already applied, hence the finding is invalid

GalloDaSballo commented 2 years ago

I recommend the warden to always cite their source to avoid: 1) Forcing the judge to find them 2) Finding opposing sources that make their findings invalid