When depositing tokens, the function will first check that there is no deposit queue, then check the withdrawal queue, followed by staking pool and then either add to the deposit queue or refund the tokens back to the user.
When tokens are in the deposit queue, users can call unqueueTokens to unqueue their tokens and get back their native LINK tokens.
If there is no tokens in the contract because others have withdrawn their tokens, then users will not be able to unqueue their tokens.
PriorityPool.sol leaves the queued tokens in the contract and changes the accountQueuedTokens[_account] state.
Users can call unqueueTokens() to unqueue their tokens:
For example, Alice manages to stake 100 LINK for 100 staked LINK. Alice and Bob then queues 100 LINK each. Alice decides to unstake her 100 stakedLINK, and gets back 100 LINK in the deposit contract. Alice then calls unqueue to withdraw the other 100 LINK in the contract
When Bob calls unqueue now, he cannot receive his LINK back because there is no LINK left in the contract.
Users may not be able to get back tokens
Manual Reivew
When withdrawing, don't let the caller have the option to not unqueue their own tokens, if not they can take advantage of it by withdrawing other people's queued tokens and then unqueuing their tokens.
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.