xDAI Price: $1.00 (+0.03%)

Contract

0xD9111994DB707209053339C879959014255401BF

Overview

XDAI Balance

Gnosis Chain LogoGnosis Chain LogoGnosis Chain Logo35.881597298647977335 XDAI

XDAI Value

$35.88 (@ $1.00/XDAI)

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 14 internal transactions

Parent Transaction Hash Block From To
454015342026-03-29 15:54:2511 days ago1774799665
0xD9111994...4255401BF
0.02090204 XDAI
454003702026-03-29 14:15:4512 days ago1774793745
0xD9111994...4255401BF
62.78723529 XDAI
450007372026-03-05 20:32:2035 days ago1772742740
0xD9111994...4255401BF
100.96372274 XDAI
447962822026-02-21 16:49:0047 days ago1771692540
0xD9111994...4255401BF
170.13261697 XDAI
435517262025-12-09 0:32:55122 days ago1765240375
0xD9111994...4255401BF
1.78046238 XDAI
435302892025-12-07 17:39:45123 days ago1765129185
0xD9111994...4255401BF
18.19402196 XDAI
434316512025-12-01 20:01:40129 days ago1764619300
0xD9111994...4255401BF
82.20927799 XDAI
430192532025-11-07 5:49:00154 days ago1762494540
0xD9111994...4255401BF
2.94088975 XDAI
430133832025-11-06 21:15:35154 days ago1762463735
0xD9111994...4255401BF
41.69610705 XDAI
428582432025-10-28 15:09:40163 days ago1761664180
0xD9111994...4255401BF
0.17629353 XDAI
427720572025-10-23 12:10:25169 days ago1761221425
0xD9111994...4255401BF
0.00135842 XDAI
427645722025-10-23 1:28:35169 days ago1761182915
0xD9111994...4255401BF
0.1339668 XDAI
427043682025-10-19 11:50:20173 days ago1760874620
0xD9111994...4255401BF
0.12811175 XDAI
425856852025-10-12 11:53:40180 days ago1760270020  Contract Creation0 XDAI
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GnoOwnMevEscrow

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 120 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.22;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {IOwnMevEscrow} from "../../../interfaces/IOwnMevEscrow.sol";
import {Errors} from "../../../libraries/Errors.sol";

/**
 * @title GnoOwnMevEscrow
 * @author StakeWise
 * @notice Accumulates received MEV. The escrow is owned by the Vault.
 */
contract GnoOwnMevEscrow is IOwnMevEscrow {
    /// @inheritdoc IOwnMevEscrow
    address payable public immutable override vault;

    /**
     * @dev Constructor
     * @param _vault The address of the Vault contract
     */
    constructor(address _vault) {
        // payable is not used but is required for the interface
        vault = payable(_vault);
    }

    /// @inheritdoc IOwnMevEscrow
    function harvest() external returns (uint256) {
        if (msg.sender != vault) revert Errors.HarvestFailed();

        uint256 balance = address(this).balance;
        if (balance != 0) {
            // transfer all xDAI to the vault
            Address.sendValue(vault, balance);
            emit Harvested(balance);
        }

        // always returns 0 as xDAI must be converted to GNO first
        return 0;
    }

    /**
     * @dev Function for receiving MEV
     */
    receive() external payable {
        emit MevReceived(msg.value);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert Errors.InsufficientBalance(address(this).balance, amount);
        }

        (bool success, bytes memory returndata) = recipient.call{value: amount}("");
        if (!success) {
            _revert(returndata);
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.22;

/**
 * @title IOwnMevEscrow
 * @author StakeWise
 * @notice Defines the interface for the OwnMevEscrow contract
 */
interface IOwnMevEscrow {
    /**
     * @notice Event emitted on received MEV
     * @param assets The amount of MEV assets received
     */
    event MevReceived(uint256 assets);

    /**
     * @notice Event emitted on harvest
     * @param assets The amount of assets withdrawn
     */
    event Harvested(uint256 assets);

    /**
     * @notice Vault address
     * @return The address of the vault that owns the escrow
     */
    function vault() external view returns (address payable);

    /**
     * @notice Withdraws MEV accumulated in the escrow. Can be called only by the Vault.
     * @dev IMPORTANT: because control is transferred to the Vault, care must be
     *    taken to not create reentrancy vulnerabilities. The Vault must follow the checks-effects-interactions pattern:
     *    https://docs.soliditylang.org/en/v0.8.22/security-considerations.html#use-the-checks-effects-interactions-pattern
     * @return assets The amount of assets withdrawn
     */
    function harvest() external returns (uint256 assets);
}

File 4 of 5 : Errors.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.22;

/**
 * @title Errors
 * @author StakeWise
 * @notice Contains all the custom errors
 */
library Errors {
    error AccessDenied();
    error InvalidShares();
    error InvalidAssets();
    error ZeroAddress();
    error CapacityExceeded();
    error InvalidCapacity();
    error InvalidSecurityDeposit();
    error InvalidFeeRecipient();
    error InvalidFeePercent();
    error NotHarvested();
    error NotCollateralized();
    error Collateralized();
    error InvalidProof();
    error LowLtv();
    error InvalidPosition();
    error InvalidHealthFactor();
    error InvalidReceivedAssets();
    error InvalidTokenMeta();
    error UpgradeFailed();
    error InvalidValidators();
    error DeadlineExpired();
    error PermitInvalidSigner();
    error InvalidValidatorsRegistryRoot();
    error InvalidVault();
    error AlreadyAdded();
    error AlreadyRemoved();
    error InvalidOracles();
    error NotEnoughSignatures();
    error InvalidOracle();
    error TooEarlyUpdate();
    error InvalidAvgRewardPerSecond();
    error InvalidRewardsRoot();
    error HarvestFailed();
    error LiquidationDisabled();
    error InvalidLiqThresholdPercent();
    error InvalidLiqBonusPercent();
    error InvalidLtvPercent();
    error InvalidCheckpointIndex();
    error InvalidCheckpointValue();
    error MaxOraclesExceeded();
    error ExitRequestNotProcessed();
    error ValueNotChanged();
    error FlashLoanFailed();
    error CannotTopUpV1Validators();
    error InvalidSignatures();
    error EmptySubVaults();
    error EjectingVaultNotFound();
    error EjectingVault();
    error RepeatedEjectingVault();
    error UnclaimedAssets();
    error InvalidCurator();
    error RewardsNonceIsHigher();
    error InvalidRedeemablePositions();
    error RedeemablePositionsProposed();
    error InvalidDelay();
}

File 5 of 5 : Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 120
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"HarvestFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"}],"name":"MevReceived","type":"event"},{"inputs":[],"name":"harvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a034606d57601f61028138819003918201601f19168301916001600160401b03831184841017607157808492602094604052833981010312606d57516001600160a01b03811690819003606d576080526040516101fb908161008682396080518181816073015260b80152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610044575b3615610018575f80fd5b7f7cb3607a76b32d6d17ca5d1aeb444650b19ac0fabbb1f24c93a0da57346b56106020604051348152a1005b5f3560e01c80634641257d146100a65763fbfa77cf0361000e57346100a2575f3660031901126100a2576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5f80fd5b346100a2575f3660031901126100a2577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316338190036101df574790816100fa575b60206040515f8152f35b81908147106101c8575f80809381935af13d156101c0573d9067ffffffffffffffff82116101ac5760405191601f8101601f19908116603f0116830167ffffffffffffffff8111848210176101ac5760405282523d5f602084013e5b1561018e575060207f8e55ccfc9778ff8eba1646d765cf1982537ce0f9257054a17b48aad74525018391604051908152a180806100f0565b80511561019d57805190602001fd5b63d6bda27560e01b5f5260045ffd5b634e487b7160e01b5f52604160045260245ffd5b606090610156565b504763cf47918160e01b5f5260045260245260445ffd5b630d599dd960e11b5f5260045ffdfea164736f6c634300081a000a000000000000000000000000663a8c9e88c5cdc565cc4bf0b2bec8d862d744a6

Deployed Bytecode

0x60806040526004361015610044575b3615610018575f80fd5b7f7cb3607a76b32d6d17ca5d1aeb444650b19ac0fabbb1f24c93a0da57346b56106020604051348152a1005b5f3560e01c80634641257d146100a65763fbfa77cf0361000e57346100a2575f3660031901126100a2576040517f000000000000000000000000663a8c9e88c5cdc565cc4bf0b2bec8d862d744a66001600160a01b03168152602090f35b5f80fd5b346100a2575f3660031901126100a2577f000000000000000000000000663a8c9e88c5cdc565cc4bf0b2bec8d862d744a66001600160a01b0316338190036101df574790816100fa575b60206040515f8152f35b81908147106101c8575f80809381935af13d156101c0573d9067ffffffffffffffff82116101ac5760405191601f8101601f19908116603f0116830167ffffffffffffffff8111848210176101ac5760405282523d5f602084013e5b1561018e575060207f8e55ccfc9778ff8eba1646d765cf1982537ce0f9257054a17b48aad74525018391604051908152a180806100f0565b80511561019d57805190602001fd5b63d6bda27560e01b5f5260045ffd5b634e487b7160e01b5f52604160045260245ffd5b606090610156565b504763cf47918160e01b5f5260045260245260445ffd5b630d599dd960e11b5f5260045ffdfea164736f6c634300081a000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000663a8c9e88c5cdc565cc4bf0b2bec8d862d744a6

-----Decoded View---------------
Arg [0] : _vault (address): 0x663a8C9e88c5cdc565Cc4bF0b2BEC8d862D744a6

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000663a8c9e88c5cdc565cc4bf0b2bec8d862d744a6


 Latest 25 blocks (From a total of 24,506 blocks with 517.05 XDAI in fees)

Block Transaction Gas Used Reward
456039102026-04-10 14:46:455 mins ago1775832405366,090,019 (35.82%)
0.00155066914729014 XDAI
456037132026-04-10 14:29:5522 mins ago1775831395212,496,772 (14.69%)
0.001893351541236636 XDAI
456036782026-04-10 14:27:0025 mins ago1775831220244,267,653 (25.10%)
0.006184876175714461 XDAI
456036022026-04-10 14:20:3531 mins ago1775830835397,781,783 (45.78%)
0.007783253175848936 XDAI
456036002026-04-10 14:20:2532 mins ago17758308252210,228,590 (60.17%)
0.000880494929398424 XDAI
456035452026-04-10 14:15:4536 mins ago1775830545315,189,202 (30.52%)
0.001602266683210126 XDAI
456034422026-04-10 14:07:0045 mins ago17758300201514,860,261 (87.41%)
0.000907485980865882 XDAI
456034162026-04-10 14:04:4547 mins ago1775829885358,588,533 (50.52%)
0.002088055713049176 XDAI
456034042026-04-10 14:03:4048 mins ago17758298201616,719,199 (98.35%)
0.002712819067215635 XDAI
456031572026-04-10 13:42:001 hr ago1775828520171,404,129 (8.26%)
0.00017448719167106 XDAI
456030232026-04-10 13:30:401 hr ago1775827840813,724,546 (80.73%)
0.085750697849039227 XDAI
456028142026-04-10 13:12:451 hr ago1775826765147,502,969 (44.14%)
0.000008829189221102 XDAI
456025392026-04-10 12:49:352 hrs ago1775825375439,025,678 (53.09%)
0.002504595191759659 XDAI
456024602026-04-10 12:42:552 hrs ago1775824975285,771,255 (33.95%)
0.00002867119105159 XDAI
456024052026-04-10 12:38:152 hrs ago17758246952910,444,962 (61.44%)
0.000815102202053058 XDAI
456023072026-04-10 12:30:052 hrs ago1775824205215,663,105 (33.31%)
2.523499613384163058 XDAI
456021982026-04-10 12:20:452 hrs ago1775823645195,068,098 (29.81%)
0.000000000270750558 XDAI
456020372026-04-10 12:07:202 hrs ago17758228401415,306,060 (90.04%)
0.000138012780811516 XDAI
456020182026-04-10 12:05:452 hrs ago17758227451316,869,681 (99.23%)
0.000259228405488055 XDAI
456019212026-04-10 11:57:252 hrs ago1775822245187,148,298 (42.05%)
0.00240553769051203 XDAI
456016442026-04-10 11:33:203 hrs ago17758208002615,850,489 (93.24%)
0.000010553618173516 XDAI
456015522026-04-10 11:25:353 hrs ago177582033571,436,047 (8.45%)
0.000632285504419531 XDAI
456015362026-04-10 11:24:103 hrs ago17758202501014,344,578 (84.38%)
0.00001782109783696 XDAI
456013242026-04-10 11:06:153 hrs ago1775819175367,649,412 (45.00%)
0.000645397140260089 XDAI
456010952026-04-10 10:46:304 hrs ago1775817990124,199,746 (24.70%)
0.000603803517332763 XDAI
view all blocks validated

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.