Deposit cancellation may fail if the etherFiNode version is not updated
Description
The functions batchCancelDeposit
and batchCancelDepositAsBnftHolder
do not call _updateEtherFiNode
to update the etherFiNode version. These functions internally call unRegisterValidator
in etherFiNode, which has a modifier ensureLatestVersion
to ensure that the version of the etherFiNode is not zero, but as _updateEtherFiNode
is never called, the version would be zero, and this call would revert.
Impact
The functions batchCancelDeposit
and batchCancelDepositAsBnftHolder
might revert if the version is still zero.
Recommendations
We recommend calling _updateEtherFiNode
in the batchCancelDeposit
/ batchCancelDepositAsBnftHolder
functions or internally before EtherFiNode.sol:unRegisterValidator
is called.
Remediation
This issue has been acknowledged by EtherFi, and a fix was implemented in commit 405b37cc↗.