Under normal conditions, the vault uses ERC20-compatible shares to represent ownership of deposited assets. These shares are freely transferable, following the ERC4626 design. Separately, the vault also maintains a mapping stakedAsset[address] to track each depositor’s contributed assets for refund or cancellation logic.
However, when shares are transferred between users, the stakedAsset mapping remains unchanged. This creates an inconsistency between the on-chain share ownership (ERC20 logic) and the internal accounting (stakedAsset). As a result, a depositor who transfers away their shares can still call cancelParticipation() to reclaim their deposit, while the transferee retains shares that can later be redeemed via withdraw(). This enables double refunds or theft of vault funds.
Likelihood:
This occurs whenever a depositor transfers their ERC4626 shares to another address before event start or vault finalization.
The vault does not restrict share transfers and does not validate ownership consistency between shares and the stakedAsset mapping.
Impact:
A user can transfer their shares to another address and still receive a full refund using cancelParticipation().
The new share owner can later call withdraw() to claim the same underlying assets, causing vault under-collateralization and potential total asset drain.
Explanation:
user1 deposits 5 ETH and receives shares.
user1 transfers all shares to user2.
The vault still records stakedAsset[user1] = 5 ether.
user1 calls cancelParticipation() and receives a refund, but user2’s shares remain valid.
When the vault is finalized, user2 can withdraw again, resulting in a double payout from the same original deposit.
The vault must ensure that the deposit accounting (stakedAsset) remains consistent with ERC20 share ownership. This can be achieved by either disabling share transfers or by updating the accounting logic whenever transfers occur.
This ensures that deposits and refunds always correspond to the actual token holders, preventing refund or withdrawal double-spending.
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.