In BasePool.sol the swap() function has an unnamed bytes calldata argument that is not used or needed. This may be done to give the two swap() functions different function signatures. Consider removing the bytes calldata arg and changing the second swap() functions name to _swap(). This will reduce confusion and code.
Handle
jayjonah8
Vulnerability details
Impact
In BasePool.sol the swap() function has an unnamed bytes calldata argument that is not used or needed. This may be done to give the two swap() functions different function signatures. Consider removing the bytes calldata arg and changing the second swap() functions name to _swap(). This will reduce confusion and code.
Proof of Concept
https://github.com/code-423n4/2021-12-vader/blob/main/contracts/dex/pool/BasePool.sol#L264
https://github.com/code-423n4/2021-12-vader/blob/main/contracts/dex/pool/BasePool.sol#L288
Tools Used
Manual code review