The logic within the deposit
function transfers tokens from the user to the contract address (address(this)
) and then calls the _deposit
function. The flow of token deposits is as follows:
Tokens will be deposited into the withdrawal pool if there are queued withdrawals.
If there is available space, tokens will be deposited into the staking pool.
Any remaining tokens will be queued if _shouldQueue
is set to true; otherwise, they will be returned to the sender.
This means that calling deposit()
results in two transfer transactions, but one of these transactions does not get accounted for, leading to potential user loss of funds.
remove this line token.safeTransferFrom(msg.sender, address(this), _amount);
to avoid user loss of money
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.