This repository has been archived by the owner on May 26, 2023. It is now read-only.
koxuan - user cannot closePosition when borrow token is removed from whitelist #11
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Non-Reward
This issue will not receive a payout
Sponsor Disputed
The sponsor disputed this issue's validity
Won't Fix
The sponsor confirmed this issue will not be fixed
koxuan
medium
user cannot closePosition when borrow token is removed from whitelist
Summary
If borrowed token is removed from collateral list, user's position cannot be closed as he is unable to repay his loan.
Vulnerability Detail
Notice that
onlyWhitelistedToken
is used as a modifer, in the event that the borrow token of the position is removed from whitelist, repay will fail which means that user position cannot be closed. See code snippet for the call stack fromclosePosition
torepay
.Impact
User cannot close position if the borrow token of the position is removed from whitelist.
Code Snippet
IchiVaultSpell.sol#L357-L364
IchiVaultSpell.sol#L394-L401
IchiVaultSpell.sol#L323
BasicSpell.sol#L108-L113
BlueBerryBank.sol#L740-L754
Tool used
Manual Review
Recommendation
Recommend allowing
repay
to work for non whitelisted token so that user can close their position even when the borrowed token is removed from whitelist.The text was updated successfully, but these errors were encountered: