A critical reentrancy vulnerability exists in the LikeRegistry contract's matchRewards function where state changes occur after external contract calls, violating the checks-effects-interactions pattern.
The matchRewards function performs an external call to transfer ETH to a newly created MultiSigWallet before updating critical state variables:
An attacker could create a malicious contract that implements a fallback function to re-enter the LikeRegistry contract before the state changes are completed.
Potential double-spending of rewards
Manipulation of user balances
Draining of contract funds
Breaking of core matching logic
Manual code review
Slither static analyzer
Historical reentrancy patterns analysis
Implement the checks-effects-interactions pattern by moving all state changes before external calls:
2. Add OpenZeppelin's ReentrancyGuard modifier to sensitive functions
3. Consider implementing a pull-payment pattern instead of push-payment
matchRewards: Contract is created just before and is the one called. No impact. executeTransaction: CEI is followed. Emitting an event in disorder is informational in that context. withdraw: CEI is followed.
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.