You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
andreiashu
changed the title
withdrawFromQueue emits the wrong amount of tokens withdrawnwithdrawFromQueue emits the wrong number of tokens withdrawn
Jul 30, 2021
Description
withdrawFromQueue
can be called by anyone in order to withdraw deposited tokens from a round:https://github.com/monoceros-alpha/review-opyn-perp-vault-templates-2021-07/blob/d94fcb2e2173008272604705a9fc618710349462/code/contracts/core/OpynPerpVault.sol#L305-L306
The emitted event is incorrectly using the
withdrawQueueAmount
variable which holds the tokens leftover in the queue to be withdrawn:https://github.com/monoceros-alpha/review-opyn-perp-vault-templates-2021-07/blob/d94fcb2e2173008272604705a9fc618710349462/code/contracts/core/OpynPerpVault.sol#L464-L471
Recommendation
Fix the code to reference
withdrawAmount
instead which represents the number of tokens the user deposited in the round.The text was updated successfully, but these errors were encountered: