Farseen0/scar-pairs huggingface dataset:
HIGH severity: Vulnerable function: ```\n/\*\n// Indicates any auction has never held for a specified BondID\nfunction isNotStartedAucti. ```\n/\*\n// Indicates any auction has never held for a specified BondID\nfunction isNotStartedAuction(bytes32 auctionID) public virtual override returns (bool) {\n uint256 closingTime = \_auctionClosingTime[auctionID];\n return closingTime == 0;\n}\n\n// Indicates if the auctionID is in bid accepta

Vulnerable code:
```\n/\*\n// Indicates any auction has never held for a specified BondID\nfunction isNotStartedAuction(bytes32 auctionID) public virtual override returns (bool) {\n uint256 closingTime = \_auctionClosingTime[auctionID];\n return closingTime == 0;\n}\n\n// Indicates if the auctionID is in bid acceptance status\nfunction inAcceptingBidsPeriod(bytes32 auctionID) public virtual override returns (bool) {\n uint256 closingTime = \_auctionClosingTime[auctionID];\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: wfCashBase.sol\n    function _getMaturedCashValue(uint256 fCashAmount) internal view retu. ```\nFile: wfCashBase.sol\n    function _getMaturedCashValue(uint256 fCashAmount) internal view returns (uint256) { \n        if (!hasMatured()) return 0; \n        // If the fCash has matured we use the cash balance instead.\n        (uint16 currencyId, uint40 maturity) = getDecodedID(); \n        

Vulnerable code:
```\nFile: wfCashBase.sol\n    function _getMaturedCashValue(uint256 fCashAmount) internal view returns (uint256) { \n        if (!hasMatured()) return 0; \n        // If the fCash has matured we use the cash balance instead.\n        (uint16 currencyId, uint40 maturity) = getDecodedID(); \n        PrimeRate memory pr = NotionalV2.getSettlementRate(currencyId, maturity); \n\n        // fCash has not yet been settled\n        if (pr.supplyFactor == 0) return 0; \n..SNIP..\n```\n
HIGH severity: Vulnerable function: ```\n    {\n        IBank.Position memory pos = bank.getCurrentPositionInfo();\n. ```\n    {\n        IBank.Position memory pos = bank.getCurrentPositionInfo();\n        address posCollToken = pos.collToken;\n        uint256 collSize = pos.collateralSize;\n        address burnToken = address(ISoftVault(strategy.vault).uToken());\n        if (collSize > 0) {\n            if (posCo

Vulnerable code:
```\n    {\n        IBank.Position memory pos = bank.getCurrentPositionInfo();\n        address posCollToken = pos.collToken;\n        uint256 collSize = pos.collateralSize;\n        address burnToken = address(ISoftVault(strategy.vault).uToken());\n        if (collSize > 0) {\n            if (posCollToken != address(wrapper))\n                revert Errors.INCORRECT_COLTOKEN(posCollToken);\n            bank.takeCollateral(collSize);\n            wrapper.burn(burnToken, collSize);\n            _doRefund(burnToken);\n        }\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nuint256 loansInPool = loans_.loans.length - 1 + auctions_.noOfAuctions;\nui. ```\nuint256 loansInPool = loans_.loans.length - 1 + auctions_.noOfAuctions;\nuint256 curMomp     = _priceAt(Deposits.findIndexOfSum(deposits_, Maths.wdiv(borrowerAccruedDebt_, loansInPool * 1e18)));\n```\n

Vulnerable code:
```\nuint256 loansInPool = loans_.loans.length - 1 + auctions_.noOfAuctions;\nuint256 curMomp     = _priceAt(Deposits.findIndexOfSum(deposits_, Maths.wdiv(borrowerAccruedDebt_, loansInPool * 1e18)));\n```\n
HIGH severity: Vulnerable function: ```\n    uint256 wstethOhmPrice = manager.getTknOhmPrice();\n    uint256 expecte. ```\n    uint256 wstethOhmPrice = manager.getTknOhmPrice();\n    uint256 expectedWstethAmountOut = (ohmAmountOut * wstethOhmPrice) / _OHM_DECIMALS;\n\n    // Take any arbs relative to the oracle price for the Treasury and return the rest to the owner\n    uint256 wstethToReturn = wstethAmountOut > e

Vulnerable code:
```\n    uint256 wstethOhmPrice = manager.getTknOhmPrice();\n    uint256 expectedWstethAmountOut = (ohmAmountOut * wstethOhmPrice) / _OHM_DECIMALS;\n\n    // Take any arbs relative to the oracle price for the Treasury and return the rest to the owner\n    uint256 wstethToReturn = wstethAmountOut > expectedWstethAmountOut\n        ? expectedWstethAmountOut\n        : wstethAmountOut;\n    if (wstethAmountOut > wstethToReturn)\n        wsteth.safeTransfer(TRSRY(), wstethAmountOut - wstethToReturn);\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction setTokenDrop(address \_token, address \_tokenDrop)\n    external\n    returns (bool)\n. ```\nfunction setTokenDrop(address \_token, address \_tokenDrop)\n    external\n    returns (bool)\n{\n    require(\n        msg.sender == factory || msg.sender == owner(),\n        "Pod:unauthorized-set-token-drop"\n    );\n\n    // Check if target<>tokenDrop mapping exists\n    require(\n        d

Vulnerable code:
```\nfunction setTokenDrop(address \_token, address \_tokenDrop)\n    external\n    returns (bool)\n{\n    require(\n        msg.sender == factory || msg.sender == owner(),\n        "Pod:unauthorized-set-token-drop"\n    );\n\n    // Check if target<>tokenDrop mapping exists\n    require(\n        drops[\_token] == TokenDrop(0),\n        "Pod:target-tokendrop-mapping-exists"\n    );\n\n    // Set TokenDrop Referance\n    drop = TokenDrop(\_tokenDrop);\n\n    // Set target<>tokenDrop mapping\n    drops[\_token] = drop;\n\n    return true;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n  function stakeWithPermit(\n      uint256 amount,\n      uint256 nonce,\n      uint256 expiry,. ```\n  function stakeWithPermit(\n      uint256 amount,\n      uint256 nonce,\n      uint256 expiry,\n      uint8 v,\n      bytes32 r,\n      bytes32 s\n  ) external whenNotPaused {\n      IDai erc20Token = IDai(stakingToken);\n      erc20Token.permit(msg.sender, address(this), nonce, expiry, true, 

Vulnerable code:
```\n  function stakeWithPermit(\n      uint256 amount,\n      uint256 nonce,\n      uint256 expiry,\n      uint8 v,\n      bytes32 r,\n      bytes32 s\n  ) external whenNotPaused {\n      IDai erc20Token = IDai(stakingToken);\n      erc20Token.permit(msg.sender, address(this), nonce, expiry, true, v, r, s);\n\n      stake(uint96(amount));\n  }\n```\n
HIGH severity: Vulnerable function: ```\nskaleBalances.lockBounty(shares[i].holder, timeHelpers.addMonths(delegation. ```\nskaleBalances.lockBounty(shares[i].holder, timeHelpers.addMonths(delegationStarted, 3));\n```\n

Vulnerable code:
```\nskaleBalances.lockBounty(shares[i].holder, timeHelpers.addMonths(delegationStarted, 3));\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: LimitOrderRegistry.sol\n    function claimOrder(uint128 batchId, address user) external p. ```\nFile: LimitOrderRegistry.sol\n    function claimOrder(uint128 batchId, address user) external payable returns (ERC20, uint256) {\n..SNIP..\n        // Transfer fee in.\n        address sender = _msgSender();\n        if (msg.value >= userClaim.feePerUser) {\n            // refund if necessary.\

Vulnerable code:
```\nFile: LimitOrderRegistry.sol\n    function claimOrder(uint128 batchId, address user) external payable returns (ERC20, uint256) {\n..SNIP..\n        // Transfer fee in.\n        address sender = _msgSender();\n        if (msg.value >= userClaim.feePerUser) {\n            // refund if necessary.\n            uint256 refund = msg.value - userClaim.feePerUser;\n            if (refund > 0) sender.safeTransferETH(refund);\n        } else {\n            WRAPPED_NATIVE.safeTransferFrom(sender, address(this), userClaim.feePerUser);\n            // If value is non zero send it back to caller.\n            if (msg.value > 0) sender.safeTransferETH(msg.value);\n        }\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: BalancerEnvironment.py\n            "postMaturitySettlementSlippageLi. ```\nFile: BalancerEnvironment.py\n            "postMaturitySettlementSlippageLimitPercent": 10e6, # 10%\n            "emergencySettlementSlippageLimitPercent": 10e6, # 10%\n```\n

Vulnerable code:
```\nFile: BalancerEnvironment.py\n            "postMaturitySettlementSlippageLimitPercent": 10e6, # 10%\n            "emergencySettlementSlippageLimitPercent": 10e6, # 10%\n```\n
HIGH severity: Vulnerable function: ```\nFile: LimitOrderRegistry.sol\n    function setFastGasFeed(address feed) external onlyOwner {\n . ```\nFile: LimitOrderRegistry.sol\n    function setFastGasFeed(address feed) external onlyOwner {\n        fastGasFeed = feed;\n    }\n```\n

Vulnerable code:
```\nFile: LimitOrderRegistry.sol\n    function setFastGasFeed(address feed) external onlyOwner {\n        fastGasFeed = feed;\n    }\n```\n
HIGH severity: Vulnerable function: ```\n    function verifyPrices(PriceSig memory priceSig, address partyA) internal view {\n        Mu. ```\n    function verifyPrices(PriceSig memory priceSig, address partyA) internal view {\n        MuonStorage.Layout storage muonLayout = MuonStorage.layout();\n        require(priceSig.prices.length == priceSig.symbolIds.length, "LibMuon: Invalid length");\n        bytes32 hash = keccak256(\n      

Vulnerable code:
```\n    function verifyPrices(PriceSig memory priceSig, address partyA) internal view {\n        MuonStorage.Layout storage muonLayout = MuonStorage.layout();\n        require(priceSig.prices.length == priceSig.symbolIds.length, "LibMuon: Invalid length");\n        bytes32 hash = keccak256(\n            abi.encodePacked(\n                muonLayout.muonAppId,\n                priceSig.reqId,\n                address(this),\n              partyA,\n              priceSig.upnl,\n              priceSig.totalUnrealizedLoss,\n              priceSig.symbolIds,\n              priceSig.prices,\n                priceSig.timestamp,\n                getChainId()\n            )\n        );\n        verifyTSSAndGateway(hash, priceSig.sigs, priceSig.gatewaySignature);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n  function repay(uint256 repayAmount, uint256 _userLoanId) external {\n      Loan memory userLo. ```\n  function repay(uint256 repayAmount, uint256 _userLoanId) external {\n      Loan memory userLoan = loans[msg.sender][_userLoanId];\n      if(userLoan.borrowedAmount < repayAmount) revert ExcessiveRepay();\n      if(block.timestamp > userLoan.endDate) revert LoanExpired();\n      uint256 intere

Vulnerable code:
```\n  function repay(uint256 repayAmount, uint256 _userLoanId) external {\n      Loan memory userLoan = loans[msg.sender][_userLoanId];\n      if(userLoan.borrowedAmount < repayAmount) revert ExcessiveRepay();\n      if(block.timestamp > userLoan.endDate) revert LoanExpired();\n      uint256 interestLoanRatio = FixedPointMathLib.divWad(userLoan.interest, userLoan.borrowedAmount);\nL425  uint256 interest = FixedPointMathLib.mulWadUp(repayAmount, interestLoanRatio); //@audit rounding issue\n      outstandingDebt -= repayAmount - interest > outstandingDebt ? outstandingDebt : repayAmount - interest;\n      // rest of code\n  }\n// rest of code\n  function liquidate(address user, uint256 _userLoanId) external {\n      Loan memory userLoan = loans[msg.sender][_userLoanId];\n      if(block.timestamp < userLoan.endDate || userLoan.liquidated || userLoan.borrowedAmount == 0) revert Unliquidatable();\n      loans[user][_userLoanId].liquidated = true;\n      loans[user][_userLoanId].borrowedAmount = 0;\nL448  outstandingDebt -= userLoan.borrowedAmount - userLoan.interest;\n      // rest of code\n  }\n```\n
HIGH severity: Vulnerable function: ```\n IUniswapV3Pool(underlyingTrustedPools[500].poolAddress)\n```\n. ```\n IUniswapV3Pool(underlyingTrustedPools[500].poolAddress)\n```\n

Vulnerable code:
```\n IUniswapV3Pool(underlyingTrustedPools[500].poolAddress)\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction userWithdraw(address to, address user, address token, uint256 dTokenAmount) external n. ```\nfunction userWithdraw(address to, address user, address token, uint256 dTokenAmount) external nonReentrant allowedToken(token) returns(uint256 amount) {\n        accrueInterest(token);\n        AssetInfo storage info = assetInfo[token];\n        require(dTokenAmount <= IDToken(info.dToken).bala

Vulnerable code:
```\nfunction userWithdraw(address to, address user, address token, uint256 dTokenAmount) external nonReentrant allowedToken(token) returns(uint256 amount) {\n        accrueInterest(token);\n        AssetInfo storage info = assetInfo[token];\n        require(dTokenAmount <= IDToken(info.dToken).balanceOf(msg.sender), Errors.DTOKEN_BALANCE_NOT_ENOUGH);\n\n        amount = dTokenAmount.mul(_getExchangeRate(token));//@audit does not check amount value\n        IDToken(info.dToken).burn(msg.sender, dTokenAmount);\n        IERC20(token).safeTransfer(to, amount);\n        info.balance = info.balance - amount;\n\n        // used for calculate user withdraw amount\n        // this function could be called from d3Proxy, so we need "user" param\n        // In the meantime, some users may hope to use this function directly,\n        // to prevent these users fill "user" param with wrong addresses,\n        // we use "msg.sender" param to check.\n        emit UserWithdraw(msg.sender, user, token, amount);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfallback () external [payable];\nfallback (bytes calldata _input) external . ```\nfallback () external [payable];\nfallback (bytes calldata _input) external [payable] returns (bytes memory _output);\n```\n

Vulnerable code:
```\nfallback () external [payable];\nfallback (bytes calldata _input) external [payable] returns (bytes memory _output);\n```\n
MEDIUM severity: Vulnerable function: ```\n_manage(context, depositAssets, claimAmount, !depositAssets.isZero() || !re. ```\n_manage(context, depositAssets, claimAmount, !depositAssets.isZero() || !redeemShares.isZero());\n```\n

Vulnerable code:
```\n_manage(context, depositAssets, claimAmount, !depositAssets.isZero() || !redeemShares.isZero());\n```\n
MEDIUM severity: Vulnerable function: ```\n    function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\n        u. ```\n    function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\n    }\n```\n

Vulnerable code:
```\n    function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\n    }\n```\n
HIGH severity: Vulnerable function: ```\n/* snip */\n// now check rate limits\nbool isAmountRateLimited = _isOutboun. ```\n/* snip */\n// now check rate limits\nbool isAmountRateLimited = _isOutboundAmountRateLimited(internalAmount);\nif (!shouldQueue && isAmountRateLimited) {\n    revert NotEnoughCapacity(getCurrentOutboundCapacity(), amount);\n}\nif (shouldQueue && isAmountRateLimited) {\n    // emit an event to 

Vulnerable code:
```\n/* snip */\n// now check rate limits\nbool isAmountRateLimited = _isOutboundAmountRateLimited(internalAmount);\nif (!shouldQueue && isAmountRateLimited) {\n    revert NotEnoughCapacity(getCurrentOutboundCapacity(), amount);\n}\nif (shouldQueue && isAmountRateLimited) {\n    // emit an event to notify the user that the transfer is rate limited\n    emit OutboundTransferRateLimited(\n        msg.sender, sequence, amount, getCurrentOutboundCapacity()\n    );\n\n    // queue up and return\n    _enqueueOutboundTransfer(\n        sequence,\n        trimmedAmount,\n        recipientChain,\n        recipient,\n        msg.sender,\n        transceiverInstructions\n    );\n\n    // refund price quote back to sender\n    _refundToSender(msg.value);\n\n    // return the sequence in the queue\n    return sequence;\n}\n/* snip */\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: contracts\OperatorTokenomics\SponsorshipPolicies\VoteKickPolicy.sol\n    function onFlag(. ```\nFile: contracts\OperatorTokenomics\SponsorshipPolicies\VoteKickPolicy.sol\n    function onFlag(address target, address flagger) external {\n        require(flagger != target, "error_cannotFlagSelf");\n        require(voteStartTimestamp[target] == 0 && block.timestamp > protectionEndTimestamp[ta

Vulnerable code:
```\nFile: contracts\OperatorTokenomics\SponsorshipPolicies\VoteKickPolicy.sol\n    function onFlag(address target, address flagger) external {\n        require(flagger != target, "error_cannotFlagSelf");\n        require(voteStartTimestamp[target] == 0 && block.timestamp > protectionEndTimestamp[target], "error_cannotFlagAgain"); // solhint-disable-line not-rely-on-time\n        require(stakedWei[flagger] >= minimumStakeOf(flagger), "error_notEnoughStake");\n        require(stakedWei[target] > 0, "error_flagTargetNotStaked"); //@audit possible front run\n```\n
HIGH severity: Vulnerable function: ```\n    function create(\n        FixedStrikeOptionToken optionToken_,\n        uint256 amount_\n  . ```\n    function create(\n        FixedStrikeOptionToken optionToken_,\n        uint256 amount_\n    ) external override nonReentrant {\n        // rest of code\n        if (call) {\n            // rest of code\n        } else {\n            uint256 quoteAmount = amount_.mulDiv(strikePrice, 10 ** p

Vulnerable code:
```\n    function create(\n        FixedStrikeOptionToken optionToken_,\n        uint256 amount_\n    ) external override nonReentrant {\n        // rest of code\n        if (call) {\n            // rest of code\n        } else {\n            uint256 quoteAmount = amount_.mulDiv(strikePrice, 10 ** payoutToken.decimals());\n            // rest of code\n            quoteToken.safeTransferFrom(msg.sender, address(this), quoteAmount);\n            // rest of code\n        }\n\n        optionToken.mint(msg.sender, amount_);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n    function changeTreasury(uint256 _marketId, address _treasury)\n        public\n        only. ```\n    function changeTreasury(uint256 _marketId, address _treasury)\n        public\n        onlyTimeLocker\n    {\n        if (_treasury == address(0)) revert AddressZero();\n\n        address[2] memory vaults = marketIdToVaults[_marketId];\n\n        if (vaults[0] == address(0) || vaults[1] == 

Vulnerable code:
```\n    function changeTreasury(uint256 _marketId, address _treasury)\n        public\n        onlyTimeLocker\n    {\n        if (_treasury == address(0)) revert AddressZero();\n\n        address[2] memory vaults = marketIdToVaults[_marketId];\n\n        if (vaults[0] == address(0) || vaults[1] == address(0)) {\n            revert MarketDoesNotExist(_marketId);\n        }\n        IVaultV2(vaults[0]).whiteListAddress(_treasury);\n        IVaultV2(vaults[1]).whiteListAddress(_treasury);\n        IVaultV2(vaults[0]).setTreasury(treasury);\n        IVaultV2(vaults[1]).setTreasury(treasury);\n\n        emit AddressWhitelisted(_treasury, _marketId);\n    }\n```\n
HIGH severity: Vulnerable function: ```\nAttackerContract.flashLoan() ->\n    // Borrow lots of tokens and trigger a. ```\nAttackerContract.flashLoan() ->\n    // Borrow lots of tokens and trigger a callback.\n    SomeProtocol.flashLoan() ->\n        AttackerContract.exploit()\n\nAttackerContract.exploit() ->\n    // Join a Balancer Pool using the borrowed tokens and send some ETH along with the call.\n    Balancer

Vulnerable code:
```\nAttackerContract.flashLoan() ->\n    // Borrow lots of tokens and trigger a callback.\n    SomeProtocol.flashLoan() ->\n        AttackerContract.exploit()\n\nAttackerContract.exploit() ->\n    // Join a Balancer Pool using the borrowed tokens and send some ETH along with the call.\n    BalancerVault.joinPool() ->\n        // The Vault will return the excess ETH to the sender, which will reenter this contract.\n        // At this point in the execution, the BPT supply has been updated but the token balances have not.\n        AttackerContract.receive()\n\nAttackerContract.receive() ->\n    // Liquidate a position using the same Balancer Pool as collateral.\n    BlueBerryBank.liquidate() ->\n        // Call to the oracle to check the price.\n        BalancerPairOracle.getPrice() ->\n            // Query the token balances. At this point in the execution, these have not been updated (see above).\n            // So, the balances are still the same as before the start of the large pool join.\n            BalancerVaul.getPoolTokens()\n\n            // Query the BPT supply. At this point in the execution, the supply has already been updated (see above).\n            // So, it includes the latest large pool join, and as such the BPT supply has grown by a large amount.\n            BalancerPool.getTotalSupply()\n\n            // Now the price is computed using both balances and supply, and the result is much smaller than it should be.\n            price = f(balances) / pool.totalSupply()\n\n        // The position is liquidated under false pretenses.\n```\n
MEDIUM severity: Vulnerable function: ```\n    function getPoolPrice() public view returns (uint256 price, uint256 \n         inversed){\n. ```\n    function getPoolPrice() public view returns (uint256 price, uint256 \n         inversed){\n            (uint160 sqrtPriceX96, , , , , , ) = pool.slot0();\n        uint256 p = uint256(sqrtPriceX96) * uint256(sqrtPriceX96) * (10 \n        ** token0.decimals());\n     // token0/token1 in 1e18 

Vulnerable code:
```\n    function getPoolPrice() public view returns (uint256 price, uint256 \n         inversed){\n            (uint160 sqrtPriceX96, , , , , , ) = pool.slot0();\n        uint256 p = uint256(sqrtPriceX96) * uint256(sqrtPriceX96) * (10 \n        ** token0.decimals());\n     // token0/token1 in 1e18 format\n          price = p / (2 ** 192);\n              inversed = 1e36 / price;\n         }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction closeMakeFor(\n        address account,\n        UFixed18 amount\n    )\n        publi. ```\nfunction closeMakeFor(\n        address account,\n        UFixed18 amount\n    )\n        public\n        nonReentrant\n        notPaused\n        onlyAccountOrMultiInvoker(account)\n        settleForAccount(account)\n        takerInvariant\n        closeInvariant(account)\n        liquidationI

Vulnerable code:
```\nfunction closeMakeFor(\n        address account,\n        UFixed18 amount\n    )\n        public\n        nonReentrant\n        notPaused\n        onlyAccountOrMultiInvoker(account)\n        settleForAccount(account)\n        takerInvariant\n        closeInvariant(account)\n        liquidationInvariant(account)\n    {\n        _closeMake(account, amount);\n    }\n```\n
HIGH severity: Vulnerable function: ```\nfunction linkNodeAddress(address validatorAddress, address nodeAddress) external allow("Delegat. ```\nfunction linkNodeAddress(address validatorAddress, address nodeAddress) external allow("DelegationService") {\n    uint validatorId = getValidatorId(validatorAddress);\n    require(\_validatorAddressToId[nodeAddress] == 0, "Validator cannot override node address");\n    \_validatorAddressToId[n

Vulnerable code:
```\nfunction linkNodeAddress(address validatorAddress, address nodeAddress) external allow("DelegationService") {\n    uint validatorId = getValidatorId(validatorAddress);\n    require(\_validatorAddressToId[nodeAddress] == 0, "Validator cannot override node address");\n    \_validatorAddressToId[nodeAddress] = validatorId;\n}\n\nfunction unlinkNodeAddress(address validatorAddress, address nodeAddress) external allow("DelegationService") {\n    uint validatorId = getValidatorId(validatorAddress);\n    require(\_validatorAddressToId[nodeAddress] == validatorId, "Validator hasn't permissions to unlink node");\n    \_validatorAddressToId[nodeAddress] = 0;\n}\n```\n