ETH Price: $3,378.50 (+7.48%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit To Pool137999372021-12-13 23:46:101311 days ago1639439170IN
mStable: Revenue Recipient
0 ETH0.0111004164
Deposit To Pool137943942021-12-13 3:21:111311 days ago1639365671IN
mStable: Revenue Recipient
0 ETH0.0107567461
Deposit To Pool137764862021-12-10 9:12:271314 days ago1639127547IN
mStable: Revenue Recipient
0 ETH0.0139393547
Deposit To Pool134031262021-10-12 10:38:061373 days ago1634035086IN
mStable: Revenue Recipient
0 ETH0.0197739667.1
Deposit To Pool133692122021-10-07 2:37:471378 days ago1633574267IN
mStable: Revenue Recipient
0 ETH0.01916815108.7
Deposit To Pool133575012021-10-05 6:48:121380 days ago1633416492IN
mStable: Revenue Recipient
0 ETH0.0232808279
Deposit To Pool133329292021-10-01 10:39:311384 days ago1633084771IN
mStable: Revenue Recipient
0 ETH0.0234299779
Deposit To Pool133005492021-09-26 9:15:331389 days ago1632647733IN
mStable: Revenue Recipient
0 ETH0.0102629858.2
Deposit To Pool133002392021-09-26 8:02:231389 days ago1632643343IN
mStable: Revenue Recipient
0 ETH0.0139308679
Deposit To Pool133000672021-09-26 7:20:511389 days ago1632640851IN
mStable: Revenue Recipient
0 ETH0.0087111949.4
Deposit To Pool133000262021-09-26 7:09:181389 days ago1632640158IN
mStable: Revenue Recipient
0 ETH0.0102972134.5
Deposit To Pool131983262021-09-10 13:44:211405 days ago1631281461IN
mStable: Revenue Recipient
0 ETH0.0202608669.2
Deposit To Pool131823542021-09-08 2:21:121407 days ago1631067672IN
mStable: Revenue Recipient
0 ETH0.04602474261
Deposit To Pool131814332021-09-07 22:51:391408 days ago1631055099IN
mStable: Revenue Recipient
0 ETH0.01805721102.4
Deposit To Pool131773872021-09-07 7:44:541408 days ago1631000694IN
mStable: Revenue Recipient
0 ETH0.03107628105.1
Deposit To Pool131330122021-08-31 11:27:121415 days ago1630409232IN
mStable: Revenue Recipient
0 ETH0.0137545278
Deposit To Pool131234742021-08-29 23:51:031417 days ago1630281063IN
mStable: Revenue Recipient
0 ETH0.0213748373
Deposit To Pool131054032021-08-27 4:37:001419 days ago1630039020IN
mStable: Revenue Recipient
0 ETH0.0116560766.1
Deposit To Pool130985012021-08-26 3:18:011420 days ago1629947881IN
mStable: Revenue Recipient
0 ETH0.0256684286
Deposit To Pool130409582021-08-17 5:54:111429 days ago1629179651IN
mStable: Revenue Recipient
0 ETH0.0066127537.5
Deposit To Pool130409522021-08-17 5:52:171429 days ago1629179537IN
mStable: Revenue Recipient
0 ETH0.0067009238
Deposit To Pool130409362021-08-17 5:48:091429 days ago1629179289IN
mStable: Revenue Recipient
0 ETH0.007053640
Deposit To Pool130408942021-08-17 5:36:071429 days ago1629178567IN
mStable: Revenue Recipient
0 ETH0.011413638
Deposit To Pool128694992021-07-21 11:22:321456 days ago1626866552IN
mStable: Revenue Recipient
0 ETH0.0020813
Deposit To Pool128694962021-07-21 11:22:061456 days ago1626866526IN
mStable: Revenue Recipient
0 ETH0.0025378414.5
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RevenueRecipient

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license
/**
 *Submitted for verification at Etherscan.io on 2021-04-07
*/

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.2;

interface IRevenueRecipient {
    /** @dev Recipient */
    function notifyRedistributionAmount(address _mAsset, uint256 _amount) external;

    function depositToPool(address[] calldata _mAssets, uint256[] calldata _percentages) external;
}

interface IBPool {
    function joinswapExternAmountIn(
        address tokenIn,
        uint256 tokenAmountIn,
        uint256 minPoolAmountOut
    ) external returns (uint256 poolAmountOut);

    function swapExactAmountIn(
        address tokenIn,
        uint256 tokenAmountIn,
        address tokenOut,
        uint256 minAmountOut,
        uint256 maxPrice
    ) external returns (uint256 tokenAmountOut, uint256 spotPriceAfter);
}

contract ModuleKeys {
    // Governance
    // ===========
    // keccak256("Governance");
    bytes32 internal constant KEY_GOVERNANCE =
        0x9409903de1e6fd852dfc61c9dacb48196c48535b60e25abf92acc92dd689078d;
    //keccak256("Staking");
    bytes32 internal constant KEY_STAKING =
        0x1df41cd916959d1163dc8f0671a666ea8a3e434c13e40faef527133b5d167034;
    //keccak256("ProxyAdmin");
    bytes32 internal constant KEY_PROXY_ADMIN =
        0x96ed0203eb7e975a4cbcaa23951943fa35c5d8288117d50c12b3d48b0fab48d1;

    // mStable
    // =======
    // keccak256("OracleHub");
    bytes32 internal constant KEY_ORACLE_HUB =
        0x8ae3a082c61a7379e2280f3356a5131507d9829d222d853bfa7c9fe1200dd040;
    // keccak256("Manager");
    bytes32 internal constant KEY_MANAGER =
        0x6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6f;
    //keccak256("Recollateraliser");
    bytes32 internal constant KEY_RECOLLATERALISER =
        0x39e3ed1fc335ce346a8cbe3e64dd525cf22b37f1e2104a755e761c3c1eb4734f;
    //keccak256("MetaToken");
    bytes32 internal constant KEY_META_TOKEN =
        0xea7469b14936af748ee93c53b2fe510b9928edbdccac3963321efca7eb1a57a2;
    // keccak256("SavingsManager");
    bytes32 internal constant KEY_SAVINGS_MANAGER =
        0x12fe936c77a1e196473c4314f3bed8eeac1d757b319abb85bdda70df35511bf1;
    // keccak256("Liquidator");
    bytes32 internal constant KEY_LIQUIDATOR =
        0x1e9cb14d7560734a61fa5ff9273953e971ff3cd9283c03d8346e3264617933d4;
    // keccak256("InterestValidator");
    bytes32 internal constant KEY_INTEREST_VALIDATOR =
        0xc10a28f028c7f7282a03c90608e38a4a646e136e614e4b07d119280c5f7f839f;
}

interface INexus {
    function governor() external view returns (address);

    function getModule(bytes32 key) external view returns (address);

    function proposeModule(bytes32 _key, address _addr) external;

    function cancelProposedModule(bytes32 _key) external;

    function acceptProposedModule(bytes32 _key) external;

    function acceptProposedModules(bytes32[] calldata _keys) external;

    function requestLockModule(bytes32 _key) external;

    function cancelLockModule(bytes32 _key) external;

    function lockModule(bytes32 _key) external;
}

abstract contract ImmutableModule is ModuleKeys {
    INexus public immutable nexus;

    /**
     * @dev Initialization function for upgradable proxy contracts
     * @param _nexus Nexus contract address
     */
    constructor(address _nexus) {
        require(_nexus != address(0), "Nexus address is zero");
        nexus = INexus(_nexus);
    }

    /**
     * @dev Modifier to allow function calls only from the Governor.
     */
    modifier onlyGovernor() {
        _onlyGovernor();
        _;
    }

    function _onlyGovernor() internal view {
        require(msg.sender == _governor(), "Only governor can execute");
    }

    /**
     * @dev Modifier to allow function calls only from the Governance.
     *      Governance is either Governor address or Governance address.
     */
    modifier onlyGovernance() {
        require(
            msg.sender == _governor() || msg.sender == _governance(),
            "Only governance can execute"
        );
        _;
    }

    /**
     * @dev Modifier to allow function calls only from the ProxyAdmin.
     */
    modifier onlyProxyAdmin() {
        require(msg.sender == _proxyAdmin(), "Only ProxyAdmin can execute");
        _;
    }

    /**
     * @dev Modifier to allow function calls only from the Manager.
     */
    modifier onlyManager() {
        require(msg.sender == _manager(), "Only manager can execute");
        _;
    }

    /**
     * @dev Returns Governor address from the Nexus
     * @return Address of Governor Contract
     */
    function _governor() internal view returns (address) {
        return nexus.governor();
    }

    /**
     * @dev Returns Governance Module address from the Nexus
     * @return Address of the Governance (Phase 2)
     */
    function _governance() internal view returns (address) {
        return nexus.getModule(KEY_GOVERNANCE);
    }

    /**
     * @dev Return Staking Module address from the Nexus
     * @return Address of the Staking Module contract
     */
    function _staking() internal view returns (address) {
        return nexus.getModule(KEY_STAKING);
    }

    /**
     * @dev Return ProxyAdmin Module address from the Nexus
     * @return Address of the ProxyAdmin Module contract
     */
    function _proxyAdmin() internal view returns (address) {
        return nexus.getModule(KEY_PROXY_ADMIN);
    }

    /**
     * @dev Return MetaToken Module address from the Nexus
     * @return Address of the MetaToken Module contract
     */
    function _metaToken() internal view returns (address) {
        return nexus.getModule(KEY_META_TOKEN);
    }

    /**
     * @dev Return OracleHub Module address from the Nexus
     * @return Address of the OracleHub Module contract
     */
    function _oracleHub() internal view returns (address) {
        return nexus.getModule(KEY_ORACLE_HUB);
    }

    /**
     * @dev Return Manager Module address from the Nexus
     * @return Address of the Manager Module contract
     */
    function _manager() internal view returns (address) {
        return nexus.getModule(KEY_MANAGER);
    }

    /**
     * @dev Return SavingsManager Module address from the Nexus
     * @return Address of the SavingsManager Module contract
     */
    function _savingsManager() internal view returns (address) {
        return nexus.getModule(KEY_SAVINGS_MANAGER);
    }

    /**
     * @dev Return Recollateraliser Module address from the Nexus
     * @return  Address of the Recollateraliser Module contract (Phase 2)
     */
    function _recollateraliser() internal view returns (address) {
        return nexus.getModule(KEY_RECOLLATERALISER);
    }
}

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

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

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

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

    /**
     * @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 Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @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, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * 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.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @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`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

library SafeERC20 {
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @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).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

/**
 * @title   RevenueRecipient
 * @author  mStable
 * @notice  Simply receives mAssets and then deposits to a pre-defined Balancer
 *          Bpool.
 * @dev     VERSION: 2.0
 *          DATE:    2021-04-06
 */
contract RevenueRecipient is IRevenueRecipient, ImmutableModule {
    using SafeERC20 for IERC20;

    event RevenueReceived(address indexed mAsset, uint256 amountIn);
    event RevenueDeposited(address indexed mAsset, uint256 amountIn, uint256 amountOut);

    // BPT To which all revenue should be deposited
    IBPool public immutable mBPT;
    IERC20 public immutable BAL;

    // Minimum output units per 1e18 input units
    mapping(address => uint256) public minOut;

    /**
     * @dev Creates the RevenueRecipient contract
     * @param _nexus      mStable system Nexus address
     * @param _targetPool Balancer pool to which all revenue should be deposited
     * @param _balToken   Address of $BAL
     * @param _assets     Initial list of supported mAssets
     * @param _minOut     Minimum BPT out per mAsset unit
     */
    constructor(
        address _nexus,
        address _targetPool,
        address _balToken,
        address[] memory _assets,
        uint256[] memory _minOut
    ) ImmutableModule(_nexus) {
        mBPT = IBPool(_targetPool);
        BAL = IERC20(_balToken);
        uint256 len = _assets.length;
        for (uint256 i = 0; i < len; i++) {
            minOut[_assets[i]] = _minOut[i];
            IERC20(_assets[i]).safeApprove(_targetPool, 2**256 - 1);
        }
    }

    /**
     * @dev Simply transfers the mAsset from the sender to here
     * @param _mAsset Address of mAsset
     * @param _amount Units of mAsset collected
     */
    function notifyRedistributionAmount(address _mAsset, uint256 _amount) external override {
        // Transfer from sender to here
        IERC20(_mAsset).safeTransferFrom(msg.sender, address(this), _amount);

        emit RevenueReceived(_mAsset, _amount);
    }

    /**
     * @dev Called by anyone to deposit to the balancer pool
     * @param _mAssets Addresses of assets to deposit
     * @param _percentages 1e18 scaled percentages of the current balance to deposit
     */
    function depositToPool(address[] calldata _mAssets, uint256[] calldata _percentages)
        external
        override
    {
        uint256 len = _mAssets.length;
        require(len > 0 && len == _percentages.length, "Invalid args");

        for (uint256 i = 0; i < len; i++) {
            uint256 pct = _percentages[i];
            require(pct > 1e15 && pct <= 1e18, "Invalid pct");
            address mAsset = _mAssets[i];
            uint256 bal = IERC20(mAsset).balanceOf(address(this));
            // e.g. 1 * 5e17 / 1e18 = 5e17
            uint256 deposit = (bal * pct) / 1e18;
            require(minOut[mAsset] > 0, "Invalid minout");
            uint256 minBPT = (deposit * minOut[mAsset]) / 1e18;
            uint256 poolAmountOut = mBPT.joinswapExternAmountIn(mAsset, deposit, minBPT);

            emit RevenueDeposited(mAsset, deposit, poolAmountOut);
        }
    }

    /**
     * @dev Simply approves spending of a given asset by BPT
     * @param asset Address of asset to approve
     */
    function approveAsset(address asset) external onlyGovernor {
        IERC20(asset).safeApprove(address(mBPT), 0);
        IERC20(asset).safeApprove(address(mBPT), 2**256 - 1);
    }

    /**
     * @dev Sets the minimum amount of BPT to receive for a given asset
     * @param _asset Address of mAsset
     * @param _minOut Scaled amount to receive per 1e18 mAsset units
     */
    function updateAmountOut(address _asset, uint256 _minOut) external onlyGovernor {
        minOut[_asset] = _minOut;
    }

    /**
     * @dev Migrates BPT and BAL to a new revenue recipient
     * @param _recipient Address of recipient
     */
    function migrate(address _recipient) external onlyGovernor {
        IERC20 mBPT_ = IERC20(address(mBPT));
        mBPT_.safeTransfer(_recipient, mBPT_.balanceOf(address(this)));
        BAL.safeTransfer(_recipient, BAL.balanceOf(address(this)));
    }

    /**
     * @dev Reinvests any accrued $BAL tokens back into the pool
     * @param _pool         Address of the bPool to swap into
     * @param _output       Token to receive out of the swap (must be in mBPT)
     * @param _minAmountOut TOTAL amount out for the $BAL -> _output swap
     * @param _maxPrice     MaxPrice for the output (req by bPool)
     * @param _pct          Percentage of all BAL held here to liquidate
     */
    function reinvestBAL(
        address _pool,
        address _output,
        uint256 _minAmountOut,
        uint256 _maxPrice,
        uint256 _pct
    ) external onlyGovernor {
        require(minOut[_output] > 0, "Invalid output");
        require(_pct > 1e15 && _pct <= 1e18, "Invalid pct");
        uint256 balance = BAL.balanceOf(address(this));
        uint256 balDeposit = (balance * _pct) / 1e18;
        // 1. Convert BAL to ETH
        BAL.approve(_pool, balDeposit);
        (uint256 tokenAmountOut, ) =
            IBPool(_pool).swapExactAmountIn(
                address(BAL),
                balDeposit,
                _output,
                _minAmountOut,
                _maxPrice
            );
        // 2. Deposit ETH to mBPT
        uint256 poolAmountOut =
            mBPT.joinswapExternAmountIn(
                _output,
                tokenAmountOut,
                (tokenAmountOut * minOut[_output]) / 1e18
            );

        emit RevenueDeposited(_output, tokenAmountOut, poolAmountOut);
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_nexus","type":"address"},{"internalType":"address","name":"_targetPool","type":"address"},{"internalType":"address","name":"_balToken","type":"address"},{"internalType":"address[]","name":"_assets","type":"address[]"},{"internalType":"uint256[]","name":"_minOut","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"RevenueDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"RevenueReceived","type":"event"},{"inputs":[],"name":"BAL","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"approveAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_mAssets","type":"address[]"},{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"depositToPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mBPT","outputs":[{"internalType":"contract IBPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nexus","outputs":[{"internalType":"contract INexus","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_mAsset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"notifyRedistributionAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_output","type":"address"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"uint256","name":"_maxPrice","type":"uint256"},{"internalType":"uint256","name":"_pct","type":"uint256"}],"name":"reinvestBAL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_minOut","type":"uint256"}],"name":"updateAmountOut","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162001cdb38038062001cdb833981016040819052620000349162000614565b846001600160a01b038116620000915760405162461bcd60e51b815260206004820152601560248201527f4e657875732061646472657373206973207a65726f000000000000000000000060448201526064015b60405180910390fd5b6001600160601b0319606091821b811660805285821b811660a0529084901b1660c052815160005b818110156200019f57828181518110620000e357634e487b7160e01b600052603260045260246000fd5b60200260200101516000808684815181106200010f57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055506200018a866000198684815181106200016457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316620001ac60201b62000bd5179092919060201c565b80620001968162000835565b915050620000b9565b5050505050505062000873565b8015806200023a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015620001fd57600080fd5b505afa15801562000212573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200023891906200073d565b155b620002ae5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000088565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620003069185916200030b16565b505050565b600062000367826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620003e960201b62000d31179092919060201c565b8051909150156200030657808060200190518101906200038891906200071b565b620003065760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000088565b6060620003fa848460008562000404565b90505b9392505050565b606082471015620004675760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000088565b620004728562000540565b620004c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000088565b600080866001600160a01b03168587604051620004de919062000756565b60006040518083038185875af1925050503d80600081146200051d576040519150601f19603f3d011682016040523d82523d6000602084013e62000522565b606091505b509092509050620005358282866200054a565b979650505050505050565b803b15155b919050565b606083156200055b575081620003fd565b8251156200056c5782518084602001fd5b8160405162461bcd60e51b815260040162000088919062000774565b80516001600160a01b03811681146200054557600080fd5b600082601f830112620005b1578081fd5b81516020620005ca620005c483620007dc565b620007a9565b8281528181019085830183850287018401881015620005e7578586fd5b855b858110156200060757815184529284019290840190600101620005e9565b5090979650505050505050565b600080600080600060a086880312156200062c578081fd5b620006378662000588565b945060206200064881880162000588565b9450620006586040880162000588565b60608801519094506001600160401b038082111562000675578384fd5b818901915089601f83011262000689578384fd5b81516200069a620005c482620007dc565b81815284810190848601868402860187018e1015620006b7578788fd5b8795505b83861015620006e457620006cf8162000588565b835260019590950194918601918601620006bb565b5060808c01519097509450505080831115620006fe578384fd5b50506200070e88828901620005a0565b9150509295509295909350565b6000602082840312156200072d578081fd5b81518015158114620003fd578182fd5b6000602082840312156200074f578081fd5b5051919050565b600082516200076a81846020870162000802565b9190910192915050565b60006020825282518060208401526200079581604085016020870162000802565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001600160401b0381118282101715620007d457620007d46200085d565b604052919050565b60006001600160401b03821115620007f857620007f86200085d565b5060209081020190565b60005b838110156200081f57818101518382015260200162000805565b838111156200082f576000848401525b50505050565b60006000198214156200085657634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c60c05160601c6113e3620008f8600039600081816101a20152818161067e0152818161074a015281816107e001528181610b260152610baa01526000818160db015281816104a80152818161088b015281816109ec01528181610a210152610a68015260008181610168015261102001526113e36000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3bd828c11610066578063a3bd828c14610150578063a3f5c1d214610163578063a75995e41461018a578063beeadf161461019d578063ce5494bb146101c45761009e565b80630da13bec146100a35780633a9e5736146100d6578063706d0186146101155780637bf305391461012a5780639fa87ffb1461013d575b600080fd5b6100c36100b1366004611136565b60006020819052908152604090205481565b6040519081526020015b60405180910390f35b6100fd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cd565b6101286101233660046111be565b6101d7565b005b6101286101383660046111e9565b610233565b61012861014b3660046111be565b61058c565b61012861015e36600461116e565b6105b0565b6100fd7f000000000000000000000000000000000000000000000000000000000000000081565b610128610198366004611136565b6109d5565b6100fd7f000000000000000000000000000000000000000000000000000000000000000081565b6101286101d2366004611136565b610a4b565b6101ec6001600160a01b038316333084610d4a565b816001600160a01b03167f10221063d064b7f08df50a7b688426682343e6067582ebc0802467b91b9ac7418260405161022791815260200190565b60405180910390a25050565b82801580159061024257508082145b6102825760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964206172677360a01b60448201526064015b60405180910390fd5b60005b818110156105845760008484838181106102af57634e487b7160e01b600052603260045260246000fd5b90506020020135905066038d7ea4c68000811180156102d65750670de0b6b3a76400008111155b6103105760405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a59081c18dd60aa1b6044820152606401610279565b600087878481811061033257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103479190611136565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a082319060240160206040518083038186803b15801561038c57600080fd5b505afa1580156103a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c49190611272565b90506000670de0b6b3a76400006103db858461131c565b6103e591906112fc565b6001600160a01b03841660009081526020819052604090205490915061043e5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081b5a5b9bdd5d60921b6044820152606401610279565b6001600160a01b038316600090815260208190526040812054670de0b6b3a76400009061046b908461131c565b61047591906112fc565b604051635db3427760e01b81526001600160a01b03868116600483015260248201859052604482018390529192506000917f00000000000000000000000000000000000000000000000000000000000000001690635db3427790606401602060405180830381600087803b1580156104ec57600080fd5b505af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190611272565b60408051858152602081018390529192506001600160a01b038716917f2f22b7f6e7f7df7d0eb3d1a543a2b6eb906e76a03540c2d66d2725270a5f6d31910160405180910390a2505050505050808061057c90611367565b915050610285565b505050505050565b610594610d88565b6001600160a01b03909116600090815260208190526040902055565b6105b8610d88565b6001600160a01b03841660009081526020819052604090205461060e5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081bdd5d1c1d5d60921b6044820152606401610279565b66038d7ea4c680008111801561062c5750670de0b6b3a76400008111155b6106665760405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a59081c18dd60aa1b6044820152606401610279565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156106c857600080fd5b505afa1580156106dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107009190611272565b90506000670de0b6b3a7640000610717848461131c565b61072191906112fc565b60405163095ea7b360e01b81526001600160a01b038981166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b390604401602060405180830381600087803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c89190611252565b50604051638201aa3f60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390528781166044830152606482018790526084820186905260009190891690638201aa3f9060a4016040805180830381600087803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610884919061128a565b50905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635db342778984670de0b6b3a76400006000808e6001600160a01b03166001600160a01b0316815260200190815260200160002054876108f3919061131c565b6108fd91906112fc565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109839190611272565b60408051848152602081018390529192506001600160a01b038a16917f2f22b7f6e7f7df7d0eb3d1a543a2b6eb906e76a03540c2d66d2725270a5f6d31910160405180910390a2505050505050505050565b6109dd610d88565b610a126001600160a01b0382167f00000000000000000000000000000000000000000000000000000000000000006000610bd5565b610a486001600160a01b0382167f0000000000000000000000000000000000000000000000000000000000000000600019610bd5565b50565b610a53610d88565b6040516370a0823160e01b81523060048201527f000000000000000000000000000000000000000000000000000000000000000090610b039083906001600160a01b038416906370a082319060240160206040518083038186803b158015610aba57600080fd5b505afa158015610ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af29190611272565b6001600160a01b0384169190610df2565b6040516370a0823160e01b8152306004820152610bd19083906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b158015610b6857600080fd5b505afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba09190611272565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610df2565b5050565b801580610c5e5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015610c2457600080fd5b505afa158015610c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5c9190611272565b155b610cc95760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610279565b6040516001600160a01b038316602482015260448101829052610d2c90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e22565b505050565b6060610d408484600085610ef4565b90505b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d829085906323b872dd60e01b90608401610cf5565b50505050565b610d9061101c565b6001600160a01b0316336001600160a01b031614610df05760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920676f7665726e6f722063616e2065786563757465000000000000006044820152606401610279565b565b6040516001600160a01b038316602482015260448101829052610d2c90849063a9059cbb60e01b90606401610cf5565b6000610e77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d319092919063ffffffff16565b805190915015610d2c5780806020019051810190610e959190611252565b610d2c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610279565b606082471015610f555760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610279565b843b610fa35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610279565b600080866001600160a01b03168587604051610fbf91906112ad565b60006040518083038185875af1925050503d8060008114610ffc576040519150601f19603f3d011682016040523d82523d6000602084013e611001565b606091505b50915091506110118282866110b4565b979650505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561107757600080fd5b505afa15801561108b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110af9190611152565b905090565b606083156110c3575081610d43565b8251156110d35782518084602001fd5b8160405162461bcd60e51b815260040161027991906112c9565b60008083601f8401126110fe578182fd5b50813567ffffffffffffffff811115611115578182fd5b602083019150836020808302850101111561112f57600080fd5b9250929050565b600060208284031215611147578081fd5b8135610d4381611398565b600060208284031215611163578081fd5b8151610d4381611398565b600080600080600060a08688031215611185578081fd5b853561119081611398565b945060208601356111a081611398565b94979496505050506040830135926060810135926080909101359150565b600080604083850312156111d0578182fd5b82356111db81611398565b946020939093013593505050565b600080600080604085870312156111fe578384fd5b843567ffffffffffffffff80821115611215578586fd5b611221888389016110ed565b90965094506020870135915080821115611239578384fd5b50611246878288016110ed565b95989497509550505050565b600060208284031215611263578081fd5b81518015158114610d43578182fd5b600060208284031215611283578081fd5b5051919050565b6000806040838503121561129c578182fd5b505080516020909101519092909150565b600082516112bf81846020870161133b565b9190910192915050565b60006020825282518060208401526112e881604085016020870161133b565b601f01601f19169190910160400192915050565b60008261131757634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561133657611336611382565b500290565b60005b8381101561135657818101518382015260200161133e565b83811115610d825750506000910152565b600060001982141561137b5761137b611382565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610a4857600080fdfea2646970667358221220568aaa3013d844aa7106826bc4b1ebd246dcce279c2814981e776856e948c57964736f6c63430008020033000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb3000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a10000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e2f2a5c287993345a840db3b0845fbc70f5935a5000000000000000000000000945facb997494cc2570096c74b5f66a3507330a1000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000429d069189e000000000000000000000000000000000000000000000000043c33c193756480000000000000000000000000000000000000000000000000002b5e3af16b18800000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3bd828c11610066578063a3bd828c14610150578063a3f5c1d214610163578063a75995e41461018a578063beeadf161461019d578063ce5494bb146101c45761009e565b80630da13bec146100a35780633a9e5736146100d6578063706d0186146101155780637bf305391461012a5780639fa87ffb1461013d575b600080fd5b6100c36100b1366004611136565b60006020819052908152604090205481565b6040519081526020015b60405180910390f35b6100fd7f000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a1081565b6040516001600160a01b0390911681526020016100cd565b6101286101233660046111be565b6101d7565b005b6101286101383660046111e9565b610233565b61012861014b3660046111be565b61058c565b61012861015e36600461116e565b6105b0565b6100fd7f000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb381565b610128610198366004611136565b6109d5565b6100fd7f000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d81565b6101286101d2366004611136565b610a4b565b6101ec6001600160a01b038316333084610d4a565b816001600160a01b03167f10221063d064b7f08df50a7b688426682343e6067582ebc0802467b91b9ac7418260405161022791815260200190565b60405180910390a25050565b82801580159061024257508082145b6102825760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964206172677360a01b60448201526064015b60405180910390fd5b60005b818110156105845760008484838181106102af57634e487b7160e01b600052603260045260246000fd5b90506020020135905066038d7ea4c68000811180156102d65750670de0b6b3a76400008111155b6103105760405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a59081c18dd60aa1b6044820152606401610279565b600087878481811061033257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103479190611136565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a082319060240160206040518083038186803b15801561038c57600080fd5b505afa1580156103a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c49190611272565b90506000670de0b6b3a76400006103db858461131c565b6103e591906112fc565b6001600160a01b03841660009081526020819052604090205490915061043e5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081b5a5b9bdd5d60921b6044820152606401610279565b6001600160a01b038316600090815260208190526040812054670de0b6b3a76400009061046b908461131c565b61047591906112fc565b604051635db3427760e01b81526001600160a01b03868116600483015260248201859052604482018390529192506000917f000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a101690635db3427790606401602060405180830381600087803b1580156104ec57600080fd5b505af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190611272565b60408051858152602081018390529192506001600160a01b038716917f2f22b7f6e7f7df7d0eb3d1a543a2b6eb906e76a03540c2d66d2725270a5f6d31910160405180910390a2505050505050808061057c90611367565b915050610285565b505050505050565b610594610d88565b6001600160a01b03909116600090815260208190526040902055565b6105b8610d88565b6001600160a01b03841660009081526020819052604090205461060e5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a59081bdd5d1c1d5d60921b6044820152606401610279565b66038d7ea4c680008111801561062c5750670de0b6b3a76400008111155b6106665760405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a59081c18dd60aa1b6044820152606401610279565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d6001600160a01b0316906370a082319060240160206040518083038186803b1580156106c857600080fd5b505afa1580156106dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107009190611272565b90506000670de0b6b3a7640000610717848461131c565b61072191906112fc565b60405163095ea7b360e01b81526001600160a01b038981166004830152602482018390529192507f000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d9091169063095ea7b390604401602060405180830381600087803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c89190611252565b50604051638201aa3f60e01b81526001600160a01b037f000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d81166004830152602482018390528781166044830152606482018790526084820186905260009190891690638201aa3f9060a4016040805180830381600087803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610884919061128a565b50905060007f000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a106001600160a01b0316635db342778984670de0b6b3a76400006000808e6001600160a01b03166001600160a01b0316815260200190815260200160002054876108f3919061131c565b6108fd91906112fc565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109839190611272565b60408051848152602081018390529192506001600160a01b038a16917f2f22b7f6e7f7df7d0eb3d1a543a2b6eb906e76a03540c2d66d2725270a5f6d31910160405180910390a2505050505050505050565b6109dd610d88565b610a126001600160a01b0382167f000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a106000610bd5565b610a486001600160a01b0382167f000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a10600019610bd5565b50565b610a53610d88565b6040516370a0823160e01b81523060048201527f000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a1090610b039083906001600160a01b038416906370a082319060240160206040518083038186803b158015610aba57600080fd5b505afa158015610ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af29190611272565b6001600160a01b0384169190610df2565b6040516370a0823160e01b8152306004820152610bd19083906001600160a01b037f000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d16906370a082319060240160206040518083038186803b158015610b6857600080fd5b505afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba09190611272565b6001600160a01b037f000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d169190610df2565b5050565b801580610c5e5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015610c2457600080fd5b505afa158015610c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5c9190611272565b155b610cc95760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610279565b6040516001600160a01b038316602482015260448101829052610d2c90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e22565b505050565b6060610d408484600085610ef4565b90505b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d829085906323b872dd60e01b90608401610cf5565b50505050565b610d9061101c565b6001600160a01b0316336001600160a01b031614610df05760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920676f7665726e6f722063616e2065786563757465000000000000006044820152606401610279565b565b6040516001600160a01b038316602482015260448101829052610d2c90849063a9059cbb60e01b90606401610cf5565b6000610e77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d319092919063ffffffff16565b805190915015610d2c5780806020019051810190610e959190611252565b610d2c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610279565b606082471015610f555760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610279565b843b610fa35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610279565b600080866001600160a01b03168587604051610fbf91906112ad565b60006040518083038185875af1925050503d8060008114610ffc576040519150601f19603f3d011682016040523d82523d6000602084013e611001565b606091505b50915091506110118282866110b4565b979650505050505050565b60007f000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb36001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561107757600080fd5b505afa15801561108b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110af9190611152565b905090565b606083156110c3575081610d43565b8251156110d35782518084602001fd5b8160405162461bcd60e51b815260040161027991906112c9565b60008083601f8401126110fe578182fd5b50813567ffffffffffffffff811115611115578182fd5b602083019150836020808302850101111561112f57600080fd5b9250929050565b600060208284031215611147578081fd5b8135610d4381611398565b600060208284031215611163578081fd5b8151610d4381611398565b600080600080600060a08688031215611185578081fd5b853561119081611398565b945060208601356111a081611398565b94979496505050506040830135926060810135926080909101359150565b600080604083850312156111d0578182fd5b82356111db81611398565b946020939093013593505050565b600080600080604085870312156111fe578384fd5b843567ffffffffffffffff80821115611215578586fd5b611221888389016110ed565b90965094506020870135915080821115611239578384fd5b50611246878288016110ed565b95989497509550505050565b600060208284031215611263578081fd5b81518015158114610d43578182fd5b600060208284031215611283578081fd5b5051919050565b6000806040838503121561129c578182fd5b505080516020909101519092909150565b600082516112bf81846020870161133b565b9190910192915050565b60006020825282518060208401526112e881604085016020870161133b565b601f01601f19169190910160400192915050565b60008261131757634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561133657611336611382565b500290565b60005b8381101561135657818101518382015260200161133e565b83811115610d825750506000910152565b600060001982141561137b5761137b611382565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610a4857600080fdfea2646970667358221220568aaa3013d844aa7106826bc4b1ebd246dcce279c2814981e776856e948c57964736f6c63430008020033

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

000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb3000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a10000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e2f2a5c287993345a840db3b0845fbc70f5935a5000000000000000000000000945facb997494cc2570096c74b5f66a3507330a1000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000429d069189e000000000000000000000000000000000000000000000000043c33c193756480000000000000000000000000000000000000000000000000002b5e3af16b18800000

-----Decoded View---------------
Arg [0] : _nexus (address): 0xAFcE80b19A8cE13DEc0739a1aaB7A028d6845Eb3
Arg [1] : _targetPool (address): 0xc079E4321ecDc2fD3447BF7db629E0C294FB7A10
Arg [2] : _balToken (address): 0xba100000625a3754423978a60c9317c58a424e3D
Arg [3] : _assets (address[]): 0xe2f2a5C287993345a840Db3B0845fbC70f5935a5,0x945Facb997494CC2570096c74b5F66A3507330a1,0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [4] : _minOut (uint256[]): 300000000000000000,20000000000000000000000,800000000000000000000

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb3
Arg [1] : 000000000000000000000000c079e4321ecdc2fd3447bf7db629e0c294fb7a10
Arg [2] : 000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 000000000000000000000000e2f2a5c287993345a840db3b0845fbc70f5935a5
Arg [7] : 000000000000000000000000945facb997494cc2570096c74b5f66a3507330a1
Arg [8] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [10] : 0000000000000000000000000000000000000000000000000429d069189e0000
Arg [11] : 00000000000000000000000000000000000000000000043c33c1937564800000
Arg [12] : 00000000000000000000000000000000000000000000002b5e3af16b18800000


Deployed Bytecode Sourcemap

20872:5488:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21314:41;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;10301:25:1;;;10289:2;10274:18;21314:41:0;;;;;;;;21193:28;;;;;;;;-1:-1:-1;;;;;3896:32:1;;;3878:51;;3866:2;3851:18;21193:28:0;3833:102:1;22401:267:0;;;;;;:::i;:::-;;:::i;:::-;;22897:905;;;;;;:::i;:::-;;:::i;24332:123::-;;;;;;:::i;:::-;;:::i;25297:1060::-;;;;;;:::i;:::-;;:::i;3119:29::-;;;;;23939:184;;;;;;:::i;:::-;;:::i;21228:27::-;;;;;24589:256;;;;;;:::i;:::-;;:::i;22401:267::-;22541:68;-1:-1:-1;;;;;22541:32:0;;22574:10;22594:4;22601:7;22541:32;:68::i;:::-;22643:7;-1:-1:-1;;;;;22627:33:0;;22652:7;22627:33;;;;10301:25:1;;10289:2;10274:18;;10256:76;22627:33:0;;;;;;;;22401:267;;:::o;22897:905::-;23048:8;23082:7;;;;;:37;;-1:-1:-1;23093:26:0;;;23082:37;23074:62;;;;-1:-1:-1;;;23074:62:0;;7798:2:1;23074:62:0;;;7780:21:1;7837:2;7817:18;;;7810:30;-1:-1:-1;;;7856:18:1;;;7849:42;7908:18;;23074:62:0;;;;;;;;;23154:9;23149:646;23173:3;23169:1;:7;23149:646;;;23198:11;23212:12;;23225:1;23212:15;;;;;-1:-1:-1;;;23212:15:0;;;;;;;;;;;;;;;23198:29;;23256:4;23250:3;:10;:25;;;;;23271:4;23264:3;:11;;23250:25;23242:49;;;;-1:-1:-1;;;23242:49:0;;8840:2:1;23242:49:0;;;8822:21:1;8879:2;8859:18;;;8852:30;-1:-1:-1;;;8898:18:1;;;8891:41;8949:18;;23242:49:0;8812:161:1;23242:49:0;23306:14;23323:8;;23332:1;23323:11;;;;;-1:-1:-1;;;23323:11:0;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23363:39;;-1:-1:-1;;;23363:39:0;;23396:4;23363:39;;;3878:51:1;23306:28:0;;-1:-1:-1;23349:11:0;;-1:-1:-1;;;;;23363:24:0;;;;;3851:18:1;;23363:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23349:53;-1:-1:-1;23461:15:0;23493:4;23480:9;23486:3;23349:53;23480:9;:::i;:::-;23479:18;;;;:::i;:::-;-1:-1:-1;;;;;23520:14:0;;23537:1;23520:14;;;;;;;;;;;23461:36;;-1:-1:-1;23512:45:0;;;;-1:-1:-1;;;23512:45:0;;10014:2:1;23512:45:0;;;9996:21:1;10053:2;10033:18;;;10026:30;-1:-1:-1;;;10072:18:1;;;10065:44;10126:18;;23512:45:0;9986:164:1;23512:45:0;-1:-1:-1;;;;;23600:14:0;;23572;23600;;;;;;;;;;;23618:4;;23590:24;;:7;:24;:::i;:::-;23589:33;;;;:::i;:::-;23661:52;;-1:-1:-1;;;23661:52:0;;-1:-1:-1;;;;;5652:32:1;;;23661:52:0;;;5634:51:1;5701:18;;;5694:34;;;5744:18;;;5737:34;;;23572:50:0;;-1:-1:-1;23637:21:0;;23661:4;:27;;;;5607:18:1;;23661:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23735:48;;;10511:25:1;;;10567:2;10552:18;;10545:34;;;23637:76:0;;-1:-1:-1;;;;;;23735:48:0;;;;;10484:18:1;23735:48:0;;;;;;;23149:646;;;;;;23178:3;;;;;:::i;:::-;;;;23149:646;;;;22897:905;;;;;:::o;24332:123::-;3553:15;:13;:15::i;:::-;-1:-1:-1;;;;;24423:14:0;;::::1;:6;:14:::0;;;::::1;::::0;;;;;;:24;24332:123::o;25297:1060::-;3553:15;:13;:15::i;:::-;-1:-1:-1;;;;;25499:15:0;::::1;25517:1;25499:15:::0;;;::::1;::::0;;;;;;;25491:46:::1;;;::::0;-1:-1:-1;;;25491:46:0;;8139:2:1;25491:46:0::1;::::0;::::1;8121:21:1::0;8178:2;8158:18;;;8151:30;-1:-1:-1;;;8197:18:1;;;8190:44;8251:18;;25491:46:0::1;8111:164:1::0;25491:46:0::1;25563:4;25556;:11;:27;;;;;25579:4;25571;:12;;25556:27;25548:51;;;::::0;-1:-1:-1;;;25548:51:0;;8840:2:1;25548:51:0::1;::::0;::::1;8822:21:1::0;8879:2;8859:18;;;8852:30;-1:-1:-1;;;8898:18:1;;;8891:41;8949:18;;25548:51:0::1;8812:161:1::0;25548:51:0::1;25628:28;::::0;-1:-1:-1;;;25628:28:0;;25650:4:::1;25628:28;::::0;::::1;3878:51:1::0;25610:15:0::1;::::0;25628:3:::1;-1:-1:-1::0;;;;;25628:13:0::1;::::0;::::1;::::0;3851:18:1;;25628:28:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;25610:46:::0;-1:-1:-1;25667:18:0::1;25707:4;25689:14;25699:4:::0;25610:46;25689:14:::1;:::i;:::-;25688:23;;;;:::i;:::-;25756:30;::::0;-1:-1:-1;;;25756:30:0;;-1:-1:-1;;;;;4821:32:1;;;25756:30:0::1;::::0;::::1;4803:51:1::0;4870:18;;;4863:34;;;25667:44:0;;-1:-1:-1;25756:3:0::1;:11:::0;;::::1;::::0;::::1;::::0;4776:18:1;;25756:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;25839:192:0::1;::::0;-1:-1:-1;;;25839:192:0;;-1:-1:-1;;;;;25897:3:0::1;5223:15:1::0;;25839:192:0::1;::::0;::::1;5205:34:1::0;5255:18;;;5248:34;;;5318:15;;;5298:18;;;5291:43;5350:18;;;5343:34;;;5393:19;;;5386:35;;;-1:-1:-1;;25839:31:0;;::::1;::::0;::::1;::::0;5139:19:1;;25839:192:0::1;::::0;::::1;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;25797:234;;;26077:21;26114:4;-1:-1:-1::0;;;;;26114:27:0::1;;26160:7;26186:14;26256:4;26237:6;:15:::0;26244:7:::1;-1:-1:-1::0;;;;;26237:15:0::1;-1:-1:-1::0;;;;;26237:15:0::1;;;;;;;;;;;;;26220:14;:32;;;;:::i;:::-;26219:41;;;;:::i;:::-;26114:161;::::0;-1:-1:-1;;;;;;26114:161:0::1;::::0;;;;;;-1:-1:-1;;;;;5652:32:1;;;26114:161:0::1;::::0;::::1;5634:51:1::0;5701:18;;;5694:34;;;;5744:18;;;5737:34;5607:18;;26114:161:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26293:56;::::0;;10511:25:1;;;10567:2;10552:18;;10545:34;;;26077:198:0;;-1:-1:-1;;;;;;26293:56:0;::::1;::::0;::::1;::::0;10484:18:1;26293:56:0::1;;;;;;;3579:1;;;;25297:1060:::0;;;;;:::o;23939:184::-;3553:15;:13;:15::i;:::-;24009:43:::1;-1:-1:-1::0;;;;;24009:25:0;::::1;24043:4;24050:1;24009:25;:43::i;:::-;24063:52;-1:-1:-1::0;;;;;24063:25:0;::::1;24097:4;-1:-1:-1::0;;24063:25:0::1;:52::i;:::-;23939:184:::0;:::o;24589:256::-;3553:15;:13;:15::i;:::-;24737:30:::1;::::0;-1:-1:-1;;;24737:30:0;;24761:4:::1;24737:30;::::0;::::1;3878:51:1::0;24689:4:0::1;::::0;24706:62:::1;::::0;24725:10;;-1:-1:-1;;;;;24737:15:0;::::1;::::0;::::1;::::0;3851:18:1;;24737:30:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;24706:18:0;::::1;::::0;:62;:18:::1;:62::i;:::-;24808:28;::::0;-1:-1:-1;;;24808:28:0;;24830:4:::1;24808:28;::::0;::::1;3878:51:1::0;24779:58:0::1;::::0;24796:10;;-1:-1:-1;;;;;24808:3:0::1;:13;::::0;::::1;::::0;3851:18:1;;24808:28:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;24779:3:0::1;:16;::::0;:58;:16:::1;:58::i;:::-;3579:1;24589:256:::0;:::o;18108:622::-;18478:10;;;18477:62;;-1:-1:-1;18494:39:0;;-1:-1:-1;;;18494:39:0;;18518:4;18494:39;;;4152:34:1;-1:-1:-1;;;;;4222:15:1;;;4202:18;;;4195:43;18494:15:0;;;;;4087:18:1;;18494:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;18477:62;18469:152;;;;-1:-1:-1;;;18469:152:0;;9591:2:1;18469:152:0;;;9573:21:1;9630:2;9610:18;;;9603:30;9669:34;9649:18;;;9642:62;-1:-1:-1;;;9720:18:1;;;9713:52;9782:19;;18469:152:0;9563:244:1;18469:152:0;18659:62;;-1:-1:-1;;;;;4821:32:1;;18659:62:0;;;4803:51:1;4870:18;;;4863:34;;;18632:90:0;;18652:5;;-1:-1:-1;;;18682:22:0;4776:18:1;;18659:62:0;;;;-1:-1:-1;;18659:62:0;;;;;;;;;;;;;;-1:-1:-1;;;;;18659:62:0;-1:-1:-1;;;;;;18659:62:0;;;;;;;;;;18632:19;:90::i;:::-;18108:622;;;:::o;13049:195::-;13152:12;13184:52;13206:6;13214:4;13220:1;13223:12;13184:21;:52::i;:::-;13177:59;;13049:195;;;;;;:::o;17634:205::-;17762:68;;-1:-1:-1;;;;;4507:15:1;;;17762:68:0;;;4489:34:1;4559:15;;4539:18;;;4532:43;4591:18;;;4584:34;;;17735:96:0;;17755:5;;-1:-1:-1;;;17785:27:0;4424:18:1;;17762:68:0;4406:218:1;17735:96:0;17634:205;;;;:::o;3596:121::-;3668:11;:9;:11::i;:::-;-1:-1:-1;;;;;3654:25:0;:10;-1:-1:-1;;;;;3654:25:0;;3646:63;;;;-1:-1:-1;;;3646:63:0;;7444:2:1;3646:63:0;;;7426:21:1;7483:2;7463:18;;;7456:30;7522:27;7502:18;;;7495:55;7567:18;;3646:63:0;7416:175:1;3646:63:0;3596:121::o;17449:177::-;17559:58;;-1:-1:-1;;;;;4821:32:1;;17559:58:0;;;4803:51:1;4870:18;;;4863:34;;;17532:86:0;;17552:5;;-1:-1:-1;;;17582:23:0;4776:18:1;;17559:58:0;4758:145:1;19883:761:0;20307:23;20333:69;20361:4;20333:69;;;;;;;;;;;;;;;;;20341:5;-1:-1:-1;;;;;20333:27:0;;;:69;;;;;:::i;:::-;20417:17;;20307:95;;-1:-1:-1;20417:21:0;20413:224;;20559:10;20548:30;;;;;;;;;;;;:::i;:::-;20540:85;;;;-1:-1:-1;;;20540:85:0;;9180:2:1;20540:85:0;;;9162:21:1;9219:2;9199:18;;;9192:30;9258:34;9238:18;;;9231:62;-1:-1:-1;;;9309:18:1;;;9302:40;9359:19;;20540:85:0;9152:232:1;14101:530:0;14228:12;14286:5;14261:21;:30;;14253:81;;;;-1:-1:-1;;;14253:81:0;;7037:2:1;14253:81:0;;;7019:21:1;7076:2;7056:18;;;7049:30;7115:34;7095:18;;;7088:62;-1:-1:-1;;;7166:18:1;;;7159:36;7212:19;;14253:81:0;7009:228:1;14253:81:0;10498:20;;14345:60;;;;-1:-1:-1;;;14345:60:0;;8482:2:1;14345:60:0;;;8464:21:1;8521:2;8501:18;;;8494:30;8560:31;8540:18;;;8533:59;8609:18;;14345:60:0;8454:179:1;14345:60:0;14479:12;14493:23;14520:6;-1:-1:-1;;;;;14520:11:0;14540:5;14548:4;14520:33;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14478:75;;;;14571:52;14589:7;14598:10;14610:12;14571:17;:52::i;:::-;14564:59;14101:530;-1:-1:-1;;;;;;;14101:530:0:o;4635:95::-;4679:7;4706:5;-1:-1:-1;;;;;4706:14:0;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4699:23;;4635:95;:::o;16641:742::-;16756:12;16785:7;16781:595;;;-1:-1:-1;16816:10:0;16809:17;;16781:595;16930:17;;:21;16926:439;;17193:10;17187:17;17254:15;17241:10;17237:2;17233:19;17226:44;17141:148;17336:12;17329:20;;-1:-1:-1;;;17329:20:0;;;;;;;;:::i;14:398:1:-;;;141:3;134:4;126:6;122:17;118:27;108:2;;166:8;156;149:26;108:2;-1:-1:-1;196:20:1;;239:18;228:30;;225:2;;;278:8;268;261:26;225:2;322:4;314:6;310:17;298:29;;385:3;378:4;370;362:6;358:17;350:6;346:30;342:41;339:50;336:2;;;402:1;399;392:12;336:2;98:314;;;;;:::o;417:257::-;;529:2;517:9;508:7;504:23;500:32;497:2;;;550:6;542;535:22;497:2;594:9;581:23;613:31;638:5;613:31;:::i;679:261::-;;802:2;790:9;781:7;777:23;773:32;770:2;;;823:6;815;808:22;770:2;860:9;854:16;879:31;904:5;879:31;:::i;945:604::-;;;;;;1125:3;1113:9;1104:7;1100:23;1096:33;1093:2;;;1147:6;1139;1132:22;1093:2;1191:9;1178:23;1210:31;1235:5;1210:31;:::i;:::-;1260:5;-1:-1:-1;1317:2:1;1302:18;;1289:32;1330:33;1289:32;1330:33;:::i;:::-;1083:466;;1382:7;;-1:-1:-1;;;;1436:2:1;1421:18;;1408:32;;1487:2;1472:18;;1459:32;;1538:3;1523:19;;;1510:33;;-1:-1:-1;1083:466:1:o;1554:325::-;;;1683:2;1671:9;1662:7;1658:23;1654:32;1651:2;;;1704:6;1696;1689:22;1651:2;1748:9;1735:23;1767:31;1792:5;1767:31;:::i;:::-;1817:5;1869:2;1854:18;;;;1841:32;;-1:-1:-1;;;1641:238:1:o;1884:803::-;;;;;2083:2;2071:9;2062:7;2058:23;2054:32;2051:2;;;2104:6;2096;2089:22;2051:2;2149:9;2136:23;2178:18;2219:2;2211:6;2208:14;2205:2;;;2240:6;2232;2225:22;2205:2;2284:70;2346:7;2337:6;2326:9;2322:22;2284:70;:::i;:::-;2373:8;;-1:-1:-1;2258:96:1;-1:-1:-1;2461:2:1;2446:18;;2433:32;;-1:-1:-1;2477:16:1;;;2474:2;;;2511:6;2503;2496:22;2474:2;;2555:72;2619:7;2608:8;2597:9;2593:24;2555:72;:::i;:::-;2041:646;;;;-1:-1:-1;2646:8:1;-1:-1:-1;;;;2041:646:1:o;2692:297::-;;2812:2;2800:9;2791:7;2787:23;2783:32;2780:2;;;2833:6;2825;2818:22;2780:2;2870:9;2864:16;2923:5;2916:13;2909:21;2902:5;2899:32;2889:2;;2950:6;2942;2935:22;2994:194;;3117:2;3105:9;3096:7;3092:23;3088:32;3085:2;;;3138:6;3130;3123:22;3085:2;-1:-1:-1;3166:16:1;;3075:113;-1:-1:-1;3075:113:1:o;3193:255::-;;;3333:2;3321:9;3312:7;3308:23;3304:32;3301:2;;;3354:6;3346;3339:22;3301:2;-1:-1:-1;;3382:16:1;;3438:2;3423:18;;;3417:25;3382:16;;3417:25;;-1:-1:-1;3291:157:1:o;3453:274::-;;3620:6;3614:13;3636:53;3682:6;3677:3;3670:4;3662:6;3658:17;3636:53;:::i;:::-;3705:16;;;;;3590:137;-1:-1:-1;;3590:137:1:o;6447:383::-;;6596:2;6585:9;6578:21;6628:6;6622:13;6671:6;6666:2;6655:9;6651:18;6644:34;6687:66;6746:6;6741:2;6730:9;6726:18;6721:2;6713:6;6709:15;6687:66;:::i;:::-;6814:2;6793:15;-1:-1:-1;;6789:29:1;6774:45;;;;6821:2;6770:54;;6568:262;-1:-1:-1;;6568:262:1:o;10590:217::-;;10656:1;10646:2;;-1:-1:-1;;;10681:31:1;;10735:4;10732:1;10725:15;10763:4;10688:1;10753:15;10646:2;-1:-1:-1;10792:9:1;;10636:171::o;10812:168::-;;10918:1;10914;10910:6;10906:14;10903:1;10900:21;10895:1;10888:9;10881:17;10877:45;10874:2;;;10925:18;;:::i;:::-;-1:-1:-1;10965:9:1;;10864:116::o;10985:258::-;11057:1;11067:113;11081:6;11078:1;11075:13;11067:113;;;11157:11;;;11151:18;11138:11;;;11131:39;11103:2;11096:10;11067:113;;;11198:6;11195:1;11192:13;11189:2;;;-1:-1:-1;;11233:1:1;11215:16;;11208:27;11038:205::o;11248:135::-;;-1:-1:-1;;11308:17:1;;11305:2;;;11328:18;;:::i;:::-;-1:-1:-1;11375:1:1;11364:13;;11295:88::o;11388:127::-;11449:10;11444:3;11440:20;11437:1;11430:31;11480:4;11477:1;11470:15;11504:4;11501:1;11494:15;11520:131;-1:-1:-1;;;;;11595:31:1;;11585:42;;11575:2;;11641:1;11638;11631:12

Swarm Source

ipfs://568aaa3013d844aa7106826bc4b1ebd246dcce279c2814981e776856e948c579

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.