code-423n4 / 2022-01-trader-joe-findings

2 stars 0 forks source link

less gas used `_owner` instead of call function `owner()` #281

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Tomio

Vulnerability details

Impact

expensive

Proof of Concept

https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/RocketJoeToken.sol#L63

Tools Used

Recommended Mitigation Steps

Change from

_from == owner()

To:

_from == _owner
cryptofish7 commented 2 years ago

_owner is private, you can’t access it

dmvt commented 2 years ago

Invalid.