A calls deposit(X, B), the vault should take tokens from A (pay fees), and credit both the underlying stake and the minted shares to the same beneficiary (either A or B).So, when a user cancels his participation via cancelParticipation() his funds are stuck in the contract. If the call of cancelParticipation() isn't made by the receiver address passed in the deposit() functionThe function assigns the deposited amount to receiver but mints shares to msg.sender. In the lines stakedAsset[receiver] = stakeAsset; _mint(msg.sender, participantShares);
This creates an accounting mismatch — the recorded staker and the share owner are not the same entity.
Such inconsistent state breaks vault accounting and may lead to:
Locked or unclaimable funds.
Users holding shares not backed by deposits.
Potential exploitation where a user gains shares without economic exposure.
Likelihood:
This issue occurs whenever deposit() is called with receiver != msg.sender, which is a valid and unrestricted input in the function. No specific preconditions or external circumstances are required for the inconsistency to appear.
The inconsistent logic is embedded in the normal deposit flow and affects all deposits-for-others, meaning it is deterministic and reproducible under standard operation, as confirmed by the test_mint_stake_confusion results.
Impact:
The vault’s internal accounting becomes inconsistent — the address holding shares (entitled to rewards/withdrawals) differs from the address recorded as staking the assets (entitled to refunds). This breaks core ERC4626 and vault accounting assumptions.
Depending on subsequent user actions, this can lead to loss of funds or unclaimable assets. A depositor can mint shares without risk exposure, or the receiver’s stake can remain permanently locked, resulting in vault insolvency or incorrect fund distribution.
This test shows that if the depositor and receiver address are different funds are stuck
Just mint the shares for the receiver address
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.