The NudgeCampaignFactory contract lacks validation to prevent using the same token address for both the target token and the reward token when deploying campaigns. This could lead to unexpected behavior and confusion for users.
When deploying a campaign through deployCampaign and deployAndFundCampaign functions, there is no check to ensure that the targetToken and rewardToken parameters are different addresses. While both addresses are validated to be non-zero, the contract allows them to be identical.
This could result in a campaign where users are required to hold a token and are rewarded with the same token, potentially creating circular dependency issues or unexpected incentive structures.
In NudgeCampaignFactory.sol:
Add a validation check in both deployCampaign and deployAndFundCampaign functions to ensure the target and reward tokens are different:
Also, add the corresponding error definition:
