Farseen0/scar-pairs huggingface dataset:
MEDIUM severity: The vulnerability arises from the direct influence of the "_I_" value on the price, which can be exp. The vulnerability arises from the direct influence of the "_I_" value on the price, which can be exploited by a MEV bot. The bot can manipulate the price by trading just before the "adjustPrice" function is called and exiting immediately after the price change. This creates a "sandwich" opportunity,...

Vulnerable code:
```\nfunction test_Adjusting_I_CanBeFrontrunned() external {\n    vm.startPrank(tapir);\n\n    // Buy shares with tapir, 10 - 10\n    dai.safeTransfer(address(gsp), 10 * 1e18);\n    usdc.transfer(address(gsp), 10 * 1e6);\n    gsp.buyShares(tapir);\n\n    // Print some stuff\n    console.log("Base target initial", gsp._BASE_TARGET_());\n    console.log("Quote target initial", gsp._QUOTE_TARGET_());\n    console.log("Base reserve initial", gsp._BASE_RESERVE_());\n    console.log("Quote reserve initial", gsp._QUOTE_RESERVE_());\n\n    // We know the price will decrease, so let's sell the base token before that\n    uint256 initialBaseTokensSwapped = 5 * 1e18;\n\n    // Sell the base tokens before adjustPrice\n    dai.safeTransfer(address(gsp), initialBaseTokensSwapped);\n    uint256 receivedQuoteTokens = gsp.sellBase(tapir);\n    vm.stopPrank();\n\n    // This is the tx will be sandwiched by the MEV trader\n    vm.prank(MAINTAINER);\n    gsp.adjustPrice(999000);\n\n    // Quickly resell whatever gained by the price update\n    vm.startPrank(tapir);\n    usdc.safeTransfer(address(gsp), receivedQuoteTokens);\n    uint256 receivedBaseTokens = gsp.sellQuote(tapir);\n    console.log("Base target", gsp._BASE_TARGET_());\n    console.log("Quote target", gsp._QUOTE_TARGET_());\n    console.log("Base reserve", gsp._BASE_RESERVE_());\n    console.log("Quote reserve", gsp._QUOTE_RESERVE_());\n    console.log("Received base tokens", receivedBaseTokens);\n\n    // Whatever we get is more than we started, in this example\n    // MEV trader started 5 DAI and we have more than 5 DAI!!\n    assertGe(receivedBaseTokens, initialBaseTokensSwapped);\n}\n```
MEDIUM severity: The `swap()` function in the `buildUniswapSwapAdapterData` function is vulnerable to a logic error w. The `swap()` function in the `buildUniswapSwapAdapterData` function is vulnerable to a logic error when processing the `path` parameter. Specifically, if the `path` contains more tokens than expected, the `swap()` function will be reverted, and the keepers will not be able to successfully call the `...

Vulnerable code:
```\nconst basicSwapParams = buildUniswapSwapAdapterData(\n  ["0xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy", "0xzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"],\n  [3000],\n  testDepositAmount,\n  expectedReturnAmount,\n  0,\n).swapData;\n```\n```\n000000000000000000000000000000000000000000000000000000024f49cbca\n0000000000000000000000000000000000000000000000056bc75e2d63100000\n0000000000000000000000000000000000000000000000055de6a779bbac0000\n0000000000000000000000000000000000000000000000000000000000000080\n000000000000000000000000000000000000000000000000000000000000002b\nyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy000bb8zzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzz000000000000000000000000000000000000000000\n```\n```\nconst basicSwapParams = buildUniswapSwapAdapterData(\n  [\n    "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",\n    "0xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",\n    "0xzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"\n  ],\n  [3000, 3000],\n  testDepositAmount,\n  expectedReturnAmount,\n  0\n).swapData;\n```\n```\n000000000000000000000000000000000000000000000000000000024f49cbca\n0000000000000000000000000000000000000000000000056bc75e2d63100000\n0000000000000000000000000000000000000000000000055de6a779bbac0000\n0000000000000000000000000000000000000000000000000000000000000080\n0000000000000000000000000000000000000000000000000000000000000042\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n000bb8yyyyyyyyyyyyyyyyyyyy\nyyyyyyyyyyyyyyyyyyyyyy\n000bb8zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzz\n000000000000000000000000000000000000000000000000000000000000\n```
MEDIUM severity: The vulnerability lies in the lack of a public input range check in the `Verify` function, specifica. The vulnerability lies in the lack of a public input range check in the `Verify` function, specifically in the `sum_pi_wo_api_commit` function. This function is responsible for computing the `Pi` value in the Plonk gate, which is performed within the SNARK scalar field. The public input, an array of...

Vulnerable code:
```\nfunction Verify(bytes memory proof, uint256[] memory publicInputs)\n```\n```\nsum_pi_wo_api_commit(add(public_inputs, 0x20), mload(public_inputs), zeta)\npi := mload(mload(0x40))\n\nfunction sum_pi_wo_api_commit(ins, n, z) {\n    let li := mload(0x40)\n    batch_compute_lagranges_at_z(z, n, li)\n    let res := 0\n    let tmp := 0\n    for (let i := 0; i < n; i := add(i, 1)) {\n        tmp := mulmod(mload(li), mload(ins), r_mod)\n        res := addmod(res, tmp, r_mod)\n        li := add(li, 0x20)\n        ins := add(ins, 0x20)\n    }\n    mstore(mload(0x40), res)\n}\n```
MEDIUM severity: The `getPriceInEth` function in the `TellorOracle.sol` contract retrieves the current price of a spe. The `getPriceInEth` function in the `TellorOracle.sol` contract retrieves the current price of a specified token from the Tellor oracle. However, the function does not verify the price returned by the oracle, which can lead to potential issues. Specifically, the function does not check if the price...

Vulnerable code:
```\nfunction getTellorCurrentValue(bytes32 _queryId)\n    {\n    // retrieve most recent 20+ minute old value for a queryId. the time buffer allows time for a bad value to be disputed\n    (, bytes memory data, uint256 timestamp) = tellor.getDataBefore(_queryId, block.timestamp - 20 minutes);\n    uint256 _value = abi.decode(data, (uint256));\n    if (timestamp == 0 || _value == 0) \n    {\n        return (false, _value, timestamp);\n    }\n}\n```\n```\nFile: TellorOracle.sol\n\nfunction getPriceInEth(address tokenToPrice) external returns (uint256) {\n    TellorInfo memory tellorInfo = _getQueryInfo(tokenToPrice);\n    uint256 timestamp = block.timestamp;\n\n    (bytes memory value, uint256 timestampRetrieved) = getDataBefore(tellorInfo.queryId, timestamp - 30 minutes);\n\n    uint256 tellorStoredTimeout = uint256(tellorInfo.pricingTimeout);\n    uint256 tokenPricingTimeout = tellorStoredTimeout == 0? DEFAULT_PRICING_TIMEOUT : tellorStoredTimeout;\n\n    if (timestampRetrieved == 0 || timestamp - timestampRetrieved > tokenPricingTimeout) {\n        revert InvalidDataReturned();\n    }\n\n    uint256 price = abi.decode(value, (uint256));\n    return _denominationPricing(tellorInfo.denomination, price, tokenToPrice);\n}\n```
MEDIUM severity: The freezing mechanism in ERC721NFTProduct and ERC1155NFTProduct, which is intended to lock roles to. The freezing mechanism in ERC721NFTProduct and ERC1155NFTProduct, which is intended to lock roles to current addresses and prevent any changes, is rendered ineffective due to a critical vulnerability. Specifically, the `hasRole` function in the `GranularRoles` contract allows the "ADMIN_ROLE" to byp...

Vulnerable code:
```\nfunction hasRole(bytes32 role, address account)\n    public\n    view\n    virtual\n    override\n    returns (bool)\n{\n    return super.hasRole(ADMIN_ROLE, account) ||\n           super.hasRole(role, account);\n}\n```
MEDIUM severity: A sandwich attack is a type of malicious exploit that can be launched against the `accruePremiumAndE. A sandwich attack is a type of malicious exploit that can be launched against the `accruePremiumAndExpireProtections()` function in a smart contract. This attack involves a malicious user, Bob, who manipulates the contract's underlying token pool to profit from the system.\n\nThe attack begins when...

Vulnerable code:
```\nfunction deposit(uint256 _underlyingAmount, address _receiver)\n    external\n    override\n    whenNotPaused\n    nonReentrant\n{\n    _deposit(_underlyingAmount, _receiver);\n}\n\nfunction _deposit(uint256 _underlyingAmount, address _receiver) internal {\n    if (poolInfo.currentPhase == ProtectionPoolPhase.OpenToBuyers) {\n        revert ProtectionPoolInOpenToBuyersPhase();\n    }\n\n    uint256 _sTokenShares = convertToSToken(_underlyingAmount);\n    totalSTokenUnderlying += _underlyingAmount;\n    _safeMint(_receiver, _sTokenShares);\n    poolInfo.underlyingToken.safeTransferFrom(\n        msg.sender,\n        address(this),\n        _underlyingAmount\n    );\n\n    if (_hasMinRequiredCapital()) {\n        uint256 _leverageRatio = calculateLeverageRatio();\n\n        if (_leverageRatio > poolInfo.params.leverageRatioCeiling) {\n            revert ProtectionPoolLeverageRatioTooHigh(_leverageRatio);\n        }\n    }\n\n    emit ProtectionSold(_receiver, _underlyingAmount);\n}\n```
MEDIUM severity: The `PriorityPool` contract is designed to manage the withdrawal process for users, utilizing a depo. The `PriorityPool` contract is designed to manage the withdrawal process for users, utilizing a deposit queue to minimize interactions with the staking pool. When a user initiates a withdrawal, they call the `withdraw()` function, providing the desired amount of LSD tokens as a parameter. The functi...

Vulnerable code:
```\nfunction withdraw(uint256 _amount) external {\n    if (_amount == 0) {\n        revert InvalidAmount();\n    }\n    IERC20Upgradeable(address(stakingPool)).safeTransferFrom(msg.sender, address(this), _amount);\n    _withdraw(msg.sender, _amount);\n}\n```\n```\nfunction _withdraw(address _account, uint256 _amount) internal {\n    if (poolStatus == PoolStatus.CLOSED) {\n        revert WithdrawalsDisabled();\n    }\n\n    uint256 toWithdrawFromQueue = _amount <= totalQueued? _amount : totalQueued;\n    uint256 toWithdrawFromPool = _amount - toWithdrawFromQueue;\n\n    if (toWithdrawFromQueue!= 0) {\n        totalQueued -= toWithdrawFromQueue;\n        depositsSinceLastUpdate += toWithdrawFromQueue;\n    }\n\n    if (toWithdrawFromPool!= 0) {\n        stakingPool.withdraw(address(this), address(this), toWithdrawFromPool);\n    }\n\n    // @audit-warning at this point, toWithdrawFromQueue of LSD tokens remain in this contract!\n\n    token.safeTransfer(_account, _amount);\n    emit Withdraw(_account, toWithdrawFromPool, toWithdrawFromQueue);\n}\n```
MEDIUM severity: The LiquidityMining contract, which is also an ERC1155Receiver, fails to correctly implement the req. The LiquidityMining contract, which is also an ERC1155Receiver, fails to correctly implement the required functions for receiving ERC1155 tokens. Specifically, the `onERC1155Received` function returns an incorrect value, which is likely a result of a copy-paste error. According to the EIP-1155 stand...

Vulnerable code:
```\ncontract LiquidityMining is ILiquidityMining, ERC1155Receiver, Ownable {\n    //...\n```\n```\nfunction onERC1155Received(\n    address operator,\n    address from,\n    address to,\n    uint256 id,\n    uint256 value,\n    bytes calldata data\n) public {\n    // Check if the operator is the contract owner\n    require(msg.sender == owner, "Only the contract owner can call this function");\n\n    // Check if the from address is the contract owner\n    require(from == owner, "Only the contract owner can transfer tokens");\n\n    // Check if the to address is the contract owner\n    require(to == owner, "Only the contract owner can receive tokens");\n\n    // Check if the id is valid\n    require(id > 0, "Invalid token ID");\n\n    // Check if the value is valid\n    require(value > 0, "Invalid token value");\n\n    // Check if the data is valid\n    require(data.length > 0, "Invalid data");\n\n    // Transfer the tokens\n    // TO DO: implement the logic to transfer the tokens\n    // For example, you can use the transfer function of the ERC1155 contract\n    // transfer(to, id, value, data);\n}\n```\n```\nfunction onERC1155BatchReceived(\n    bytes32 _operator,\n    address _from,\n    address _to,\n    uint256 _id,\n    uint256 _value,\n    bytes _data\n) public {\n    // Check if the operator is the same as the contract owner\n    require(msg.sender == owner, "Only the contract owner can call this function");\n\n    // Check if the from and to addresses are valid\n    require(_from!= address(0) && _to!= address(0), "Invalid from or to address");\n\n    // Check if the id and value are valid\n    require(_id > 0 && _value > 0, "Invalid id or value");\n\n    // Check if the data is not empty\n    require(_data.length > 0, "Data is empty");\n\n    // Call the onERC1155BatchReceived function of the parent contract\n    super.onERC1155BatchReceived(_operator, _from, _to, _id, _value, _data);\n}\n```\n```\nfunction onERC1155Received(\n    address operator,\n    address from,\n    uint256 id,\n    uint256 value,\n    bytes memory data\n)\n    external\n    pure\n    override\n    returns (bytes4)\n{\n    return bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));\n}\n```
MEDIUM severity: This vulnerability allows an adversary to artificially lower the quorum threshold for a vote by dele. This vulnerability allows an adversary to artificially lower the quorum threshold for a vote by delegating their community voting power to other users, thereby reducing the total number of votes required to reach quorum. This is achieved by exploiting the fact that when a user delegates to another u...

Vulnerable code:
```\nif (_delegator == _delegatee):\n    _updateTotalCommunityVotingPower(_delegator, True)\n\nelse if (currentDelegate == _delegator):\n    _updateTotalCommunityVotingPower(_delegator, False)\n```\n```\nnewProposal.id = newProposalId.toUint96();\nnewProposal.proposer = msg.sender;\nnewProposal.targets = _targets;\nnewProposal.values = _values;\nnewProposal.signatures = _signatures;\nnewProposal.calldatas = _calldatas;\n\nnewProposal.quorumVotes = quorumVotes().toUint24();\nnewProposal.startTime = (block.timestamp + votingDelay).toUint32();\nnewProposal.endTime = (block.timestamp + votingDelay + votingPeriod).toUint32();\n```
MEDIUM severity: The `LMPVault` contract is vulnerable to a denial-of-service (DoS) attack when the balance of the `f. The `LMPVault` contract is vulnerable to a denial-of-service (DoS) attack when the balance of the `feeSink` address hits the `perWalletLimit`. This occurs when the `_collectFees` function attempts to mint shares to the `feeSink` address, which triggers a check in the `_beforeTokenTransfer` function...

Vulnerable code:
```\nfunction _collectFees(uint256 idle, uint256 debt, uint256 totalSupply) internal {\n    address sink = feeSink;\n    \n    if (fees > 0 && sink!= address(0)) {\n        shares = _convertToShares(fees, Math.Rounding.Up);\n        _mint(sink, shares);\n        emit Deposit(address(this), sink, fees, shares);\n    }\n}\n```\n```\nfunction _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override whenNotPaused {\n    if (balanceOf(to) + amount > perWalletLimit) {\n        revert OverWalletLimit(to);\n    }\n}\n```
MEDIUM severity: The zNS domain name collision vulnerability occurs when the domain registration process allows the r. The zNS domain name collision vulnerability occurs when the domain registration process allows the registration of two different NFTs for the same visually indistinguishable text representation of a domain. This is achieved by exploiting the domain name mapping mechanism, which connects parent names...

Vulnerable code:
```\nfunction registerDomain(\n    uint256 parentId,\n    string memory name,\n    address domainOwner,\n    address minter\n) external override onlyController returns (uint256) {\n    uint256 labelHash = uint256(keccak256(bytes(name)));\n    address controller = msg.sender;\n\n    // Domain parents must exist\n    require(_exists(parentId), "Zer0 Registrar: No parent");\n\n    // Calculate the new domain's id and create it\n    uint256 domainId = uint256(keccak256(abi.encodePacked(parentId, labelHash)));\n    _createDomain(domainId, domainOwner, minter, controller);\n\n    emit DomainCreated(domainId, name, labelHash, parentId, minter, controller);\n\n    return domainId;\n```
MEDIUM severity: The UniV2Adapter's `getExecutionData` method fails to properly handle native ETH swaps, rendering th. The UniV2Adapter's `getExecutionData` method fails to properly handle native ETH swaps, rendering them unusable. Specifically, the method does not account for native ETH trades, which are essential for Notional's operation, as it operates in native ETH rather than WETH. The issue lies in the fact th...

Vulnerable code:
```\nspender = address(Deployments.UNIV2_ROUTER);\ntarget = address(Deployments.UNIV2_ROUTER);\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```
MEDIUM severity: The `importScore()` function in `IexecMaintenanceDelegate` allows for the asynchronous import of wor. The `importScore()` function in `IexecMaintenanceDelegate` allows for the asynchronous import of worker scores from the previous PoCo system deployed on-chain. While this approach typically enhances system resilience through the pull pattern, it inadvertently introduces a vulnerability that undermin...

Vulnerable code:
```\nfunction importScore(address _worker) external override {\n    require(!m_v3_scoreImported[_worker], "score-already-imported");\n    m_workerScores[_worker] = m_workerScores[_worker].max(m_v3_iexecHub.viewScore(_worker));\n    m_v3_scoreImported[_worker] = true;\n}\n```
MEDIUM severity: The `claimCOMPAndTransfer()` function in the contract is vulnerable to a front-running attack, which. The `claimCOMPAndTransfer()` function in the contract is vulnerable to a front-running attack, which can result in the COMP token being locked in the contract. The function is intended to claim COMP incentives earned and transfer them to the treasury manager contract. However, the `COMPTROLLER.claim...

Vulnerable code:
```\nfunction claimCOMPAndTransfer(address[] calldata cTokens)\n    external\n    override\n    onlyManagerContract\n    nonReentrant\n    returns (uint256)\n{\n    uint256 balanceBefore = COMP.balanceOf(address(this));\n    COMPTROLLER.claimComp(address(this), cTokens);\n    uint256 balanceAfter = COMP.balanceOf(address(this));\n\n    uint256 netBalance = balanceAfter.sub(balanceBefore);\n    if (netBalance > 0) {\n        COMP.safeTransfer(msg.sender, netBalance);\n    }\n\n    return netBalance;\n```\n```\nfunction claimComp(address holder, CToken[] memory cTokens) public {\n    address[] memory holders = new address[](1);\n    holders[0] = holder;\n    claimComp(holders, cTokens, true, true);\n}\n```
MEDIUM severity: The vulnerability arises when an oracle provider switch is initiated, but the previous provider's la. The vulnerability arises when an oracle provider switch is initiated, but the previous provider's last request is unable to be committed due to the unavailability of a valid price within the specified time range. This can occur when the pyth price signing service or keeper is offline during the tran...

Vulnerable code:
```\nuint256 latestTimestamp = global.latest == 0? 0 : oracles[global.latest].provider.latest().timestamp;\nif (uint256(oracles[global.latest].timestamp) > latestTimestamp) {\n    return false;\n}\n```\n```\nuint256 versionToCommit = versionList[versionIndex];\nPythStructs.Price memory pythPrice = _validateAndGetPrice(versionToCommit, updateData);\n```\n```\nreturn pyth.parsePriceFeedUpdates({\n    value: pyth.getUpdateFee(updateDataList)\n})(\n    updateDataList,\n    idList,\n    SafeCast.toUint64(oracleVersion + MIN_VALID_TIME_AFTER_VERSION),\n    SafeCast.toUint64(oracleVersion + MAX_VALID_TIME_AFTER_VERSION)\n)[0].price\n```\n```\nif (versionList.length > nextVersionIndexToCommit \n    && oracleVersion >= versionList[nextVersionIndexToCommit]) {\n    commitRequested(nextVersionIndexToCommit, updateData);\n    return;\n}\n```\n```\nfunction request(address account) external onlyAuthorized {\n    (OracleVersion memory latestVersion, uint256 currentTimestamp) = \n        oracles[global.current].provider.status();\n\n    oracles[global.current].provider.request(account);\n    oracles[global.current].timestamp = uint256(currentTimestamp);\n    _updateLatest(latestVersion);\n}\n```
MEDIUM severity: The `getContractAddress` function in the `Minipool/Delegate` implementation is responsible for retri. The `getContractAddress` function in the `Minipool/Delegate` implementation is responsible for retrieving the contract address associated with a given contract name. However, in its current form, it lacks essential checks to ensure the requested contract address is valid. Specifically, the function...

Vulnerable code:
```\nfunction getContractAddress(string memory _contractName) private view returns (address) {\n    return rocketStorage.getAddress(keccak256(abi.encodePacked("contract.address", _contractName)));\n}\n```\n```\nfunction getContractAddress(string memory _contractName) private view returns (address) {\n    return rocketStorage.getAddress(keccak256(abi.encodePacked("contract.address", _contractName)));\n}\n```\n```\nfunction getContractAddress(string memory _contractName) internal view returns (address) {\n    address contractAddress = getAddress(keccak256(abi.encodePacked("contract.address", _contractName)));\n    require(contractAddress!= address(0x0), "Contract not found");\n    return contractAddress;\n}\n```
MEDIUM severity: The `emergencyResume` function is designed to recover the vault's liquidity following an `emergencyP. The `emergencyResume` function is designed to recover the vault's liquidity following an `emergencyPause` event. However, it fails to account for the scenario where the deposit call is cancelled by GMX, potentially leading to a fund lock. This vulnerability arises from the assumption that the deposi...

Vulnerable code:
```\nfunction emergencyResume(\n    GMXTypes.Store storage self\n) external {\n    GMXChecks.beforeEmergencyResumeChecks(self);\n\n    self.status = GMXTypes.Status.Resume;\n\n    self.refundee = payable(msg.sender);\n\n    GMXTypes.AddLiquidityParams memory _alp = AddLiquidityParams(\n        tokenAAmt: self.tokenA.balanceOf(address(this)),\n        tokenBAmt: self.tokenB.balanceOf(address(this)),\n        executionFee: msg.value\n    );\n\n    GMXManager.addLiquidity(\n        self,\n        _alp\n    );\n}\n```\n```\nfunction afterDepositCancellation(\n    bytes32 depositKey,\n    IDeposit.Props memory depositProps,\n    IEvent.Props memory eventData\n) external onlyController {\n    GMXTypes.Store memory _store = vault.store();\n\n    if (_store.status == GMXTypes.Status.Deposit) {\n        if (_store.depositCache.depositKey == depositKey) {\n            vault.processDepositCancellation();\n        }\n    } else if (_store.status == GMXTypes.Status.Rebalance_Add) {\n        if (_store.rebalanceCache.depositKey == depositKey) {\n            vault.processRebalanceAddCancellation();\n        }\n    } else if (_store.status == GMXTypes.Status.Compound) {\n        if (_store.compoundCache.depositKey == depositKey) {\n            vault.processCompoundCancellation();\n        }\n    } else {\n        revert Errors.DepositCancellationCallback();\n    }\n}\n```\n```\nfunction beforeEmergencyResumeChecks(\n    GMXTypes.Store storage self\n) external view {\n    if (self.status!= GMXTypes.Status.Paused)\n        revert Errors.NotAllowedInCurrentVaultStatus();\n}\n```