Overview
xDAI Balance
19.518493227011178412 xDAI
xDAI Value
$19.52 (@ $1.00/xDAI)More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
36470137 | 8 hrs ago | 66.37779969 xDAI | ||||
36470136 | 8 hrs ago | 66.37779969 xDAI | ||||
36470135 | 8 hrs ago | 0.12652725 xDAI | ||||
36461692 | 20 hrs ago | 0.00765048 xDAI | ||||
36461688 | 20 hrs ago | 4.03028375 xDAI | ||||
36454705 | 30 hrs ago | 0.55955727 xDAI | ||||
36453197 | 32 hrs ago | 6.67659242 xDAI | ||||
36453195 | 32 hrs ago | 0.01303332 xDAI | ||||
36447727 | 40 hrs ago | 10.00961778 xDAI | ||||
36447648 | 40 hrs ago | 0.6068774 xDAI | ||||
36444725 | 44 hrs ago | 8.68120571 xDAI | ||||
36444725 | 44 hrs ago | 0.01645866 xDAI | ||||
36436276 | 2 days ago | 0.17346707 xDAI | ||||
36430485 | 2 days ago | 0.01144934 xDAI | ||||
36427875 | 2 days ago | 18.12866029 xDAI | ||||
36427874 | 2 days ago | 0.03367131 xDAI | ||||
36424289 | 3 days ago | 0.0287245 xDAI | ||||
36420280 | 3 days ago | 0.00185623 xDAI | ||||
36419438 | 3 days ago | 4.07006239 xDAI | ||||
36419436 | 3 days ago | 0.00768876 xDAI | ||||
36417418 | 3 days ago | 1.80080807 xDAI | ||||
36417207 | 3 days ago | 2.43042589 xDAI | ||||
36413370 | 3 days ago | 0.14105723 xDAI | ||||
36410984 | 3 days ago | 25.59645411 xDAI | ||||
36410983 | 3 days ago | 0.04676382 xDAI |
Loading...
Loading
Contract Name:
GnoSharedMevEscrow
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import {Address} from '@openzeppelin/contracts/utils/Address.sol'; import {ISharedMevEscrow} from '../../../interfaces/ISharedMevEscrow.sol'; import {IVaultsRegistry} from '../../../interfaces/IVaultsRegistry.sol'; import {Errors} from '../../../libraries/Errors.sol'; /** * @title GnoSharedMevEscrow * @author StakeWise * @notice Accumulates received MEV. The rewards are shared by multiple Vaults. */ contract GnoSharedMevEscrow is ISharedMevEscrow { IVaultsRegistry private immutable _vaultsRegistry; /** * @dev Constructor * @param vaultsRegistry The address of the VaultsRegistry contract */ constructor(address vaultsRegistry) { _vaultsRegistry = IVaultsRegistry(vaultsRegistry); } /// @inheritdoc ISharedMevEscrow function harvest(uint256 assets) external override { if (!_vaultsRegistry.vaults(msg.sender)) revert Errors.HarvestFailed(); // transfer xDAI to the vault Address.sendValue(payable(msg.sender), assets); emit Harvested(msg.sender, assets); } /** * @dev Function for receiving MEV */ receive() external payable { emit MevReceived(msg.value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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 AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 * {FailedInnerCall} 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 AddressInsufficientBalance(address(this)); } (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 {FailedInnerCall}) 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 {FailedInnerCall} 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 {FailedInnerCall}. */ 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; /** * @title ISharedMevEscrow * @author StakeWise * @notice Defines the interface for the SharedMevEscrow contract */ interface ISharedMevEscrow { /** * @notice Event emitted on received MEV * @param assets The amount of MEV assets received */ event MevReceived(uint256 assets); /** * @notice Event emitted on harvest * @param caller The function caller * @param assets The amount of assets withdrawn */ event Harvested(address indexed caller, uint256 assets); /** * @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 * @param assets The amount of assets to withdraw */ function harvest(uint256 assets) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; /** * @title IVaultsRegistry * @author StakeWise * @notice Defines the interface for the VaultsRegistry */ interface IVaultsRegistry { /** * @notice Event emitted on a Vault addition * @param caller The address that has added the Vault * @param vault The address of the added Vault */ event VaultAdded(address indexed caller, address indexed vault); /** * @notice Event emitted on adding Vault implementation contract * @param impl The address of the new implementation contract */ event VaultImplAdded(address indexed impl); /** * @notice Event emitted on removing Vault implementation contract * @param impl The address of the removed implementation contract */ event VaultImplRemoved(address indexed impl); /** * @notice Event emitted on whitelisting the factory * @param factory The address of the whitelisted factory */ event FactoryAdded(address indexed factory); /** * @notice Event emitted on removing the factory from the whitelist * @param factory The address of the factory removed from the whitelist */ event FactoryRemoved(address indexed factory); /** * @notice Registered Vaults * @param vault The address of the vault to check whether it is registered * @return `true` for the registered Vault, `false` otherwise */ function vaults(address vault) external view returns (bool); /** * @notice Registered Vault implementations * @param impl The address of the vault implementation * @return `true` for the registered implementation, `false` otherwise */ function vaultImpls(address impl) external view returns (bool); /** * @notice Registered Factories * @param factory The address of the factory to check whether it is whitelisted * @return `true` for the whitelisted Factory, `false` otherwise */ function factories(address factory) external view returns (bool); /** * @notice Function for adding Vault to the registry. Can only be called by the whitelisted Factory. * @param vault The address of the Vault to add */ function addVault(address vault) external; /** * @notice Function for adding Vault implementation contract * @param newImpl The address of the new implementation contract */ function addVaultImpl(address newImpl) external; /** * @notice Function for removing Vault implementation contract * @param impl The address of the removed implementation contract */ function removeVaultImpl(address impl) external; /** * @notice Function for adding the factory to the whitelist * @param factory The address of the factory to add to the whitelist */ function addFactory(address factory) external; /** * @notice Function for removing the factory from the whitelist * @param factory The address of the factory to remove from the whitelist */ function removeFactory(address factory) external; /** * @notice Function for initializing the registry. Can only be called once during the deployment. * @param _owner The address of the owner of the contract */ function initialize(address _owner) external; }
// 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 InsufficientAssets(); error CapacityExceeded(); error InvalidCapacity(); error InvalidSecurityDeposit(); error InvalidFeeRecipient(); error InvalidFeePercent(); error NotHarvested(); error NotCollateralized(); error InvalidProof(); error LowLtv(); error RedemptionExceeded(); error InvalidPosition(); error InvalidLtv(); 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 EigenInvalidWithdrawal(); error InvalidEigenQueuedWithdrawals(); error InvalidWithdrawalCredentials(); error EigenPodNotFound(); }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200, "details": { "yul": true } }, "evmVersion": "shanghai", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"vaultsRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"HarvestFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"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":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a03461006b57601f6102b838819003918201601f19168301916001600160401b0383118484101761006f5780849260209460405283398101031261006b57516001600160a01b0381169081900361006b57608052604051610234908161008482396080518160860152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040908082526004908136101561004a575b5050361561001f575f80fd5b60207f7cb3607a76b32d6d17ca5d1aeb444650b19ac0fabbb1f24c93a0da57346b56109151348152a1005b5f3560e01c63ddc63262036100135782346101b357602090816003193601126101b357632988bb9f60e21b8352338385015283359282816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156101be575f91610184575b501561017557824710610160575f80808086335af13d1561015b573d67ffffffffffffffff8111610148578251906100ff601f8201601f19168601836101c8565b81525f843d92013e5b1561013957907f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf91519283523392a2005b51630a12f52160e11b81528390fd5b604186634e487b7160e01b5f525260245ffd5b610108565b5163cd78605960e01b81523081850152602490fd5b51630d599dd960e11b81528390fd5b90508281813d83116101b7575b61019b81836101c8565b810103126101b3575180151581036101b357856100be565b5f80fd5b503d610191565b82513d5f823e3d90fd5b90601f8019910116810190811067ffffffffffffffff8211176101ea57604052565b634e487b7160e01b5f52604160045260245ffdfea264697066735822122016d93d8ba28e86467a2a2d530f0b4e85dc42c0cc142e924aba2e6332d831a0e964736f6c634300081600330000000000000000000000007d014b3c6ee446563d4e0cb6fbd8c3d0419867cb
Deployed Bytecode
0x60806040908082526004908136101561004a575b5050361561001f575f80fd5b60207f7cb3607a76b32d6d17ca5d1aeb444650b19ac0fabbb1f24c93a0da57346b56109151348152a1005b5f3560e01c63ddc63262036100135782346101b357602090816003193601126101b357632988bb9f60e21b8352338385015283359282816024817f0000000000000000000000007d014b3c6ee446563d4e0cb6fbd8c3d0419867cb6001600160a01b03165afa9081156101be575f91610184575b501561017557824710610160575f80808086335af13d1561015b573d67ffffffffffffffff8111610148578251906100ff601f8201601f19168601836101c8565b81525f843d92013e5b1561013957907f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf91519283523392a2005b51630a12f52160e11b81528390fd5b604186634e487b7160e01b5f525260245ffd5b610108565b5163cd78605960e01b81523081850152602490fd5b51630d599dd960e11b81528390fd5b90508281813d83116101b7575b61019b81836101c8565b810103126101b3575180151581036101b357856100be565b5f80fd5b503d610191565b82513d5f823e3d90fd5b90601f8019910116810190811067ffffffffffffffff8211176101ea57604052565b634e487b7160e01b5f52604160045260245ffdfea264697066735822122016d93d8ba28e86467a2a2d530f0b4e85dc42c0cc142e924aba2e6332d831a0e964736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007d014b3c6ee446563d4e0cb6fbd8c3d0419867cb
-----Decoded View---------------
Arg [0] : vaultsRegistry (address): 0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007d014b3c6ee446563d4e0cb6fbd8c3d0419867cb
Latest 25 blocks (From a total of 272,070 blocks with 2,092.02 xDAI in fees)
Block | Transaction | Gas Used | Reward | |
---|---|---|---|---|
36476038 | 5 mins ago | 2 | 210,492 (1.24%) | 0.000640999797768588 xDAI |
36476035 | 6 mins ago | 7 | 1,891,798 (11.13%) | 0.004379883771387571 xDAI |
36476027 | 6 mins ago | 2 | 144,675 (0.85%) | 0.000303817498987275 xDAI |
36476021 | 7 mins ago | 4 | 660,169 (3.88%) | 0.001604386197074616 xDAI |
36476017 | 7 mins ago | 3 | 71,301 (0.42%) | 0.000132151499706 xDAI |
36476016 | 7 mins ago | 1 | 21,000 (0.12%) | 0.000044099999853 xDAI |
36476013 | 7 mins ago | 1 | 21,000 (0.12%) | 0.000044099999853 xDAI |
36476008 | 8 mins ago | 1 | 119,473 (0.70%) | 0.000250893299163689 xDAI |
36476005 | 8 mins ago | 8 | 389,532 (2.29%) | 0.000757527678273205 xDAI |
36476003 | 8 mins ago | 4 | 610,166 (3.59%) | 0.001507873250461714 xDAI |
36475996 | 9 mins ago | 5 | 960,730 (5.65%) | 0.00208429530449024 xDAI |
36475992 | 9 mins ago | 4 | 716,209 (4.21%) | 0.001332354200236273 xDAI |
36475984 | 10 mins ago | 3 | 607,190 (3.57%) | 0.001228428499016605 xDAI |
36475982 | 10 mins ago | 2 | 279,242 (1.64%) | 0.000837726 xDAI |
36475975 | 11 mins ago | 2 | 659,605 (3.88%) | 0.001128786756 xDAI |
36475974 | 11 mins ago | 2 | 572,767 (3.37%) | 0.001355938075261453 xDAI |
36475967 | 11 mins ago | 6 | 435,054 (2.56%) | 0.000896657009954622 xDAI |
36475964 | 12 mins ago | 5 | 738,749 (4.35%) | 0.001871777756709531 xDAI |
36475958 | 12 mins ago | 3 | 358,655 (2.11%) | 0.000870007198398106 xDAI |
36475957 | 12 mins ago | 2 | 288,763 (1.70%) | 0.000606402297978659 xDAI |
36475953 | 13 mins ago | 4 | 191,045 (1.12%) | 0.000401194498662685 xDAI |
36475950 | 13 mins ago | 3 | 556,625 (3.27%) | 0.001580051 xDAI |
36475946 | 13 mins ago | 10 | 1,524,229 (8.97%) | 0.002659564975603188 xDAI |
36475944 | 13 mins ago | 4 | 315,799 (1.86%) | 0.000864920697144271 xDAI |
36475942 | 14 mins ago | 8 | 928,238 (5.46%) | 0.002704332239229272 xDAI |
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
GNO | xDai (XDAI) | 100.00% | $0.999986 | 19.5185 | $19.52 |
[ Download: CSV Export ]
[ 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.