Using ecrecover for signature verification has potential security issues (signature malleability). Also, it does not provide input validation, which can lead to unexpected behavior if the input data is malformed.
Use OpenZeppelin's ECDSA library.
Updating crucial contract addresses (like, the address of the MembershipERC1155 implementation contract) in a single step can be risky because it introduces the potential for mistakes or malicious attacks that could compromise the contract’s functionality or security.
Use a two-step process to update the address:
Propose an address update and save it as a pending change
After some delay, which provides time to review and verify the new address, the change can be finalized
https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/libraries/MembershipDAOStructs.sol#L34
https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/tokens/MembershipERC1155.sol#L169
https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L55
Currently the power is hardcoded to be 2. This is used in the shareOf function and no matter what the DAO creator provides for the power values of the various tiers, this won't have any influence on the share calculation.
Either delete the power value from the TierConfig struct as this is misleading and can lead to wrong assumptions by the DAO creator. Or, update the code so that it uses the provided power value. If the power value is used it should be validated together with the provided price value and the shareOf function needs to be updated accordingly.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.