Description
Holders can withdraw a portion or the entire amount of their staked assets using the LiquidationPool::decreasePosition
method. However, access to this method is restricted to holders with positions older than 1 day. This limitation arises due to the LiquidationPool::consolidatePendingStakes()
function, which checks the age of pending stakes to ensure fairer depositing procedures.
Impact
This behavior not only significantly impacts a holder's funds, especially in times of market volatility or when a user has recently deposited funds, but it also compromises the user experience. Mistakenly sent funds urgently required by the user will remain locked for an entire day, potentially leading to frustration and dissatisfaction with the platform's functionality. Such limitations can erode user trust and confidence in the system's reliability and usability, undermining the platform's overall reputation and hindering its adoption and success.
Proof of Concept
A demonstration illustrating a holder's inability to withdraw their funds can be found here using Foundry.
Recommended Mitigation
To address this issue, consider adding a new function explicitly designed to retrieve all pending stakes associated with a user. This new functionality would enable the system to comprehensively check and retrieve all pending stakes belonging to a user, allowing them to withdraw all pending stakes in a single action.
Tools Used
Manual review
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.