code-423n4 / 2021-08-notional-findings

3 stars 0 forks source link

Replacing the assembly `extcodesize` checks for versions `>0.8.1` #91

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

hrkrshnn

Vulnerability details

Replacing the assembly extcodesize checks for versions >0.8.1

There are several instances in the codebase where the following is used:

assembly {
    codeSize := extcodesize(operator)
}

If using solidity version >0.8.1, one can replace this by <address>.code.length. The same also works for other versions, but not as efficient.

jeffywu commented 3 years ago

I don't think there should be a payment for this, we're not using this version of solidity.

jeffywu commented 3 years ago

Duplicate of #47

ghoul-sol commented 3 years ago

I think this is a reasonable suggestion pointing out a possibility for refactoring to improve readability of the code.

ghoul-sol commented 3 years ago

I don't think it's a duplicate of #47