Overview
xDAI Balance
20.913580913790399704 xDAI
xDAI Value
$20.91 (@ $1.00/xDAI)More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
38043521 | 58 mins ago | 0.05522834 xDAI | ||||
38043521 | 58 mins ago | 27.7820729 xDAI | ||||
38043520 | 58 mins ago | 0.6745092 xDAI | ||||
38034782 | 13 hrs ago | 0.50003828 xDAI | ||||
38034782 | 13 hrs ago | 0.04058805 xDAI | ||||
38034782 | 13 hrs ago | 20.17342888 xDAI | ||||
38034781 | 13 hrs ago | 0.04058805 xDAI | ||||
38026165 | 26 hrs ago | 0.50292769 xDAI | ||||
38026165 | 26 hrs ago | 20.39316574 xDAI | ||||
38026165 | 26 hrs ago | 0.04119722 xDAI | ||||
38024084 | 29 hrs ago | 0.03307301 xDAI | ||||
38019563 | 35 hrs ago | 2.14848359 xDAI | ||||
38018024 | 37 hrs ago | 0.03744872 xDAI | ||||
38017560 | 38 hrs ago | 0.01968959 xDAI | ||||
38017559 | 38 hrs ago | 10.12404433 xDAI | ||||
38017559 | 38 hrs ago | 0.24051483 xDAI | ||||
38013049 | 44 hrs ago | 14.00994738 xDAI | ||||
38009961 | 2 days ago | 0.0350432 xDAI | ||||
38008933 | 2 days ago | 13.15420597 xDAI | ||||
38008932 | 2 days ago | 0.02561015 xDAI | ||||
38008932 | 2 days ago | 0.31393154 xDAI | ||||
38006144 | 2 days ago | 0.19732452 xDAI | ||||
38004518 | 2 days ago | 0.11264673 xDAI | ||||
38004270 | 2 days ago | 0.02646209 xDAI | ||||
38000204 | 2 days ago | 0.21785604 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 752,133 blocks with 9,950.48 xDAI in fees)
Block | Transaction | Gas Used | Reward | |
---|---|---|---|---|
38044202 | 27 secs ago | 29 | 6,689,300 (39.35%) | 0.005927022535272505 xDAI |
38044200 | 37 secs ago | 8 | 1,842,856 (10.84%) | 0.002229891738627088 xDAI |
38044199 | 42 secs ago | 7 | 669,514 (3.94%) | 0.000835316723129818 xDAI |
38044195 | 1 min ago | 16 | 3,324,753 (19.56%) | 0.005232343721508744 xDAI |
38044194 | 1 min ago | 19 | 5,731,997 (33.72%) | 0.017173046634718416 xDAI |
38044192 | 1 min ago | 27 | 3,842,730 (22.60%) | 0.410463099615344692 xDAI |
38044186 | 1 min ago | 16 | 3,375,245 (19.85%) | 0.006486263321686276 xDAI |
38044185 | 2 mins ago | 34 | 7,902,450 (46.49%) | 0.042718847295379673 xDAI |
38044181 | 2 mins ago | 19 | 8,840,301 (52.00%) | 0.009148041689937 xDAI |
38044179 | 2 mins ago | 16 | 4,006,841 (23.57%) | 0.004026722837989618 xDAI |
38044178 | 2 mins ago | 9 | 1,950,627 (11.47%) | 0.002450185999811 xDAI |
38044177 | 2 mins ago | 19 | 6,483,946 (38.14%) | 0.005581987005900397 xDAI |
38044175 | 2 mins ago | 19 | 4,407,007 (25.92%) | 0.005803624398111516 xDAI |
38044166 | 3 mins ago | 40 | 8,209,699 (48.29%) | 0.055741449141151097 xDAI |
38044161 | 4 mins ago | 24 | 4,172,263 (24.54%) | 0.326640645467886008 xDAI |
38044159 | 4 mins ago | 59 | 15,166,923 (89.22%) | 0.678683770841697851 xDAI |
38044151 | 4 mins ago | 25 | 5,010,593 (29.47%) | 0.008451101290886366 xDAI |
38044146 | 5 mins ago | 23 | 5,616,065 (33.04%) | 0.008144124941396404 xDAI |
38044141 | 5 mins ago | 38 | 8,477,828 (49.87%) | 0.467206457729731766 xDAI |
38044140 | 5 mins ago | 44 | 6,708,789 (39.46%) | 0.013834852774460029 xDAI |
38044138 | 5 mins ago | 25 | 8,000,625 (47.06%) | 0.008313823062657336 xDAI |
38044136 | 6 mins ago | 46 | 6,942,884 (40.84%) | 0.007559792167605056 xDAI |
38044135 | 6 mins ago | 23 | 4,458,468 (26.23%) | 0.02706453721845627 xDAI |
38044133 | 6 mins ago | 8 | 1,085,927 (6.39%) | 0.001821512415286609 xDAI |
38044118 | 7 mins ago | 23 | 5,716,629 (33.63%) | 0.01061717049618921 xDAI |
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
GNO | xDai (XDAI) | 100.00% | $0.999972 | 20.9136 | $20.91 |
[ 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.