HYPE Price: $22.27 (+0.59%)
 

Overview

HYPE Balance

HyperEVM LogoHyperEVM LogoHyperEVM Logo0 HYPE

HYPE Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions and > 10 Token Transfers found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252725882026-01-22 20:02:153 days ago1769112135
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
252653012026-01-22 18:02:483 days ago1769104968
0xE7071672...5fC46A49B
0 HYPE
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x973a1b0D...d79743377
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
MorphoStrategy

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

import { IMorpho } from "../../interfaces/strategies/IMorpho.sol";
import { BaseStrategy, SafeERC20, IERC20 } from "../../BaseStrategy.sol";
import { SharesMathLib } from "../../libraries/SharesMathLib.sol";
import { UtilsLib } from "../../libraries/UtilsLib.sol";
import { ErrorsLib } from "../../libraries/ErrorsLib.sol";

contract MorphoStrategy is BaseStrategy {
    using SafeERC20 for IERC20;
    using SharesMathLib for uint256;

    bytes32 public marketId;

    constructor(address _brinkVault, address _asset, address _reserve, bytes32 _marketId) BaseStrategy(_brinkVault, _asset, _reserve) {
        IMorpho.MarketParams memory marketParams_ = IMorpho(reserve).idToMarketParams(_marketId);
        if (marketParams_.loanToken != _asset) revert ErrorsLib.ASSET_MISMATCH();

        marketId = _marketId;

        IERC20(_asset).safeIncreaseAllowance(_brinkVault, type(uint256).max);
    }

    function balance() public override view returns (uint256 _supplyAssets) {
        IMorpho.Market memory market_ = IMorpho(reserve).market(marketId);
        IMorpho.Position memory position_ = IMorpho(reserve).position(marketId, address(this));
        _supplyAssets = position_.supplyShares.toAssetsDown(market_.totalSupplyAssets, market_.totalSupplyShares);
    }

    function supply(uint256 _assetAmount) external override onlyBV {
        IMorpho.MarketParams memory marketParams_ = getMarketParams();

        IERC20(asset).safeTransferFrom(msg.sender, address(this), _assetAmount);
        IERC20(asset).safeIncreaseAllowance(reserve, _assetAmount);

        IMorpho(reserve).supply(
            marketParams_,
            _assetAmount,
            0,
            address(this),
            bytes("")
        );

        if (IERC20(asset).allowance(address(this), reserve) > 0) IERC20(asset).forceApprove(reserve, 0);
    }

    function withdraw(uint256 _assetAmount) external override onlyBV {
        IMorpho.MarketParams memory marketParams_ = getMarketParams();

        IMorpho.Market memory market_ = IMorpho(reserve).market(marketId);
        IMorpho.Position memory position_ = IMorpho(reserve).position(marketId, address(this));

        uint256 supplyAssets = position_.supplyShares.toAssetsDown(market_.totalSupplyAssets, market_.totalSupplyShares);

        uint256 availableLiquidity = UtilsLib.min(
            market_.totalSupplyAssets - market_.totalBorrowAssets, IERC20(asset).balanceOf(reserve)
        );

        uint256 toWithdraw = UtilsLib.min(
            UtilsLib.min(supplyAssets, availableLiquidity), _assetAmount
        );

        IMorpho(reserve).withdraw(
            marketParams_,
            toWithdraw,
            0,
            address(this),
            msg.sender
        );
    }

    function harvest() external override {
        // TODO: investigate harvest
    }

    function getMarketParams() internal view returns (IMorpho.MarketParams memory) {
        return IMorpho(reserve).idToMarketParams(marketId);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 3 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 4 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import { ErrorsLib } from "./libraries/ErrorsLib.sol";
import { IBaseStrategy } from "./interfaces/IBaseStrategy.sol";

abstract contract BaseStrategy is IBaseStrategy {
    using SafeERC20 for IERC20;

    error NOT_AUTHORIZED();

    address public brinkVault;
    address public asset;
    address public reserve;

    modifier onlyBV() {
        if (msg.sender != brinkVault) revert NOT_AUTHORIZED();
        _;
    }

    constructor(address _brinkVault, address _asset, address _reserve) {
        if (_brinkVault == address(0) || _asset == address(0) || _reserve == address(0)) revert ErrorsLib.ZERO_ADDRESS();

        brinkVault = _brinkVault;
        asset = _asset;
        reserve = _reserve;
    }

    function balance() external view virtual returns (uint256) {}

    function supply(uint256 _assetAmount) external virtual {}

    function withdraw(uint256 _assetAmount) external virtual {}

    function harvest() external virtual {}
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

interface IBaseStrategy {
    function brinkVault() external view returns (address);
    function asset() external view returns (address);
    function reserve() external view returns (address);
    function balance() external view returns (uint256);
    function supply(uint256 assetAmount) external;
    function withdraw(uint256 assetAmount) external;
    function harvest() external;
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

interface IMorpho {
    struct Market {
        uint128 totalSupplyAssets;
        uint128 totalSupplyShares;
        uint128 totalBorrowAssets;
        uint128 totalBorrowShares;
        uint128 lastUpdate;
        uint128 fee;
    }

    struct MarketParams {
        address loanToken;
        address collateralToken;
        address oracle;
        address irm;
        uint256 lltv;
    }

    struct Position {
        uint256 supplyShares;
        uint128 borrowShares;
        uint128 collateral;
    }

    function supply(
        MarketParams memory marketParams,
        uint256 assets,
        uint256 shares,
        address onBehalf,
        bytes calldata data
    ) external returns (uint256, uint256);

    function withdraw(
        MarketParams memory marketParams,
        uint256 assets,
        uint256 shares,
        address onBehalf,
        address receiver
    ) external returns (uint256, uint256);

    function position(bytes32 id, address account) external view returns (Position memory);

    function market(bytes32 id) external view returns (Market memory);

    function idToMarketParams(bytes32 id) external view returns (MarketParams memory);
}

File 11 of 14 : ErrorsLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

library ErrorsLib {
    /// @notice Error thrown when a zero address is provided
    error ZERO_ADDRESS();

    /// @notice Error thrown when a zero amount is provided
    error ZERO_AMOUNT();

    /// @notice Error thrown when a zero byte array is provided
    error ZERO_BYTES();

    /// @notice Error thrown when the number of strategies is zero
    error ZERO_STRATEGIES();

    /// @notice Error thrown when array lengths do not match
    error ARRAY_LENGTH_MISMATCH();

    /// @notice Error thrown when the asset address does not match
    error ASSET_MISMATCH();

    /// @notice Error thrown when a strategy already exists
    error DUPLICATE_STRATEGY(address strategy);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

uint256 constant WAD = 1e18;

/// @title MathLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library to manage fixed-point arithmetic.
library MathLib {
    /// @dev Returns (`x` * `y`) / `WAD` rounded down.
    function wMulDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, y, WAD);
    }

    /// @dev Returns (`x` * `WAD`) / `y` rounded down.
    function wDivDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, WAD, y);
    }

    /// @dev Returns (`x` * `WAD`) / `y` rounded up.
    function wDivUp(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivUp(x, WAD, y);
    }

    /// @dev Returns (`x` * `y`) / `d` rounded down.
    function mulDivDown(uint256 x, uint256 y, uint256 d) internal pure returns (uint256) {
        return (x * y) / d;
    }

    /// @dev Returns (`x` * `y`) / `d` rounded up.
    function mulDivUp(uint256 x, uint256 y, uint256 d) internal pure returns (uint256) {
        return (x * y + (d - 1)) / d;
    }

    /// @dev Returns the sum of the first three non-zero terms of a Taylor expansion of e^(nx) - 1, to approximate a
    /// continuous compound interest rate.
    function wTaylorCompounded(uint256 x, uint256 n) internal pure returns (uint256) {
        uint256 firstTerm = x * n;
        uint256 secondTerm = mulDivDown(firstTerm, firstTerm, 2 * WAD);
        uint256 thirdTerm = mulDivDown(secondTerm, firstTerm, 3 * WAD);

        return firstTerm + secondTerm + thirdTerm;
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

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

/// @title SharesMathLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Shares management library.
/// @dev This implementation mitigates share price manipulations, using OpenZeppelin's method of virtual shares:
/// https://docs.openzeppelin.com/contracts/4.x/erc4626#inflation-attack.
library SharesMathLib {
    using MathLib for uint256;

    /// @dev The number of virtual shares has been chosen low enough to prevent overflows, and high enough to ensure
    /// high precision computations.
    /// @dev Virtual shares can never be redeemed for the assets they are entitled to, but it is assumed the share price
    /// stays low enough not to inflate these assets to a significant value.
    /// @dev Warning: The assets to which virtual borrow shares are entitled behave like unrealizable bad debt.
    uint256 internal constant VIRTUAL_SHARES = 1e6;

    /// @dev A number of virtual assets of 1 enforces a conversion rate between shares and assets when a market is
    /// empty.
    uint256 internal constant VIRTUAL_ASSETS = 1;

    /// @dev Calculates the value of `assets` quoted in shares, rounding down.
    function toSharesDown(uint256 assets, uint256 totalAssets, uint256 totalShares) internal pure returns (uint256) {
        return assets.mulDivDown(totalShares + VIRTUAL_SHARES, totalAssets + VIRTUAL_ASSETS);
    }

    /// @dev Calculates the value of `shares` quoted in assets, rounding down.
    function toAssetsDown(uint256 shares, uint256 totalAssets, uint256 totalShares) internal pure returns (uint256) {
        return shares.mulDivDown(totalAssets + VIRTUAL_ASSETS, totalShares + VIRTUAL_SHARES);
    }

    /// @dev Calculates the value of `assets` quoted in shares, rounding up.
    function toSharesUp(uint256 assets, uint256 totalAssets, uint256 totalShares) internal pure returns (uint256) {
        return assets.mulDivUp(totalShares + VIRTUAL_SHARES, totalAssets + VIRTUAL_ASSETS);
    }

    /// @dev Calculates the value of `shares` quoted in assets, rounding up.
    function toAssetsUp(uint256 shares, uint256 totalAssets, uint256 totalShares) internal pure returns (uint256) {
        return shares.mulDivUp(totalAssets + VIRTUAL_ASSETS, totalShares + VIRTUAL_SHARES);
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

/// @title UtilsLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library exposing helpers.
/// @dev Inspired by https://github.com/morpho-org/morpho-utils.
library UtilsLib {
    error MAX_UINT128_EXCEEDED();

    /// @dev Returns true if there is exactly one zero among `x` and `y`.
    function exactlyOneZero(uint256 x, uint256 y) internal pure returns (bool z) {
        assembly {
            z := xor(iszero(x), iszero(y))
        }
    }

    /// @dev Returns the min of `x` and `y`.
    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        assembly {
            z := xor(x, mul(xor(x, y), lt(y, x)))
        }
    }

    /// @dev Returns `x` safely cast to uint128.
    function toUint128(uint256 x) internal pure returns (uint128) {
        if (x > type(uint128).max) revert MAX_UINT128_EXCEEDED();
        return uint128(x);
    }

    /// @dev Returns max(0, x - y).
    function zeroFloorSub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        assembly {
            z := mul(gt(x, y), sub(x, y))
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_brinkVault","type":"address"},{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_reserve","type":"address"},{"internalType":"bytes32","name":"_marketId","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ASSET_MISMATCH","type":"error"},{"inputs":[],"name":"NOT_AUTHORIZED","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"ZERO_ADDRESS","type":"error"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"_supplyAssets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"brinkVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"marketId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetAmount","type":"uint256"}],"name":"supply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x608060405234801561001057600080fd5b5060405161127738038061127783398101604081905261002f916103aa565b8383836001600160a01b038316158061004f57506001600160a01b038216155b8061006157506001600160a01b038116155b1561007f5760405163538ba4f960e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b03958616178255600180548216948616949094179093556002805490931691909316908117909155604051632c3c915760e01b815260048101849052632c3c91579060240160a060405180830381865afa1580156100f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011c91906103f5565b9050836001600160a01b031681600001516001600160a01b0316146101545760405163c46da32560e01b815260040160405180910390fd5b600382905561016f6001600160a01b03851686600019610179565b50505050506104c7565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156101c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ed919061048d565b905061020384846101fe85856104a6565b610209565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b1790915261026190859083906102c816565b61020357604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526102be91869161031916565b6102038482610319565b6000806000806020600086516020880160008a5af192503d9150600051905082801561030d575081156102fe578060011461030d565b6000866001600160a01b03163b115b93505050505b92915050565b600080602060008451602086016000885af18061033c576040513d6000823e3d81fd5b50506000513d91508115610354578060011415610361565b6001600160a01b0384163b155b1561020357604051635274afe760e01b81526001600160a01b038516600482015260240160405180910390fd5b80516001600160a01b03811681146103a557600080fd5b919050565b600080600080608085870312156103c057600080fd5b6103c98561038e565b93506103d76020860161038e565b92506103e56040860161038e565b6060959095015193969295505050565b600060a082840312801561040857600080fd5b5060405160a081016001600160401b038111828210171561043957634e487b7160e01b600052604160045260246000fd5b6040526104458361038e565b81526104536020840161038e565b60208201526104646040840161038e565b60408201526104756060840161038e565b60608201526080928301519281019290925250919050565b60006020828403121561049f57600080fd5b5051919050565b8082018082111561031357634e487b7160e01b600052601160045260246000fd5b610da1806104d66000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80636ed71ede1161005b5780636ed71ede146100e5578063b69ef8a8146100fc578063cd3293de14610104578063e9d3c1541461011757600080fd5b80632e1a7d4d1461008d57806335403023146100a257806338d52e0f146100b55780634641257d146100a0575b600080fd5b6100a061009b3660046109a2565b61012a565b005b6100a06100b03660046109a2565b6103be565b6001546100c8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ee60035481565b6040519081526020016100dc565b6100ee610555565b6002546100c8906001600160a01b031681565b6000546100c8906001600160a01b031681565b6000546001600160a01b0316331461015557604051633d83866f60e01b815260040160405180910390fd5b600061015f610677565b600254600354604051632e3071cd60e11b81529293506000926001600160a01b0390921691635c60e39a9161019a9160040190815260200190565b60c060405180830381865afa1580156101b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101db91906109d7565b6002546003546040516349e2903160e11b815260048101919091523060248201529192506000916001600160a01b03909116906393c5206290604401606060405180830381865afa158015610234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102589190610a86565b82516020840151825192935060009261027f9290916001600160801b039182169116610716565b905060006103228460400151856000015161029a9190610b16565b6001546002546040516370a0823160e01b81526001600160a01b0391821660048201526001600160801b0393909316929116906370a0823190602401602060405180830381865afa1580156102f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103179190610b35565b808218908211021890565b905060008282188284110283188781188882110218600254604051635c2bea4960e01b81529192506001600160a01b031690635c2bea4990610371908990859060009030903390600401610b8d565b60408051808303816000875af115801561038f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b39190610bc9565b505050505050505050565b6000546001600160a01b031633146103e957604051633d83866f60e01b815260040160405180910390fd5b60006103f3610677565b60015490915061040e906001600160a01b0316333085610743565b60025460015461042b916001600160a01b039182169116846107b0565b600254604080516020810182526000808252915163a99aad8960e01b81526001600160a01b039093169263a99aad899261046e9286928892913091600401610bed565b60408051808303816000875af115801561048c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b09190610bc9565b5050600154600254604051636eb1769f60e11b81523060048201526001600160a01b039182166024820152600092919091169063dd62ed3e90604401602060405180830381865afa158015610509573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052d9190610b35565b111561055157600254600154610551916001600160a01b0391821691166000610835565b5050565b600254600354604051632e3071cd60e11b815260009283926001600160a01b0390911691635c60e39a9161058f9160040190815260200190565b60c060405180830381865afa1580156105ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d091906109d7565b6002546003546040516349e2903160e11b815260048101919091523060248201529192506000916001600160a01b03909116906393c5206290604401606060405180830381865afa158015610629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064d9190610a86565b82516020840151825192935061067092916001600160801b039081169116610716565b9250505090565b6040805160a0810182526000808252602082018190528183018190526060820181905260808201526002546003549251632c3c915760e01b8152600481019390935290916001600160a01b0390911690632c3c91579060240160a060405180830381865afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190610c83565b905090565b600061073b610726600185610d1f565b610733620f424085610d1f565b8691906108c5565b949350505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526107aa9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506108dc565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610800573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108249190610b35565b90506107aa84846108358585610d1f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526108868482610951565b6107aa576040516001600160a01b038481166024830152600060448301526108bb91869182169063095ea7b390606401610778565b6107aa84826108dc565b6000816108d28486610d32565b61073b9190610d49565b600080602060008451602086016000885af1806108ff576040513d6000823e3d81fd5b50506000513d91508115610917578060011415610924565b6001600160a01b0384163b155b156107aa57604051635274afe760e01b81526001600160a01b038516600482015260240160405180910390fd5b6000806000806020600086516020880160008a5af192503d91506000519050828015610996575081156109875780600114610996565b6000866001600160a01b03163b115b93505050505b92915050565b6000602082840312156109b457600080fd5b5035919050565b80516001600160801b03811681146109d257600080fd5b919050565b600060c08284031280156109ea57600080fd5b5060405160c0810167ffffffffffffffff81118282101715610a1c57634e487b7160e01b600052604160045260246000fd5b604052610a28836109bb565b8152610a36602084016109bb565b6020820152610a47604084016109bb565b6040820152610a58606084016109bb565b6060820152610a69608084016109bb565b6080820152610a7a60a084016109bb565b60a08201529392505050565b60006060828403128015610a9957600080fd5b506040516000906060810167ffffffffffffffff81118282101715610acc57634e487b7160e01b83526041600452602483fd5b60405283518082529150610ae2602085016109bb565b6020820152610af3604085016109bb565b6040820152949350505050565b634e487b7160e01b600052601160045260246000fd5b6001600160801b03828116828216039081111561099c5761099c610b00565b600060208284031215610b4757600080fd5b5051919050565b80516001600160a01b03908116835260208083015182169084015260408083015182169084015260608083015190911690830152608090810151910152565b6101208101610b9c8288610b4e565b60a082019590955260c08101939093526001600160a01b0391821660e08401521661010090910152919050565b60008060408385031215610bdc57600080fd5b505080516020909101519092909150565b610bf78187610b4e565b8460a08201528360c082015260018060a01b03831660e0820152610120610100820152600082518061012084015260005b81811015610c46576020818601810151610140868401015201610c28565b5060006101408285010152610140601f19601f8301168401019150509695505050505050565b80516001600160a01b03811681146109d257600080fd5b600060a0828403128015610c9657600080fd5b5060405160009060a0810167ffffffffffffffff81118282101715610cc957634e487b7160e01b83526041600452602483fd5b604052610cd584610c6c565b8152610ce360208501610c6c565b6020820152610cf460408501610c6c565b6040820152610d0560608501610c6c565b606082015260809384015193810193909352509092915050565b8082018082111561099c5761099c610b00565b808202811582820484141761099c5761099c610b00565b600082610d6657634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212209d69aaba0ca02e5e51b779e85f35300ea75906d97a79d964615c937c3de7537364736f6c634300081c0033000000000000000000000000017097f89c6319071f9dd067115e077773d68b1d000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb00000000000000000000000068e37de8d93d3496ae143f2e900490f6280c57cd2acd218c67daa94dd2f92e81f477ffc9f8507319f0f2d698eae5ed631ae14039

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c80636ed71ede1161005b5780636ed71ede146100e5578063b69ef8a8146100fc578063cd3293de14610104578063e9d3c1541461011757600080fd5b80632e1a7d4d1461008d57806335403023146100a257806338d52e0f146100b55780634641257d146100a0575b600080fd5b6100a061009b3660046109a2565b61012a565b005b6100a06100b03660046109a2565b6103be565b6001546100c8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ee60035481565b6040519081526020016100dc565b6100ee610555565b6002546100c8906001600160a01b031681565b6000546100c8906001600160a01b031681565b6000546001600160a01b0316331461015557604051633d83866f60e01b815260040160405180910390fd5b600061015f610677565b600254600354604051632e3071cd60e11b81529293506000926001600160a01b0390921691635c60e39a9161019a9160040190815260200190565b60c060405180830381865afa1580156101b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101db91906109d7565b6002546003546040516349e2903160e11b815260048101919091523060248201529192506000916001600160a01b03909116906393c5206290604401606060405180830381865afa158015610234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102589190610a86565b82516020840151825192935060009261027f9290916001600160801b039182169116610716565b905060006103228460400151856000015161029a9190610b16565b6001546002546040516370a0823160e01b81526001600160a01b0391821660048201526001600160801b0393909316929116906370a0823190602401602060405180830381865afa1580156102f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103179190610b35565b808218908211021890565b905060008282188284110283188781188882110218600254604051635c2bea4960e01b81529192506001600160a01b031690635c2bea4990610371908990859060009030903390600401610b8d565b60408051808303816000875af115801561038f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b39190610bc9565b505050505050505050565b6000546001600160a01b031633146103e957604051633d83866f60e01b815260040160405180910390fd5b60006103f3610677565b60015490915061040e906001600160a01b0316333085610743565b60025460015461042b916001600160a01b039182169116846107b0565b600254604080516020810182526000808252915163a99aad8960e01b81526001600160a01b039093169263a99aad899261046e9286928892913091600401610bed565b60408051808303816000875af115801561048c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b09190610bc9565b5050600154600254604051636eb1769f60e11b81523060048201526001600160a01b039182166024820152600092919091169063dd62ed3e90604401602060405180830381865afa158015610509573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052d9190610b35565b111561055157600254600154610551916001600160a01b0391821691166000610835565b5050565b600254600354604051632e3071cd60e11b815260009283926001600160a01b0390911691635c60e39a9161058f9160040190815260200190565b60c060405180830381865afa1580156105ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d091906109d7565b6002546003546040516349e2903160e11b815260048101919091523060248201529192506000916001600160a01b03909116906393c5206290604401606060405180830381865afa158015610629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064d9190610a86565b82516020840151825192935061067092916001600160801b039081169116610716565b9250505090565b6040805160a0810182526000808252602082018190528183018190526060820181905260808201526002546003549251632c3c915760e01b8152600481019390935290916001600160a01b0390911690632c3c91579060240160a060405180830381865afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190610c83565b905090565b600061073b610726600185610d1f565b610733620f424085610d1f565b8691906108c5565b949350505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526107aa9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506108dc565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610800573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108249190610b35565b90506107aa84846108358585610d1f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526108868482610951565b6107aa576040516001600160a01b038481166024830152600060448301526108bb91869182169063095ea7b390606401610778565b6107aa84826108dc565b6000816108d28486610d32565b61073b9190610d49565b600080602060008451602086016000885af1806108ff576040513d6000823e3d81fd5b50506000513d91508115610917578060011415610924565b6001600160a01b0384163b155b156107aa57604051635274afe760e01b81526001600160a01b038516600482015260240160405180910390fd5b6000806000806020600086516020880160008a5af192503d91506000519050828015610996575081156109875780600114610996565b6000866001600160a01b03163b115b93505050505b92915050565b6000602082840312156109b457600080fd5b5035919050565b80516001600160801b03811681146109d257600080fd5b919050565b600060c08284031280156109ea57600080fd5b5060405160c0810167ffffffffffffffff81118282101715610a1c57634e487b7160e01b600052604160045260246000fd5b604052610a28836109bb565b8152610a36602084016109bb565b6020820152610a47604084016109bb565b6040820152610a58606084016109bb565b6060820152610a69608084016109bb565b6080820152610a7a60a084016109bb565b60a08201529392505050565b60006060828403128015610a9957600080fd5b506040516000906060810167ffffffffffffffff81118282101715610acc57634e487b7160e01b83526041600452602483fd5b60405283518082529150610ae2602085016109bb565b6020820152610af3604085016109bb565b6040820152949350505050565b634e487b7160e01b600052601160045260246000fd5b6001600160801b03828116828216039081111561099c5761099c610b00565b600060208284031215610b4757600080fd5b5051919050565b80516001600160a01b03908116835260208083015182169084015260408083015182169084015260608083015190911690830152608090810151910152565b6101208101610b9c8288610b4e565b60a082019590955260c08101939093526001600160a01b0391821660e08401521661010090910152919050565b60008060408385031215610bdc57600080fd5b505080516020909101519092909150565b610bf78187610b4e565b8460a08201528360c082015260018060a01b03831660e0820152610120610100820152600082518061012084015260005b81811015610c46576020818601810151610140868401015201610c28565b5060006101408285010152610140601f19601f8301168401019150509695505050505050565b80516001600160a01b03811681146109d257600080fd5b600060a0828403128015610c9657600080fd5b5060405160009060a0810167ffffffffffffffff81118282101715610cc957634e487b7160e01b83526041600452602483fd5b604052610cd584610c6c565b8152610ce360208501610c6c565b6020820152610cf460408501610c6c565b6040820152610d0560608501610c6c565b606082015260809384015193810193909352509092915050565b8082018082111561099c5761099c610b00565b808202811582820484141761099c5761099c610b00565b600082610d6657634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212209d69aaba0ca02e5e51b779e85f35300ea75906d97a79d964615c937c3de7537364736f6c634300081c0033

Block Transaction Gas Used Reward
view all blocks ##produced##

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

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.