Open 0xdcota opened 1 year ago
In the BorrowingVault during the liquidate() call, we check that gainedShares are not more than the liquiated owner existing shares. However, in case vault's withdrawals are paused, the existingShares will return zero.
liquidate()
gainedShares
existingShares
https://github.com/Fujicracy/fuji-v2/blob/c22c3d34d3abf5240412835dac3d8897a0dcab35/packages/protocol/src/vaults/borrowing/BorrowingVault.sol#L863-L873
https://github.com/Fujicracy/fuji-v2/blob/c22c3d34d3abf5240412835dac3d8897a0dcab35/packages/protocol/src/abstracts/BaseVault.sol#L276-L281
In the BorrowingVault during the
liquidate()
call, we check thatgainedShares
are not more than the liquiated owner existing shares. However, in case vault's withdrawals are paused, theexistingShares
will return zero.https://github.com/Fujicracy/fuji-v2/blob/c22c3d34d3abf5240412835dac3d8897a0dcab35/packages/protocol/src/vaults/borrowing/BorrowingVault.sol#L863-L873
https://github.com/Fujicracy/fuji-v2/blob/c22c3d34d3abf5240412835dac3d8897a0dcab35/packages/protocol/src/abstracts/BaseVault.sol#L276-L281