Farseen0/scar-pairs huggingface dataset:
MEDIUM severity: Vulnerable function: ```\nfunction computeFairReserves(\n        uint256 resA,\n        uint256 resB,\n        uint256 wA. ```\nfunction computeFairReserves(\n        uint256 resA,\n        uint256 resB,\n        uint256 wA,\n        uint256 wB,\n        uint256 pxA,\n        uint256 pxB\n    ) internal pure returns (uint256 fairResA, uint256 fairResB) {\n     // rest of code\n     //@audit r0 = 0 when resA < resB.\n-> 

Vulnerable code:
```\nfunction computeFairReserves(\n        uint256 resA,\n        uint256 resB,\n        uint256 wA,\n        uint256 wB,\n        uint256 pxA,\n        uint256 pxB\n    ) internal pure returns (uint256 fairResA, uint256 fairResB) {\n     // rest of code\n     //@audit r0 = 0 when resA < resB.\n->      uint256 r0 = resA / resB;\n        uint256 r1 = (wA * pxB) / (wB * pxA);\n        // fairResA = resA * (r1 / r0) ^ wB\n        // fairResB = resB * (r0 / r1) ^ wA\n        if (r0 > r1) {\n            uint256 ratio = r1 / r0;\n            fairResA = resA * (ratio ** wB);\n            fairResB = resB / (ratio ** wA);\n        } else {\n->          uint256 ratio = r0 / r1;  // radio = 0 when r0 = 0\n->          fairResA = resA / (ratio ** wB);    // revert divided by 0\n            fairResB = resB * (ratio ** wA);\n        }\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction isValidSigner(address _account) public view override returns (bool valid) {\n    valid. ```\nfunction isValidSigner(address _account) public view override returns (bool valid) {\n    valid = HATS.isWearerOfHat(_account, signersHatId);\n}\n```\n

Vulnerable code:
```\nfunction isValidSigner(address _account) public view override returns (bool valid) {\n    valid = HATS.isWearerOfHat(_account, signersHatId);\n}\n```\n
HIGH severity: Vulnerable function: ```\nFile: UniV2Adapter.sol\n    function getExecutionData(address from, Trade calldata trade)\n..SN. ```\nFile: UniV2Adapter.sol\n    function getExecutionData(address from, Trade calldata trade)\n..SNIP..\n            executionCallData = abi.encodeWithSelector(\n                IUniV2Router2.swapExactTokensForTokens.selector,\n                trade.amount,\n                trade.limit,\n          

Vulnerable code:
```\nFile: UniV2Adapter.sol\n    function getExecutionData(address from, Trade calldata trade)\n..SNIP..\n            executionCallData = abi.encodeWithSelector(\n                IUniV2Router2.swapExactTokensForTokens.selector,\n                trade.amount,\n                trade.limit,\n                data.path,\n                from,\n                trade.deadline\n            );\n```\n
MEDIUM severity: Vulnerable function: ```\nfor (uint256 i = 0; i < committeeMembers\_.length; ++i) {\n address member . ```\nfor (uint256 i = 0; i < committeeMembers\_.length; ++i) {\n address member = committeeMembers\_[i];\n committeeArray.push(member);\n committeeIndexPlusOne[member] = committeeArray.length;\n}\n```\n

Vulnerable code:
```\nfor (uint256 i = 0; i < committeeMembers\_.length; ++i) {\n address member = committeeMembers\_[i];\n committeeArray.push(member);\n committeeIndexPlusOne[member] = committeeArray.length;\n}\n```\n
HIGH severity: Vulnerable function: ```\n  function _getLendingPoolStatus(address _lendingPoolAddress)\n    internal\n    view\n    retu. ```\n  function _getLendingPoolStatus(address _lendingPoolAddress)\n    internal\n    view\n    returns (LendingPoolStatus)\n  {\n    if (!_isReferenceLendingPoolAdded(_lendingPoolAddress)) {\n      return LendingPoolStatus.NotSupported;\n    }\n\n\n    ILendingProtocolAdapter _adapter = _getLending

Vulnerable code:
```\n  function _getLendingPoolStatus(address _lendingPoolAddress)\n    internal\n    view\n    returns (LendingPoolStatus)\n  {\n    if (!_isReferenceLendingPoolAdded(_lendingPoolAddress)) {\n      return LendingPoolStatus.NotSupported;\n    }\n\n\n    ILendingProtocolAdapter _adapter = _getLendingProtocolAdapter(\n      _lendingPoolAddress\n    );\n\n\n    if (_adapter.isLendingPoolExpired(_lendingPoolAddress)) {\n      return LendingPoolStatus.Expired;\n    }\n\n\n    if (\n      _adapter.isLendingPoolLateWithinGracePeriod(\n        _lendingPoolAddress,\n        Constants.LATE_PAYMENT_GRACE_PERIOD_IN_DAYS\n      )\n    ) {\n      return LendingPoolStatus.LateWithinGracePeriod;\n    }\n\n\n    if (_adapter.isLendingPoolLate(_lendingPoolAddress)) {\n      return LendingPoolStatus.Late;\n    }\n\n\n    return LendingPoolStatus.Active;\n  }\n```\n
HIGH severity: Vulnerable function: ```\nfunction commit(address from, address to, uint amount) external override onlyGenesisPeriod {\n . ```\nfunction commit(address from, address to, uint amount) external override onlyGenesisPeriod {\n burnFrom(from, amount);\n\n committedFGEN[to] = amount;\n totalCommittedFGEN += amount;\n\n emit Commit(from, to, amount);\n}\n```\n

Vulnerable code:
```\nfunction commit(address from, address to, uint amount) external override onlyGenesisPeriod {\n burnFrom(from, amount);\n\n committedFGEN[to] = amount;\n totalCommittedFGEN += amount;\n\n emit Commit(from, to, amount);\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: BondBaseSDA.sol\n    function marketPrice(uint256 id_) public view override returns (uint. ```\nFile: BondBaseSDA.sol\n    function marketPrice(uint256 id_) public view override returns (uint256) {\n        uint256 price = currentControlVariable(id_).mulDivUp(currentDebt(id_), markets[id_].scale);\n\n        return (price > markets[id_].minPrice) ? price : markets[id_].minPrice;\n    }\n`

Vulnerable code:
```\nFile: BondBaseSDA.sol\n    function marketPrice(uint256 id_) public view override returns (uint256) {\n        uint256 price = currentControlVariable(id_).mulDivUp(currentDebt(id_), markets[id_].scale);\n\n        return (price > markets[id_].minPrice) ? price : markets[id_].minPrice;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n        address creditor = underlyingPositionManager.ownerOf(loan.tokenId);. ```\n        address creditor = underlyingPositionManager.ownerOf(loan.tokenId);\n        // Increase liquidity and transfer liquidity owner reward\n        _increaseLiquidity(cache.saleToken, cache.holdToken, loan, amount0, amount1);\n        uint256 liquidityOwnerReward = FullMath.mulDiv(\n       

Vulnerable code:
```\n        address creditor = underlyingPositionManager.ownerOf(loan.tokenId);\n        // Increase liquidity and transfer liquidity owner reward\n        _increaseLiquidity(cache.saleToken, cache.holdToken, loan, amount0, amount1);\n        uint256 liquidityOwnerReward = FullMath.mulDiv(\n            params.totalfeesOwed,\n            cache.holdTokenDebt,\n            params.totalBorrowedAmount\n        ) / Constants.COLLATERAL_BALANCE_PRECISION;\n\n        Vault(VAULT_ADDRESS).transferToken(cache.holdToken, creditor, liquidityOwnerReward);\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction upgradeAgent(\n address agent\n) external returns (address newAgent) {\n IAgent oldAge. ```\nfunction upgradeAgent(\n address agent\n) external returns (address newAgent) {\n IAgent oldAgent = IAgent(agent);\n address owner = IAuth(address(oldAgent)).owner();\n uint256 agentId = agents[agent];\n // only the Agent's owner can upgrade, and only a registered agent can be upgraded\n if (ow

Vulnerable code:
```\nfunction upgradeAgent(\n address agent\n) external returns (address newAgent) {\n IAgent oldAgent = IAgent(agent);\n address owner = IAuth(address(oldAgent)).owner();\n uint256 agentId = agents[agent];\n // only the Agent's owner can upgrade, and only a registered agent can be upgraded\n if (owner != msg.sender || agentId == 0) revert Unauthorized();\n // deploy a new instance of Agent with the same ID and auth\n newAgent = GetRoute.agentDeployer(router).deploy(\n router,\n agentId,\n owner,\n IAuth(address(oldAgent)).operator()\n );\n // Register the new agent and unregister the old agent\n agents[newAgent] = agentId;\n // transfer funds from old agent to new agent and mark old agent as decommissioning\n oldAgent.decommissionAgent(newAgent);\n // delete the old agent from the registry\n agents[agent] = 0;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n  function storePriceAndRewards(uint256 _totalUnderlying, uint256 _protocolId) internal {\n    . ```\n  function storePriceAndRewards(uint256 _totalUnderlying, uint256 _protocolId) internal {\n    uint256 currentPrice = price(_protocolId);\n    if (lastPrices[_protocolId] == 0) {\n      lastPrices[_protocolId] = currentPrice;\n      return;\n    }\n\n\n    int256 priceDiff = int256(currentPrice

Vulnerable code:
```\n  function storePriceAndRewards(uint256 _totalUnderlying, uint256 _protocolId) internal {\n    uint256 currentPrice = price(_protocolId);\n    if (lastPrices[_protocolId] == 0) {\n      lastPrices[_protocolId] = currentPrice;\n      return;\n    }\n\n\n    int256 priceDiff = int256(currentPrice - lastPrices[_protocolId]);\n    int256 nominator = (int256(_totalUnderlying * performanceFee) * priceDiff);\n    int256 totalAllocatedTokensRounded = totalAllocatedTokens / 1E18;\n    int256 denominator = totalAllocatedTokensRounded * int256(lastPrices[_protocolId]) * 100; // * 100 cause perfFee is in percentages\n\n\n    if (totalAllocatedTokensRounded == 0) {\n      rewardPerLockedToken[rebalancingPeriod][_protocolId] = 0;\n    } else {\n      rewardPerLockedToken[rebalancingPeriod][_protocolId] = nominator / denominator;\n    }\n\n\n    lastPrices[_protocolId] = currentPrice;\n  }\n```\n
HIGH severity: Vulnerable function: ```\njusdOutside[msg.sender] -= repayJUSDAmount;\nuint256 index = getIndex();\nu. ```\njusdOutside[msg.sender] -= repayJUSDAmount;\nuint256 index = getIndex();\nuint256 lockedEarnUSDCAmount = jusdOutside[msg.sender].decimalDiv(index);\nrequire(\n     earnUSDCBalance[msg.sender] >= lockedEarnUSDCAmount, "lockedEarnUSDCAmount is bigger than earnUSDCBalance"\n);\nwithdrawEarnUSDCAmo

Vulnerable code:
```\njusdOutside[msg.sender] -= repayJUSDAmount;\nuint256 index = getIndex();\nuint256 lockedEarnUSDCAmount = jusdOutside[msg.sender].decimalDiv(index);\nrequire(\n     earnUSDCBalance[msg.sender] >= lockedEarnUSDCAmount, "lockedEarnUSDCAmount is bigger than earnUSDCBalance"\n);\nwithdrawEarnUSDCAmount = earnUSDCBalance[msg.sender] - lockedEarnUSDCAmount;\n```\n
MEDIUM severity: Vulnerable function: ```\n            wAuraPools.getVault(lpToken).exitPool(\n                IBalanc. ```\n            wAuraPools.getVault(lpToken).exitPool(\n                IBalancerPool(lpToken).getPoolId(),\n                address(this),\n                address(this),\n                IBalancerVault.ExitPoolRequest(\n                    tokens,\n                    minAmountsOut,\n            

Vulnerable code:
```\n            wAuraPools.getVault(lpToken).exitPool(\n                IBalancerPool(lpToken).getPoolId(),\n                address(this),\n                address(this),\n                IBalancerVault.ExitPoolRequest(\n                    tokens,\n                    minAmountsOut,\n                    abi.encode(0, amountPosRemove, borrowTokenIndex),\n                    false\n                )\n            );\n        }\n    }\n\n    /// 4. Swap each reward token for the debt token\n    uint256 rewardTokensLength = rewardTokens.length;\n    for (uint256 i; i != rewardTokensLength; ) {\n        address sellToken = rewardTokens[i];\n        if (sellToken == STASH_AURA) sellToken = AURA;\n\n        _doCutRewardsFee(sellToken);\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: VaultAccount.sol\n    function _setVaultAccount(\n..SNIP..\n        // An account must ma. ```\nFile: VaultAccount.sol\n    function _setVaultAccount(\n..SNIP..\n        // An account must maintain a minimum borrow size in order to enter the vault. If the account\n        // wants to exit under the minimum borrow size it must fully exit so that we do not have dust\n        // accounts tha

Vulnerable code:
```\nFile: VaultAccount.sol\n    function _setVaultAccount(\n..SNIP..\n        // An account must maintain a minimum borrow size in order to enter the vault. If the account\n        // wants to exit under the minimum borrow size it must fully exit so that we do not have dust\n        // accounts that become insolvent.\n        if (\n            vaultAccount.accountDebtUnderlying.neg() < vaultConfig.minAccountBorrowSize &&\n            // During local currency liquidation and settlement, the min borrow check is skipped\n            checkMinBorrow\n        ) {\n            // NOTE: use 1 to represent the minimum amount of vault shares due to rounding in the\n            // vaultSharesToLiquidator calculation\n            require(vaultAccount.accountDebtUnderlying == 0 || vaultAccount.vaultShares <= 1, "Min Borrow");\n        }\n```\n
HIGH severity: Vulnerable function: ```\nfor (uint256 i = 0; i < tokens.length; i++) {\n    uint256 amountToRagequit = fairShare(userTok. ```\nfor (uint256 i = 0; i < tokens.length; i++) {\n    uint256 amountToRagequit = fairShare(userTokenBalances[GUILD][tokens[i]], sharesAndLootToBurn, initialTotalSharesAndLoot);\n    // deliberately not using safemath here to keep overflows from preventing the function execution (which would break 

Vulnerable code:
```\nfor (uint256 i = 0; i < tokens.length; i++) {\n    uint256 amountToRagequit = fairShare(userTokenBalances[GUILD][tokens[i]], sharesAndLootToBurn, initialTotalSharesAndLoot);\n    // deliberately not using safemath here to keep overflows from preventing the function execution (which would break ragekicks)\n    // if a token overflows, it is because the supply was artificially inflated to oblivion, so we probably don't care about it anyways\n    userTokenBalances[GUILD][tokens[i]] -= amountToRagequit;\n    userTokenBalances[memberAddress][tokens[i]] += amountToRagequit;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nif (sqrtRatioX96 <= sqrtRatioAX96) {\n      amount0 = SafeCast.toUint256(\n. ```\nif (sqrtRatioX96 <= sqrtRatioAX96) {\n      amount0 = SafeCast.toUint256(\n          SqrtPriceMath.getAmount0Delta(\n               sqrtRatioAX96,\n               sqrtRatioBX96,\n               liquidity\n          )\n      );\n} \n```\n

Vulnerable code:
```\nif (sqrtRatioX96 <= sqrtRatioAX96) {\n      amount0 = SafeCast.toUint256(\n          SqrtPriceMath.getAmount0Delta(\n               sqrtRatioAX96,\n               sqrtRatioBX96,\n               liquidity\n          )\n      );\n} \n```\n
MEDIUM severity: Vulnerable function: ```\n    function findOrderHintId(\n        mapping(address => mapping(uint16 => STypes.Order)) stor. ```\n    function findOrderHintId(\n        mapping(address => mapping(uint16 => STypes.Order)) storage orders,\n        address asset,\n        MTypes.OrderHint[] memory orderHintArray\n    ) internal returns (uint16 hintId) {\n\n          // more code\n\n          // @audit if a reused order's pre

Vulnerable code:
```\n    function findOrderHintId(\n        mapping(address => mapping(uint16 => STypes.Order)) storage orders,\n        address asset,\n        MTypes.OrderHint[] memory orderHintArray\n    ) internal returns (uint16 hintId) {\n\n          // more code\n\n          // @audit if a reused order's prevOrderType is matched, returns HEAD\n\n          if (hintOrderType == O.Cancelled || hintOrderType == O.Matched) {\n                emit Events.FindOrderHintId(0);\n                continue;\n            } else if (\n                orders[asset][orderHint.hintId].creationTime == orderHint.creationTime\n            ) {\n                emit Events.FindOrderHintId(1);\n                return orderHint.hintId;\n            } else if (orders[asset][orderHint.hintId].prevOrderType == O.Matched) {\n                //@dev If hint was prev matched, it means that the hint was close to HEAD and therefore is reasonable to use HEAD\n                emit Events.FindOrderHintId(2);\n                return Constants.HEAD;\n            }\n```\n
HIGH severity: Vulnerable function: ```\nfunction _isLess(Queue storage self, uint256 i, uint256 j) private view returns (bool) {\n    u. ```\nfunction _isLess(Queue storage self, uint256 i, uint256 j) private view returns (bool) {\n    uint64 iId = self.bidIdList[i];\n    uint64 jId = self.bidIdList[j];\n    Bid memory bidI = self.idToBidMap[iId];\n    Bid memory bidJ = self.idToBidMap[jId];\n    uint256 relI = uint256(bidI.amountIn)

Vulnerable code:
```\nfunction _isLess(Queue storage self, uint256 i, uint256 j) private view returns (bool) {\n    uint64 iId = self.bidIdList[i];\n    uint64 jId = self.bidIdList[j];\n    Bid memory bidI = self.idToBidMap[iId];\n    Bid memory bidJ = self.idToBidMap[jId];\n    uint256 relI = uint256(bidI.amountIn) * uint256(bidJ.minAmountOut);\n    uint256 relJ = uint256(bidJ.amountIn) * uint256(bidI.minAmountOut);\n    if (relI == relJ) {\n        return iId > jId;\n    }\n    return relI < relJ;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    function _redeem(\n    ThreeTokenPoolContext memory poolContext,\n    StrategyContext memor. ```\n    function _redeem(\n    ThreeTokenPoolContext memory poolContext,\n    StrategyContext memory strategyContext,\n    AuraStakingContext memory stakingContext,\n    uint256 strategyTokens,\n    uint256 minPrimary\n) internal returns (uint256 finalPrimaryBalance) {\n    uint256 bptClaim = strat

Vulnerable code:
```\n    function _redeem(\n    ThreeTokenPoolContext memory poolContext,\n    StrategyContext memory strategyContext,\n    AuraStakingContext memory stakingContext,\n    uint256 strategyTokens,\n    uint256 minPrimary\n) internal returns (uint256 finalPrimaryBalance) {\n    uint256 bptClaim = strategyContext._convertStrategyTokensToBPTClaim(strategyTokens);\n\n\n    if (bptClaim == 0) return 0;\n\n\n    finalPrimaryBalance = _unstakeAndExitPool({\n        stakingContext: stakingContext,\n        poolContext: poolContext,\n        bptClaim: bptClaim,\n        minPrimary: minPrimary\n    });\n\n\n    strategyContext.vaultState.totalBPTHeld -= bptClaim;\n    strategyContext.vaultState.totalStrategyTokenGlobal -= strategyTokens.toUint80();\n    strategyContext.vaultState.setStrategyVaultState(); \n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    function getAccountPrimeDebtBalance(uint16 currencyId, address account) external view overr. ```\n    function getAccountPrimeDebtBalance(uint16 currencyId, address account) external view override returns (\n        int256 debtBalance\n    ) {\n        mapping(address => mapping(uint256 => BalanceStorage)) storage store = LibStorage.getBalanceStorage();\n        BalanceStorage storage balan

Vulnerable code:
```\n    function getAccountPrimeDebtBalance(uint16 currencyId, address account) external view override returns (\n        int256 debtBalance\n    ) {\n        mapping(address => mapping(uint256 => BalanceStorage)) storage store = LibStorage.getBalanceStorage();\n        BalanceStorage storage balanceStorage = store[account][currencyId];\n        int256 cashBalance = balanceStorage.cashBalance;\n\n        // Only return cash balances less than zero\n        debtBalance = cashBalance < 0 ? debtBalance : 0;   //<------@audit wrong, Always return 0\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: contracts\gas\GasUtils.sol\n    function payExecutionFee(\n        DataStore dataStore,\n. ```\nFile: contracts\gas\GasUtils.sol\n    function payExecutionFee(\n        DataStore dataStore,\n        EventEmitter eventEmitter,\n        StrictBank bank,\n        uint256 executionFee,\n        uint256 startingGas,\n        address keeper,\n        address user\n    ) external { // @audit ext

Vulnerable code:
```\nFile: contracts\gas\GasUtils.sol\n    function payExecutionFee(\n        DataStore dataStore,\n        EventEmitter eventEmitter,\n        StrictBank bank,\n        uint256 executionFee,\n        uint256 startingGas,\n        address keeper,\n        address user\n    ) external { // @audit external call is subject to EIP// Remove the line below\n150\n// Remove the line below\n        uint256 gasUsed = startingGas // Remove the line below\n gasleft();\n// Add the line below\n            uint256 gasUsed = startingGas // Remove the line below\n gasleft() * 64 / 63; // @audit the correct formula\n        uint256 executionFeeForKeeper = adjustGasUsage(dataStore, gasUsed) * tx.gasprice;\n\n        if (executionFeeForKeeper > executionFee) {\n            executionFeeForKeeper = executionFee;\n        }\n\n        bank.transferOutNativeToken(\n            keeper,\n            executionFeeForKeeper\n        );\n\n        emitKeeperExecutionFee(eventEmitter, keeper, executionFeeForKeeper);\n\n        uint256 refundFeeAmount = executionFee // Remove the line below\n executionFeeForKeeper;\n        if (refundFeeAmount == 0) {\n            return;\n        }\n\n        bank.transferOutNativeToken(\n            user,\n            refundFeeAmount\n        );\n\n        emitExecutionFeeRefund(eventEmitter, user, refundFeeAmount);\n    }\n```\n
HIGH severity: Vulnerable function: ```\n    uint256 ohmWstethPrice = manager.getOhmTknPrice();\n    uint256 ohmMint. ```\n    uint256 ohmWstethPrice = manager.getOhmTknPrice();\n    uint256 ohmMintAmount = (amount_ * ohmWstethPrice) / _WSTETH_DECIMALS;\n\n    // Block scope to avoid stack too deep\n    {\n        // Cache OHM-wstETH BPT before\n        uint256 bptBefore = liquidityPool.balanceOf(address(this));\n\

Vulnerable code:
```\n    uint256 ohmWstethPrice = manager.getOhmTknPrice();\n    uint256 ohmMintAmount = (amount_ * ohmWstethPrice) / _WSTETH_DECIMALS;\n\n    // Block scope to avoid stack too deep\n    {\n        // Cache OHM-wstETH BPT before\n        uint256 bptBefore = liquidityPool.balanceOf(address(this));\n\n        // Transfer in wstETH\n        wsteth.safeTransferFrom(msg.sender, address(this), amount_);\n\n        // Mint OHM\n        manager.mintOhmToVault(ohmMintAmount);\n\n        // Join Balancer pool\n        _joinBalancerPool(ohmMintAmount, amount_, minLpAmount_);\n```\n
MEDIUM severity: Vulnerable function: ```\nSTATICCALL IchiLpOracle.getPrice(token=0xFCFE742e19790Dd67a627875ef8b45F17D. ```\nSTATICCALL IchiLpOracle.getPrice(token=0xFCFE742e19790Dd67a627875ef8b45F17DB1DaC6) => (1101189125194558706411110851447)\n```\n

Vulnerable code:
```\nSTATICCALL IchiLpOracle.getPrice(token=0xFCFE742e19790Dd67a627875ef8b45F17DB1DaC6) => (1101189125194558706411110851447)\n```\n
HIGH severity: Vulnerable function: ```\n \*/\nfunction setIDOLContract(address contractAddress) public {\n    require(address(\_IDOLCon. ```\n \*/\nfunction setIDOLContract(address contractAddress) public {\n    require(address(\_IDOLContract) == address(0), "IDOL contract is already registered");\n    \_setStableCoinContract(contractAddress);\n}\n```\n

Vulnerable code:
```\n \*/\nfunction setIDOLContract(address contractAddress) public {\n    require(address(\_IDOLContract) == address(0), "IDOL contract is already registered");\n    \_setStableCoinContract(contractAddress);\n}\n```\n
HIGH severity: Vulnerable function: ```\nFile: LMPDebt.sol\n        // Neither of these numbers include rewards from. ```\nFile: LMPDebt.sol\n        // Neither of these numbers include rewards from the DV\n        if (currentDvDebtValue < updatedDebtBasis) {\n            // We are currently sitting at a loss. Limit the value we can pull from\n            // the destination vault\n            currentDvDebtValue = c

Vulnerable code:
```\nFile: LMPDebt.sol\n        // Neither of these numbers include rewards from the DV\n        if (currentDvDebtValue < updatedDebtBasis) {\n            // We are currently sitting at a loss. Limit the value we can pull from\n            // the destination vault\n            currentDvDebtValue = currentDvDebtValue.mulDiv(userShares, totalVaultShares, Math.Rounding.Down);\n            currentDvShares = currentDvShares.mulDiv(userShares, totalVaultShares, Math.Rounding.Down);\n        }\n```\n
MEDIUM severity: Vulnerable function: ```\nuint256 cRatio = short.getCollateralRatioSpotPrice(LibOracle.getSavedOrSpot. ```\nuint256 cRatio = short.getCollateralRatioSpotPrice(LibOracle.getSavedOrSpotOraclePrice(asset));\n```\n

Vulnerable code:
```\nuint256 cRatio = short.getCollateralRatioSpotPrice(LibOracle.getSavedOrSpotOraclePrice(asset));\n```\n