Open hats-bug-reporter[bot] opened 5 months ago
The chainId
in this context just refers to the chain id where the targeted pool lives, not the chain id of the Metrom campaign being created. As such, this data along with the pool address is indexed by the backend and validated there.
Thank you for the explanation.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x46de6f36814102b66249d60cdba86a0cf9b5845d6f37ceadd0e52bc7be26ab34 Severity: medium
Description: Description\
- SUMMARY -
Given that the contracts will be deployed on multiple chains depending on the demand, it is important that the
chainId
s are validated.- DETAILS -
Looking at the code below,
_bundle.chainId
is not validated which may cause wrong information to slip in the system and event emissions.createCampaigns()
@ L160-L189createCampaigns() @ L218-L229
- IMPACT -
When the wrong chainId slips in the system and event emitted:
- MITIGATION -
Call
block.chainid
and compare it with_bundle.chainId
. Revert the function if they are not equal.Attachments
Proof of Concept (PoC) File n/a
Revised Code File (Optional) n/a