Description:
The _onBehalf
parameter in the stake
function allows users
to stake on behalf of any address without validating if the address is authorized or intended to participate in the protocol.
Impact:
This could lead to unauthorized addresses being included in staking, potentially skewing reward distribution or creating governance issues if the protocol expands to include voting or other decision-making process.
Proof of Concept:
A malicious user
could stake ETH on behalf of an address not intended to participate in the staking process, such as contract a address with no logic to handle staked tokens. This could result in skewed reward allocations or unintended participation in protocol activities, such as future governance decisions. For example, a user
might call the stake
function with _onBehalfOf
set to an arbitrary address, thereby manipulating the staking system.
Recommended Mitigation:
Implement validation to ensure that that the _onBehalfOf
address is either a legitimate user or an authorized entity within the protocol. Consider integrating a whitelist or permissioning mechanism to control who can stake on behalf of others, and add checks to prevent staking on behalf of unverified or unintended addresses.
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.