Under normal conditions, when a user calls deposit, the vault should record the staker’s address and mint shares to the same address, ensuring accounting consistency between who deposited funds and who owns the shares.
In the current implementation, the deposit function records the staked amount under the receiver address but mints ERC20 vault shares to msg.sender. This creates a mismatch between who owns shares and who is credited as having staked assets, which can lead to theft, locked funds, or incorrect accounting.
Likelihood:
Occurs whenever deposit is called with a receiver different from msg.sender, which is supported by the function signature and not restricted anywhere.
Users or external integrators can easily invoke this pattern when automating deposits on behalf of others (e.g., front-end UI or staking manager).
Impact:
The payer (msg.sender) receives the vault shares and thus can later withdraw or transfer them, while the credited receiver is shown as staked but cannot withdraw.
This mismatch can lead to user funds being locked, or malicious actors minting shares for themselves while crediting another user’s stake record.
Explanation:
user1 pays and the vault records user2 as staked, but the minted ERC20 shares are given to user1. user1 can later withdraw from the vault, draining user2’s stake, while user2 cannot access their supposed deposit.
Ensure the same address both stakes and receives the shares. Either restrict deposits to self-only or correctly mint to the receiver.
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.