In the PriorityPool::_deposit
function, asset tokens directly deposited into the staking pool do not receive LST allocations, nor is the corresponding user data recorded for future LST distributions, resulting in users being unable to obtain the LST associated with these asset tokens.
When users deposit asset tokens into the PriorityPool
, the system first checks if there are any queued withdrawal requests in the WithdrawalPool
. If there are, these asset tokens will be transferred to the WithdrawalPool
, and users will receive the corresponding liquidity staking tokens. If there are remaining tokens and the staking pool has available space, the system will call the StakingPool::deposit
function to stake the assets. However, the tokens directly deposited into the staking pool do not receive the corresponding liquidity staking tokens, and the relevant account information is not updated,LST distributions rely on this account data through a Merkle tree, which means these tokens will be unable to participate in future LST distributions.
This flaw may cause a portion of the user's funds to be locked and unrecoverable.
Manual Audit.
Update User Data on Direct Deposits: Modify the PriorityPool::_deposit
function to ensure that when asset tokens are directly deposited into the staking pool, the corresponding user data is recorded. This includes updating the PriorityPool::accounts
array, PriorityPool::accountIndexes
, PriorityPool::depositsSinceLastUpdate
, PriorityPool::sharesSinceLastUpdate
and any relevant tracking variables similarly to how it is done for queued deposits. This will allow these deposits to participate in future LST distributions. Alternatively, the liquidity from these direct deposits could be sent to users, but this may disrupt the current LST allocation mechanism based on the Merkle tree.
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.