VaderReserve does not support paying IL protection out to more than one address, resulting in locked funds #37
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
VaderRouter
VaderRouterV2
Handle
TomFrench
Vulnerability details
Impact
All liquidity deployed to one of
VaderPool
orVaderPoolV2
will be locked permanently.Proof of Concept
Both
VaderRouter
andVaderRouterV2
make calls toVaderReserve
in order to pay out IL protection.https://github.com/code-423n4/2021-11-vader/blob/3a43059e33d549f03b021d6b417b7eeba66cf62e/contracts/dex/router/VaderRouter.sol#L206
https://github.com/code-423n4/2021-11-vader/blob/3a43059e33d549f03b021d6b417b7eeba66cf62e/contracts/dex-v2/router/VaderRouterV2.sol#L227
However
VaderReserve
only allows a single router to claim IL protection on behalf of users.https://github.com/code-423n4/2021-11-vader/blob/3a43059e33d549f03b021d6b417b7eeba66cf62e/contracts/reserve/VaderReserve.sol#L80-L83
It's unlikely that the intent is to deploy multiple reserves so there's no way for both
VaderRouter
andVaderRouterV2
to pay out IL protection simultaneously.This is a high severity issue as any LPs which are using the router which is not listed on
VaderReserve
will be unable to remove liquidity as the call to the reserve will revert. Vader governance is unable to update the allowed router onVaderReserve
so all liquidity on eitherVaderPool
orVaderPoolV2
will be locked permanently.Recommended Mitigation Steps
Options:
The text was updated successfully, but these errors were encountered: