Error in merkle tree check. This implies that the strategy can't hold any tokens when a Merkle root is set, which is likely not the intended behavior.
The issue with the getMaxDeposits
function lies in its logic and the interpretation of the Merkle root. Let's break it down:
The function returns 0 if the Merkle root is not zero (i.e., if a Merkle root exists).This implies that the strategy can't hold any tokens when a Merkle root is set, which is likely not the intended behavior.
The presence of a Merkle root (i.e., when it's not zero) typically indicates that the staking contract is in a state where it can accept stakes or perform certain operations.
Returning 0 in this case would prevent the strategy from holding any tokens precisely when it should be able to.
Generally, a non-zero Merkle root would indicate that the staking system is active and should be able to accept deposits.
The current implementation does the opposite, allowing deposits only when the Merkle root is zero.
Incorrect logic leads to unintended results
Manual Review
contract CommunityVCS is VaultControllerStrategy {
// ... (other contract code)
}
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.