Closed code423n4 closed 2 years ago
Both zero value for swap fee and address(O) for the fee recipient are desired possibilities, if governance chooses to use them.
gonna side with sponsor on this one and close it. While setting the swap fee to 0 is probably more likely than the address, I can see merit in either.
Handle
JMukesh
Vulnerability details
Impact
Due to lack of input validation in setSwapFee() and setFeeRecipient() ,they allow zero value of swapfee and address(0) for the setFeeRecipient
Proof of Concept
https://github.com/code-423n4/2021-10-tally/blob/c585c214edb58486e0564cb53d87e4831959c08b/contracts/swap/Swap.sol#L63
https://github.com/code-423n4/2021-10-tally/blob/c585c214edb58486e0564cb53d87e4831959c08b/contracts/swap/Swap.sol#L73
Tools Used
manual review
Recommended Mitigation Steps
add input validation in setter function