Closed code423n4 closed 2 years ago
pants
This line in Swap.setFeeRecipient() perfoms an SLOAD operation for a value that is already stored in a local variable:
Swap.setFeeRecipient()
SLOAD
emit NewFeeRecipient(feeRecipient);
Storage reads are much more expensive than reading local variables.
Manual code review.
Use the already existing local variable instead of loading this value from storage:
emit NewFeeRecipient(feeRecipient_);
Duplicate of #19.
Handle
pants
Vulnerability details
This line in
Swap.setFeeRecipient()
perfoms anSLOAD
operation for a value that is already stored in a local variable:Impact
Storage reads are much more expensive than reading local variables.
Tool Used
Manual code review.
Recommended Mitigation Steps
Use the already existing local variable instead of loading this value from storage: