Open code423n4 opened 2 years ago
leastwood
There are a number of instances where readAndAgreedToMarketParticipationAgreement is checked. This check can be further simplified from readAndAgreedToMarketParticipationAgreement == false to !readAndAgreedToMarketParticipationAgreement.
readAndAgreedToMarketParticipationAgreement
readAndAgreedToMarketParticipationAgreement == false
!readAndAgreedToMarketParticipationAgreement
https://github.com/sushiswap/miso/blob/master/contracts/Auctions/DutchAuction.sol#L268 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/DutchAuction.sol#L311 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/HyperbolicAuction.sol#L273 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/HyperbolicAuction.sol#L310 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/Crowdsale.sol#L230 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/Crowdsale.sol#L274 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/BatchAuction.sol#L194 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/BatchAuction.sol#L219
Slither
Consider implementing the above changes
I believe this is a styling question, rather than a bug or potential optimization
Handle
leastwood
Vulnerability details
Impact
There are a number of instances where
readAndAgreedToMarketParticipationAgreement
is checked. This check can be further simplified fromreadAndAgreedToMarketParticipationAgreement == false
to!readAndAgreedToMarketParticipationAgreement
.Proof of Concept
https://github.com/sushiswap/miso/blob/master/contracts/Auctions/DutchAuction.sol#L268 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/DutchAuction.sol#L311 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/HyperbolicAuction.sol#L273 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/HyperbolicAuction.sol#L310 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/Crowdsale.sol#L230 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/Crowdsale.sol#L274 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/BatchAuction.sol#L194 https://github.com/sushiswap/miso/blob/master/contracts/Auctions/BatchAuction.sol#L219
Tools Used
Slither
Recommended Mitigation Steps
Consider implementing the above changes