Context
In TOB::exitPosition() we check for the time of expiry using
if (!isSGLInRescueMode) {
if (block.timestamp < lock.lockTime + lock.lockDuration) {
revert LockNotExpired();
}
}
However, on the V2 change, we added a new check on the user's BB debt
// Check if debt ratio is below threshold, if so bypass lock expiration
if (tOLP.canLockWithDebt(oTAP.ownerOf(_oTAPTokenID), uint256(lock.sglAssetID), uint256(lock.ybShares))) {
// If SGL is in rescue, bypass the lock expiration
isSGLInRescueMode = true;
if (!isSGLInRescueMode) {
if (block.timestamp < lock.lockTime + lock.lockDuration) {
revert LockNotExpired();
}
}
}
The new addition
+ isSGLInRescueMode = true;
makes so the expiry check is never reached, and it should be removed.
Context In
TOB::exitPosition()
we check for the time of expiry usingHowever, on the V2 change, we added a new check on the user's BB debt
The new addition
makes so the expiry check is never reached, and it should be removed.