None of the events in swap.sol are indexed, so it is not easy for off-chain tools to efficiently filter these events. I would recommend adding indices to the SwappedTokens and FeesSwept events. For SwappedTokens, I would recommend adding an index on the tokenSold and tokenBought fields. For FeesSwept, I would recommend adding an index on the token and recipient fields.
Handle
harleythedog
Vulnerability details
Impact
None of the events in swap.sol are indexed, so it is not easy for off-chain tools to efficiently filter these events. I would recommend adding indices to the SwappedTokens and FeesSwept events. For SwappedTokens, I would recommend adding an index on the tokenSold and tokenBought fields. For FeesSwept, I would recommend adding an index on the token and recipient fields.
Proof of Concept
See event declarations here: https://github.com/code-423n4/2021-10-tally/blob/main/contracts/swap/Swap.sol#:~:text=event-,SwappedTokens,-(
Tools Used
Manual inspection
Recommended Mitigation Steps
Added indices as described above.