The joinDAO function in `MembershipFactory` lacks a maximum price validation, allowing the EXTERNAL_CALLER to increase tier prices through updateDAOMembership after a user has approved their tokens but before their transaction is executed. This can result in users paying more than they intended.
UpdateDAOMembership:
https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L100
Users may expect the price of a specific tier to be `x`, but it can be changed by the EXTERNAL_CALLER through the updateDAOMembership function. This could lead to:
Financial Loss:
Users may pay more than intended
No upper bound on price changes
Affects all DAO tiers
MEV Opportunity:
Sandwich attacks possible
Price can be manipulated before user tx
Reverted to original after
Manual Review
Add price protection:
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.