Farseen0/scar-pairs huggingface dataset:
HIGH severity: Vulnerable function: ```\n    function queueNewRewards(uint256 newRewards) external onlyWhitelisted {\n        uint256 st. ```\n    function queueNewRewards(uint256 newRewards) external onlyWhitelisted {\n        uint256 startingQueuedRewards = queuedRewards;\n        uint256 startingNewRewards = newRewards;\n\n        newRewards += startingQueuedRewards;\n\n        if (block.number >= periodInBlockFinish) {\n          

Vulnerable code:
```\n    function queueNewRewards(uint256 newRewards) external onlyWhitelisted {\n        uint256 startingQueuedRewards = queuedRewards;\n        uint256 startingNewRewards = newRewards;\n\n        newRewards += startingQueuedRewards;\n\n        if (block.number >= periodInBlockFinish) {\n            notifyRewardAmount(newRewards);\n            queuedRewards = 0;\n        } else {\n            uint256 elapsedBlock = block.number - (periodInBlockFinish - durationInBlock);\n            uint256 currentAtNow = rewardRate * elapsedBlock;\n            uint256 queuedRatio = currentAtNow * 1000 / newRewards;\n\n            if (queuedRatio < newRewardRatio) {\n                notifyRewardAmount(newRewards);\n                queuedRewards = 0;\n            } else {\n                queuedRewards = newRewards;\n            }\n        }\n\n        emit QueuedRewardsUpdated(startingQueuedRewards, startingNewRewards, queuedRewards);\n\n        // Transfer the new rewards from the caller to this contract.\n        IERC20(rewardToken).safeTransferFrom(msg.sender, address(this), newRewards);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n    if (\n      RiskFactorCalculator.canCalculateRiskFactor(\n        _tota. ```\n    if (\n      RiskFactorCalculator.canCalculateRiskFactor(\n        _totalCapital,\n        _leverageRatio,\n        _poolParameters.leverageRatioFloor,\n        _poolParameters.leverageRatioCeiling,\n        _poolParameters.minRequiredCapital\n      )\n    ) {\n      // rest of code\n    } e

Vulnerable code:
```\n    if (\n      RiskFactorCalculator.canCalculateRiskFactor(\n        _totalCapital,\n        _leverageRatio,\n        _poolParameters.leverageRatioFloor,\n        _poolParameters.leverageRatioCeiling,\n        _poolParameters.minRequiredCapital\n      )\n    ) {\n      // rest of code\n    } else {\n      /// This means that the risk factor cannot be calculated because of either\n      /// min capital not met or leverage ratio out of range.\n      /// Hence, the premium is the minimum premium\n      _isMinPremium = true;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n        _transferAmountFrom(_token, TransferData({from: msg.sender, to: add. ```\n        _transferAmountFrom(_token, TransferData({from: msg.sender, to: address(_strategy), amount: amountAfterFee}));\n        _strategy.increasePoolAmount(amountAfterFee);\n```\n

Vulnerable code:
```\n        _transferAmountFrom(_token, TransferData({from: msg.sender, to: address(_strategy), amount: amountAfterFee}));\n        _strategy.increasePoolAmount(amountAfterFee);\n```\n
MEDIUM severity: Vulnerable function: ```\nfor (uint256 i; i < _ownerCount - 1;) {\n    ownerToCheck = _owners[i];\n\n. ```\nfor (uint256 i; i < _ownerCount - 1;) {\n    ownerToCheck = _owners[i];\n\n    if (!isValidSigner(ownerToCheck)) {\n        // prep the swap\n        data = abi.encodeWithSignature(\n            "swapOwner(address,address,address)",\n            // rest of code\n```\n

Vulnerable code:
```\nfor (uint256 i; i < _ownerCount - 1;) {\n    ownerToCheck = _owners[i];\n\n    if (!isValidSigner(ownerToCheck)) {\n        // prep the swap\n        data = abi.encodeWithSignature(\n            "swapOwner(address,address,address)",\n            // rest of code\n```\n
HIGH severity: Vulnerable function: ```\n    function reclaimContract(Order calldata order) public nonReentrant {\n        bytes32 order. ```\n    function reclaimContract(Order calldata order) public nonReentrant {\n        bytes32 orderHash = hashOrder(order);\n\n        // ContractId\n        uint contractId = uint(orderHash);\n\n        address bull = bulls[contractId];\n\n        // Check that the contract is expired\n        req

Vulnerable code:
```\n    function reclaimContract(Order calldata order) public nonReentrant {\n        bytes32 orderHash = hashOrder(order);\n\n        // ContractId\n        uint contractId = uint(orderHash);\n\n        address bull = bulls[contractId];\n\n        // Check that the contract is expired\n        require(block.timestamp > order.expiry, "NOT_EXPIRED_CONTRACT");\n\n        // Check that the contract is not settled\n        require(!settledContracts[contractId], "SETTLED_CONTRACT");\n\n        // Check that the contract is not reclaimed\n        require(!reclaimedContracts[contractId], "RECLAIMED_CONTRACT");\n\n        uint bullAssetAmount = order.premium + order.collateral;\n        if (bullAssetAmount > 0) {\n            // Transfer payment tokens to the Bull\n            IERC20(order.asset).safeTransfer(bull, bullAssetAmount);\n        }\n\n        reclaimedContracts[contractId] = true;\n\n        emit ReclaimedContract(orderHash, order);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nreturn storedCashBalance.mul(pr.debtFactor).div(pr.supplyFactor);\n```\n. ```\nreturn storedCashBalance.mul(pr.debtFactor).div(pr.supplyFactor);\n```\n

Vulnerable code:
```\nreturn storedCashBalance.mul(pr.debtFactor).div(pr.supplyFactor);\n```\n
HIGH severity: Vulnerable function: ```\n    function clear (uint256 reqID) external returns (uint256 loanID) {\n        Request storage. ```\n    function clear (uint256 reqID) external returns (uint256 loanID) {\n        Request storage req = requests[reqID];\n\n        factory.newEvent(reqID, CoolerFactory.Events.Clear);\n\n        if (!req.active) \n            revert Deactivated();\n        else req.active = false;\n\n        uin

Vulnerable code:
```\n    function clear (uint256 reqID) external returns (uint256 loanID) {\n        Request storage req = requests[reqID];\n\n        factory.newEvent(reqID, CoolerFactory.Events.Clear);\n\n        if (!req.active) \n            revert Deactivated();\n        else req.active = false;\n\n        uint256 interest = interestFor(req.amount, req.interest, req.duration);\n        uint256 collat = collateralFor(req.amount, req.loanToCollateral);\n        uint256 expiration = block.timestamp + req.duration;\n\n        loanID = loans.length;\n        loans.push(\n            Loan(req, req.amount + interest, collat, expiration, true, msg.sender)\n        );\n        debt.transferFrom(msg.sender, owner, req.amount);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction approveAllDaiTokensForStakingAndVotingAndTransferOwnership() internal {\n  daiToken.ap. ```\nfunction approveAllDaiTokensForStakingAndVotingAndTransferOwnership() internal {\n  daiToken.approve(address(bmiDaiStaking), MAX\_INT);   \n  daiToken.approve(address(claimVoting), MAX\_INT);    \n\n  transferOwnership(address(bmiDaiStaking));\n}\n```\n

Vulnerable code:
```\nfunction approveAllDaiTokensForStakingAndVotingAndTransferOwnership() internal {\n  daiToken.approve(address(bmiDaiStaking), MAX\_INT);   \n  daiToken.approve(address(claimVoting), MAX\_INT);    \n\n  transferOwnership(address(bmiDaiStaking));\n}\n```\n
MEDIUM severity: Vulnerable function: ```\naddress internal constant DIVIDER = 0x09B10E45A912BcD4E80a8A3119f0cfCcad1e1. ```\naddress internal constant DIVIDER = 0x09B10E45A912BcD4E80a8A3119f0cfCcad1e1f12;\n```\n

Vulnerable code:
```\naddress internal constant DIVIDER = 0x09B10E45A912BcD4E80a8A3119f0cfCcad1e1f12;\n```\n
HIGH severity: Vulnerable function: ```\n /**\n   * @notice Hook to update the slope and yIntercept of the PublicVau. ```\n /**\n   * @notice Hook to update the slope and yIntercept of the PublicVault on payment.\n   * The rate for the LienToken is subtracted from the total slope of the PublicVault, and recalculated in afterPayment().\n   * @param lienId The ID of the lien.\n   * @param amount The amount paid off t

Vulnerable code:
```\n /**\n   * @notice Hook to update the slope and yIntercept of the PublicVault on payment.\n   * The rate for the LienToken is subtracted from the total slope of the PublicVault, and recalculated in afterPayment().\n   * @param lienId The ID of the lien.\n   * @param amount The amount paid off to deduct from the yIntercept of the PublicVault.\n   */\n```\n
MEDIUM severity: Vulnerable function: ```\n    function deploySpareSubAccount(address _wallet) external { address subAccount =\n        Sa. ```\n    function deploySpareSubAccount(address _wallet) external { address subAccount =\n        SafeDeployer(addressProvider.safeDeployer()).deploySubAccount(_wallet);\n             subAccountToWalletMap[subAccount] = _wallet; walletToSubAccountMap[_wallet].push(subAccount);\n           // No need

Vulnerable code:
```\n    function deploySpareSubAccount(address _wallet) external { address subAccount =\n        SafeDeployer(addressProvider.safeDeployer()).deploySubAccount(_wallet);\n             subAccountToWalletMap[subAccount] = _wallet; walletToSubAccountMap[_wallet].push(subAccount);\n           // No need to update subAccountStatus as it is already set to false\n              emit SubAccountAllocated(_wallet, subAccount);\n                }\n```\n
HIGH severity: Vulnerable function: ```\n  function mintFee() public {\n    _mint(_store.treasury, GMXReader.pendingFee(_store));\n    _. ```\n  function mintFee() public {\n    _mint(_store.treasury, GMXReader.pendingFee(_store));\n    _store.lastFeeCollected = block.timestamp;\n  }\n```\n

Vulnerable code:
```\n  function mintFee() public {\n    _mint(_store.treasury, GMXReader.pendingFee(_store));\n    _store.lastFeeCollected = block.timestamp;\n  }\n```\n
MEDIUM severity: Vulnerable function: ```\n        if (\n            _shouldDrawWinner(\n                startingRound. ```\n        if (\n            _shouldDrawWinner(\n                startingRound.numberOfParticipants,\n                startingRound.maximumNumberOfParticipants,\n                startingRound.deposits.length\n            )\n        ) {\n            _drawWinner(startingRound, startingRoundId);\n   

Vulnerable code:
```\n        if (\n            _shouldDrawWinner(\n                startingRound.numberOfParticipants,\n                startingRound.maximumNumberOfParticipants,\n                startingRound.deposits.length\n            )\n        ) {\n            _drawWinner(startingRound, startingRoundId);\n        }\n```\n
MEDIUM severity: Vulnerable function: ```\nuint256 rateWhenCreated = AccessControlManager.swETH().swETHToETHRate();\n`. ```\nuint256 rateWhenCreated = AccessControlManager.swETH().swETHToETHRate();\n```\n

Vulnerable code:
```\nuint256 rateWhenCreated = AccessControlManager.swETH().swETHToETHRate();\n```\n
HIGH severity: Vulnerable function: ```\nfor (uint256 w = fromWeek\_; w < toWeek\_; ++w) {\n incomeMap[policyIndex\_. ```\nfor (uint256 w = fromWeek\_; w < toWeek\_; ++w) {\n incomeMap[policyIndex\_][w] =\n incomeMap[policyIndex\_][w].add(premium);\n coveredMap[policyIndex\_][w] =\n coveredMap[policyIndex\_][w].add(amount\_);\n\n require(coveredMap[policyIndex\_][w] <= maximumToCover,\n "Not enough to buy");\n\n co

Vulnerable code:
```\nfor (uint256 w = fromWeek\_; w < toWeek\_; ++w) {\n incomeMap[policyIndex\_][w] =\n incomeMap[policyIndex\_][w].add(premium);\n coveredMap[policyIndex\_][w] =\n coveredMap[policyIndex\_][w].add(amount\_);\n\n require(coveredMap[policyIndex\_][w] <= maximumToCover,\n "Not enough to buy");\n\n coverageMap[policyIndex\_][w][\_msgSender()] = Coverage({\n amount: amount\_,\n premium: premium,\n refunded: false\n });\n}\n```\n
HIGH severity: Vulnerable function: ```\nfunction checkRole(bytes32 role, address \_sender) public view returns(bool){\n return hasRole(. ```\nfunction checkRole(bytes32 role, address \_sender) public view returns(bool){\n return hasRole(role, \_sender) || hasRole(DAO, \_sender);\n}\n\nfunction checkOnlyRole(bytes32 role, address \_sender) public view returns(bool){\n return hasRole(role, \_sender);\n}\n```\n

Vulnerable code:
```\nfunction checkRole(bytes32 role, address \_sender) public view returns(bool){\n return hasRole(role, \_sender) || hasRole(DAO, \_sender);\n}\n\nfunction checkOnlyRole(bytes32 role, address \_sender) public view returns(bool){\n return hasRole(role, \_sender);\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nspender = address(Deployments.UNIV2_ROUTER);\ntarget = address(Deployments.. ```\nspender = address(Deployments.UNIV2_ROUTER);\ntarget = address(Deployments.UNIV2_ROUTER);\n// msgValue is always zero for uniswap\n\nif (\n    tradeType == TradeType.EXACT_IN_SINGLE ||\n    tradeType == TradeType.EXACT_IN_BATCH\n) {\n    executionCallData = abi.encodeWithSelector(\n        IUni

Vulnerable code:
```\nspender = address(Deployments.UNIV2_ROUTER);\ntarget = address(Deployments.UNIV2_ROUTER);\n// msgValue is always zero for uniswap\n\nif (\n    tradeType == TradeType.EXACT_IN_SINGLE ||\n    tradeType == TradeType.EXACT_IN_BATCH\n) {\n    executionCallData = abi.encodeWithSelector(\n        IUniV2Router2.swapExactTokensForTokens.selector,\n        trade.amount,\n        trade.limit,\n        data.path,\n        from,\n        trade.deadline\n    );\n} else if (\n    tradeType == TradeType.EXACT_OUT_SINGLE ||\n    tradeType == TradeType.EXACT_OUT_BATCH\n) {\n    executionCallData = abi.encodeWithSelector(\n        IUniV2Router2.swapTokensForExactTokens.selector,\n        trade.amount,\n        trade.limit,\n        data.path,\n        from,\n        trade.deadline\n    );\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    function _invariant(\n        Context memory context,\n        address account,\n        Or. ```\n    function _invariant(\n        Context memory context,\n        address account,\n        Order memory newOrder,\n        Fixed6 collateral,\n        bool protected\n    ) private view {\n        // rest of code.\n\n        if (protected) return; // The following invariants do not apply to p

Vulnerable code:
```\n    function _invariant(\n        Context memory context,\n        address account,\n        Order memory newOrder,\n        Fixed6 collateral,\n        bool protected\n    ) private view {\n        // rest of code.\n\n        if (protected) return; // The following invariants do not apply to protected position updates (liquidations)\n        // rest of code.\n            if (\n            context.global.currentId > context.global.latestId + context.marketParameter.maxPendingGlobal ||\n            context.local.currentId > context.local.latestId + context.marketParameter.maxPendingLocal\n        ) revert MarketExceedsPendingIdLimitError();\n        // rest of code.\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction \_updateEpochsInfo() internal {\n  uint256 \_totalEpochTime = block.timestamp.sub(epoc. ```\nfunction \_updateEpochsInfo() internal {\n  uint256 \_totalEpochTime = block.timestamp.sub(epochStartTime);\n  uint256 \_countOfPassedEpoch = \_totalEpochTime.div(epochDuration);\n\n  uint256 \_lastEpochUpdate = currentEpochNumber;\n  currentEpochNumber = \_countOfPassedEpoch.add(1);\n\n  for (

Vulnerable code:
```\nfunction \_updateEpochsInfo() internal {\n  uint256 \_totalEpochTime = block.timestamp.sub(epochStartTime);\n  uint256 \_countOfPassedEpoch = \_totalEpochTime.div(epochDuration);\n\n  uint256 \_lastEpochUpdate = currentEpochNumber;\n  currentEpochNumber = \_countOfPassedEpoch.add(1);\n\n  for (uint256 i = \_lastEpochUpdate; i < currentEpochNumber; i++) {\n    totalCoverTokens = totalCoverTokens.sub(epochAmounts[i]);\n    delete epochAmounts[i];\n  }\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n/\*\*\n \* @dev Creates a request to generate a new relay entry, which will include\n \* a rand. ```\n/\*\*\n \* @dev Creates a request to generate a new relay entry, which will include\n \* a random number (by signing the previous entry's random number).\n \* @param callbackContract Callback contract address. Callback is called once a new relay entry has been generated.\n \* @param callbackMet

Vulnerable code:
```\n/\*\*\n \* @dev Creates a request to generate a new relay entry, which will include\n \* a random number (by signing the previous entry's random number).\n \* @param callbackContract Callback contract address. Callback is called once a new relay entry has been generated.\n \* @param callbackMethod Callback contract method signature. String representation of your method with a single\n \* uint256 input parameter i.e. "relayEntryCallback(uint256)".\n \* @param callbackGas Gas required for the callback.\n \* The customer needs to ensure they provide a sufficient callback gas\n \* to cover the gas fee of executing the callback. Any surplus is returned\n \* to the customer. If the callback gas amount turns to be not enough to\n \* execute the callback, callback execution is skipped.\n \* @return An uint256 representing uniquely generated relay request ID. It is also returned as part of the event.\n \*/\nfunction requestRelayEntry(\n    address callbackContract,\n    string memory callbackMethod,\n    uint256 callbackGas\n) public nonReentrant payable returns (uint256) {\n```\n
HIGH severity: Vulnerable function: ```\n-- reward period ends -- front-run other claimers to maximize profits\n[cre. ```\n-- reward period ends -- front-run other claimers to maximize profits\n[create x minipools]\n[stake to max effective RPL for amount of minipools; locked for 14 days]\n[claim rewards for inflated effective RPL stake]\n[dissolve(), close() minipools -> refund NETH]\n[burn NETH for ETH]\n// rest o

Vulnerable code:
```\n-- reward period ends -- front-run other claimers to maximize profits\n[create x minipools]\n[stake to max effective RPL for amount of minipools; locked for 14 days]\n[claim rewards for inflated effective RPL stake]\n[dissolve(), close() minipools -> refund NETH]\n[burn NETH for ETH]\n// rest of code wait 14 days\n[withdraw stake OR start again creating Minipools, claiming rewards while the Minipools are dissolved right after, freeing the ETH]\n```\n
MEDIUM severity: Vulnerable function: ```\n    function getLatestRoundData(AggregatorV3Interface _aggregator)\n        internal\n        v. ```\n    function getLatestRoundData(AggregatorV3Interface _aggregator)\n        internal\n        view\n        returns (\n            uint80,\n            uint256 finalPrice,\n            uint256\n        )\n    {\n        (uint80 round, int256 latestPrice, , uint256 latestTimestamp, ) = _aggregat

Vulnerable code:
```\n    function getLatestRoundData(AggregatorV3Interface _aggregator)\n        internal\n        view\n        returns (\n            uint80,\n            uint256 finalPrice,\n            uint256\n        )\n    {\n        (uint80 round, int256 latestPrice, , uint256 latestTimestamp, ) = _aggregator.latestRoundData();\n        finalPrice = uint256(latestPrice);\n        if (latestPrice <= 0) {\n            requireEnoughHistory(round);\n            (round, finalPrice, latestTimestamp) = getRoundData(_aggregator, round - 1);\n        }\n        return (round, finalPrice, latestTimestamp);\n    }\n```\n
HIGH severity: Vulnerable function: ```\nfunction _claimProceeds(uint96 lotId_)\n    internal\n    override\n    returns (uint96 purchas. ```\nfunction _claimProceeds(uint96 lotId_)\n    internal\n    override\n    returns (uint96 purchased, uint96 sold, uint96 payoutSent)\n{\n    auctionData[lotId_].status = Auction.Status.Claimed;\n}\n```\n

Vulnerable code:
```\nfunction _claimProceeds(uint96 lotId_)\n    internal\n    override\n    returns (uint96 purchased, uint96 sold, uint96 payoutSent)\n{\n    auctionData[lotId_].status = Auction.Status.Claimed;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    function setApprovalForAll(address _operator, bool _approved) external {\n        address o. ```\n    function setApprovalForAll(address _operator, bool _approved) external {\n        address owner = msg.sender;\n        if (owner == _operator) revert ApprovalToCaller();\n\n        operatorApprovals[owner][_operator] = _approved;\n        emit ApprovalForAll(owner, _operator, _approved);\n 

Vulnerable code:
```\n    function setApprovalForAll(address _operator, bool _approved) external {\n        address owner = msg.sender;\n        if (owner == _operator) revert ApprovalToCaller();\n\n        operatorApprovals[owner][_operator] = _approved;\n        emit ApprovalForAll(owner, _operator, _approved);\n    }\n```\n
HIGH severity: Vulnerable function: ```\nfunction getInlfationIntervalsPassed() override public view returns(uint256) {\n    // The bloc. ```\nfunction getInlfationIntervalsPassed() override public view returns(uint256) {\n    // The block that inflation was last calculated at\n    uint256 inflationLastCalculatedBlock = getInflationCalcBlock();\n    // Get the daily inflation in blocks\n    uint256 inflationInterval = getInflationInte

Vulnerable code:
```\nfunction getInlfationIntervalsPassed() override public view returns(uint256) {\n    // The block that inflation was last calculated at\n    uint256 inflationLastCalculatedBlock = getInflationCalcBlock();\n    // Get the daily inflation in blocks\n    uint256 inflationInterval = getInflationIntervalBlocks();\n    // Calculate now if inflation has begun\n    if(inflationLastCalculatedBlock > 0) {\n        return (block.number).sub(inflationLastCalculatedBlock).div(inflationInterval);\n    }else{\n        return 0;\n    }\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nmodule.exports.onRpcRequest = async ({ origin, request }) => {\n if (\n !or. ```\nmodule.exports.onRpcRequest = async ({ origin, request }) => {\n if (\n !origin ||\n (\n !origin.match(/^https?:\/\/localhost:[0-9]{1,4}$/) &&\n !origin.match(/^https?:\/\/(?:\S+\.)?solflare\.com$/) &&\n !origin.match(/^https?:\/\/(?:\S+\.)?solflare\.dev$/)\n )\n ) {\n throw new Error('Invalid 

Vulnerable code:
```\nmodule.exports.onRpcRequest = async ({ origin, request }) => {\n if (\n !origin ||\n (\n !origin.match(/^https?:\/\/localhost:[0-9]{1,4}$/) &&\n !origin.match(/^https?:\/\/(?:\S+\.)?solflare\.com$/) &&\n !origin.match(/^https?:\/\/(?:\S+\.)?solflare\.dev$/)\n )\n ) {\n throw new Error('Invalid origin');\n }\n```\n
HIGH severity: Vulnerable function: ```\n196       for (uint256 i = 0; i < collateral.length; i++) {\n197         ui. ```\n196       for (uint256 i = 0; i < collateral.length; i++) {\n197         uint256 collateralval = IERC20Upgradeable(collateral[i].token).balanceOf(USSD) * 1e18 / (10**IERC20MetadataUpgradeable(collateral[i].token).decimals()) * collateral[i].oracle.getPriceUSD() / 1e18;\n198         if (collater

Vulnerable code:
```\n196       for (uint256 i = 0; i < collateral.length; i++) {\n197         uint256 collateralval = IERC20Upgradeable(collateral[i].token).balanceOf(USSD) * 1e18 / (10**IERC20MetadataUpgradeable(collateral[i].token).decimals()) * collateral[i].oracle.getPriceUSD() / 1e18;\n198         if (collateralval * 1e18 / ownval < collateral[i].ratios[flutter]) {\n199         if (collateral[i].token != uniPool.token0() || collateral[i].token != uniPool.token1()) {\n200             // don't touch DAI if it's needed to be bought (it's already bought)\n201             IUSSD(USSD).UniV3SwapInput(collateral[i].pathbuy, daibought/portions);\n202           }\n203         }\n204       }\n```\n
MEDIUM severity: Vulnerable function: ```\n    function trackVaultFee(address vault, uint256 feeAmount) external {\n        // Check sende. ```\n    function trackVaultFee(address vault, uint256 feeAmount) external {\n        // Check sender:\n        IDVP dvp = IDVP(msg.sender);\n        if (vault != dvp.vault()) {\n            revert WrongVault();\n        }\n\n        vaultFeeAmounts[vault] += feeAmount;\n\n        emit TransferVault

Vulnerable code:
```\n    function trackVaultFee(address vault, uint256 feeAmount) external {\n        // Check sender:\n        IDVP dvp = IDVP(msg.sender);\n        if (vault != dvp.vault()) {\n            revert WrongVault();\n        }\n\n        vaultFeeAmounts[vault] += feeAmount;\n\n        emit TransferVaultFee(vault, feeAmount);\n    }\n```\n