Contract 0x996DA299Fb8247dbc2ef45299b62B897d89C01D4

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1de629c328a6603f523b67a2c369c7b51c71c2f68c159e42ce47018eb3742e4dCollect Reward33812262021-11-27 15:09:56179 days 23 hrs ago0xc3be023a8cf8f47cd29245f894e217e08007ca7a IN  0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH0.000887485933 ETH
0xd0cbc1cbffec80bcf1d657fb3acbb4d5fd1783df8acb894b86ad92e02fc95b12Collect Reward33812042021-11-27 15:09:16179 days 23 hrs agoCAP Finance: Deployer IN  0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH0.000681178315 ETH
0x9ca140cd7c8fab3f79d4bf5f06c5378d47267296ecad57d436b18ef9e966a864Set Router31090302021-11-17 17:06:05189 days 21 hrs agoCAP Finance: Deployer IN  0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH0.001656041026 ETH
0x040fe3bb81cc98daa73f770183d324e9b2ddb9ed6e369f01284834799d662e6e0x6080604031089342021-11-17 17:02:16189 days 21 hrs agoCAP Finance: Deployer IN  Contract Creation0 ETH0.013787884612 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x2cb99100400bd76c1dfac4bf21f0d7a7bd607bcec670b3bfe12158f53a507c1434760862021-12-01 2:31:22176 days 12 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x2cb99100400bd76c1dfac4bf21f0d7a7bd607bcec670b3bfe12158f53a507c1434760862021-12-01 2:31:22176 days 12 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x2cb99100400bd76c1dfac4bf21f0d7a7bd607bcec670b3bfe12158f53a507c1434760862021-12-01 2:31:22176 days 12 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 CAP Finance: Trading0 ETH
0x2cb99100400bd76c1dfac4bf21f0d7a7bd607bcec670b3bfe12158f53a507c1434760862021-12-01 2:31:22176 days 12 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0x2cb99100400bd76c1dfac4bf21f0d7a7bd607bcec670b3bfe12158f53a507c1434760862021-12-01 2:31:22176 days 12 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0xac549ca589020f7898356eef0b0bc6c8ac5697fa0417ecfb3accf1d3abca004c33982882021-11-28 7:50:21179 days 7 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0xac549ca589020f7898356eef0b0bc6c8ac5697fa0417ecfb3accf1d3abca004c33982882021-11-28 7:50:21179 days 7 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0xac549ca589020f7898356eef0b0bc6c8ac5697fa0417ecfb3accf1d3abca004c33982882021-11-28 7:50:21179 days 7 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 CAP Finance: Trading0 ETH
0xac549ca589020f7898356eef0b0bc6c8ac5697fa0417ecfb3accf1d3abca004c33982882021-11-28 7:50:21179 days 7 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0xac549ca589020f7898356eef0b0bc6c8ac5697fa0417ecfb3accf1d3abca004c33982882021-11-28 7:50:21179 days 7 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0x60010143a133d03ce59ea18c88ffbfcd5310a00e517017f7a78d3eb8acdf225433875152021-11-27 21:24:32179 days 17 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x60010143a133d03ce59ea18c88ffbfcd5310a00e517017f7a78d3eb8acdf225433875152021-11-27 21:24:32179 days 17 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x60010143a133d03ce59ea18c88ffbfcd5310a00e517017f7a78d3eb8acdf225433875152021-11-27 21:24:32179 days 17 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 CAP Finance: Trading0 ETH
0x60010143a133d03ce59ea18c88ffbfcd5310a00e517017f7a78d3eb8acdf225433875152021-11-27 21:24:32179 days 17 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0x60010143a133d03ce59ea18c88ffbfcd5310a00e517017f7a78d3eb8acdf225433875152021-11-27 21:24:32179 days 17 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0x335b50dbba046a2d85d26b831ded8bfa5567bb9899e3203b8fb653b8b51fc04933812312021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x335b50dbba046a2d85d26b831ded8bfa5567bb9899e3203b8fb653b8b51fc04933812312021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x335b50dbba046a2d85d26b831ded8bfa5567bb9899e3203b8fb653b8b51fc04933812312021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 CAP Finance: Trading0 ETH
0x335b50dbba046a2d85d26b831ded8bfa5567bb9899e3203b8fb653b8b51fc04933812312021-11-27 15:09:56179 days 23 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0x335b50dbba046a2d85d26b831ded8bfa5567bb9899e3203b8fb653b8b51fc04933812312021-11-27 15:09:56179 days 23 hrs ago 0x07b0b00b9008798055071dde6f2d343782b35dc6 0x996da299fb8247dbc2ef45299b62b897d89c01d40 ETH
0x1de629c328a6603f523b67a2c369c7b51c71c2f68c159e42ce47018eb3742e4d33812262021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x1efb3f88bc88f03fd1804a5c53b7141bbef5ded80 ETH
0x1de629c328a6603f523b67a2c369c7b51c71c2f68c159e42ce47018eb3742e4d33812262021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0xff970a61a04b1ca14834a43f5de4533ebddb5cc80 ETH
0x1de629c328a6603f523b67a2c369c7b51c71c2f68c159e42ce47018eb3742e4d33812262021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 CAP Finance: Router0 ETH
0x1de629c328a6603f523b67a2c369c7b51c71c2f68c159e42ce47018eb3742e4d33812262021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
0x1de629c328a6603f523b67a2c369c7b51c71c2f68c159e42ce47018eb3742e4d33812262021-11-27 15:09:56179 days 23 hrs ago 0x996da299fb8247dbc2ef45299b62b897d89c01d4 0x07b0b00b9008798055071dde6f2d343782b35dc60 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x9190338f23bE9024A9F9628E44cd169926fE7795

Contract Name:
Rewards

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, BSD-3-Clause license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan on 2021-11-19
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @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;
        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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 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 {
    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'
        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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
interface IRouter {
    function trading() external view returns (address);

    function capPool() external view returns (address);

    function oracle() external view returns (address);

    function treasury() external view returns (address);

    function darkOracle() external view returns (address);

    function isSupportedCurrency(address currency) external view returns (bool);

    function currencies(uint256 index) external view returns (address);

    function currenciesLength() external view returns (uint256);

    function getDecimals(address currency) external view returns(uint8);

    function getPool(address currency) external view returns (address);

    function getPoolShare(address currency) external view returns(uint256);

    function getCapShare(address currency) external view returns(uint256);

    function getPoolRewards(address currency) external view returns (address);

    function getCapRewards(address currency) external view returns (address);
}
interface ITrading {

    function distributeFees(address currency) external;
    
    function settleOrder(address user, bytes32 productId, address currency, bool isLong, uint256 price) external;

    function liquidatePosition(address user, bytes32 productId, address currency, bool isLong, uint256 price) external;

    function getPendingFee(address currency) external view returns(uint256);
    
}
interface IPool {
    function totalSupply() external view returns (uint256);

    function creditUserProfit(address destination, uint256 amount) external;
    
    function updateOpenInterest(uint256 amount, bool isDecrease) external;

    function getUtilization() external view returns (uint256);

    function getBalance(address account) external view returns (uint256);

}
contract Rewards {

	using SafeERC20 for IERC20; 
    using Address for address payable;

    address public owner;
	address public router;
	address public trading;
	address public treasury;

	address public pool; // pool contract associated with these rewards
	address public currency; // rewards paid in this

	uint256 public cumulativeRewardPerTokenStored;
	uint256 public pendingReward;

	mapping(address => uint256) private claimableReward;
	mapping(address => uint256) private previousRewardPerToken;

	uint256 public constant UNIT = 10**18;

	event CollectedReward(
		address user,
		address poolContract,
		address currency,
		uint256 amount
	);

	constructor(address _pool, address _currency) {
		owner = msg.sender;
		pool = _pool;
		currency = _currency;
	}

	// Governance methods

	function setOwner(address newOwner) external onlyOwner {
		owner = newOwner;
	}

	function setRouter(address _router) external onlyOwner {
		router = _router;
		trading = IRouter(router).trading();
		treasury = IRouter(router).treasury();
	}

	// Methods

	function notifyRewardReceived(uint256 amount) external onlyTreasuryOrPool {
		pendingReward += amount; // 18 decimals
	}

	function updateRewards(address account) public {

		if (account == address(0)) return;

		ITrading(trading).distributeFees(currency);

		uint256 supply = IPool(pool).totalSupply();

		if (supply > 0) {
			cumulativeRewardPerTokenStored += pendingReward * UNIT / supply;
			pendingReward = 0;
		}

		if (cumulativeRewardPerTokenStored == 0) return; // no rewards yet

		uint256 accountBalance = IPool(pool).getBalance(account); // in CLP

		claimableReward[account] += accountBalance * (cumulativeRewardPerTokenStored - previousRewardPerToken[account]) / UNIT;
		previousRewardPerToken[account] = cumulativeRewardPerTokenStored;

	}

	function collectReward() external {

		updateRewards(msg.sender);

		uint256 rewardToSend = claimableReward[msg.sender];
		claimableReward[msg.sender] = 0;

		if (rewardToSend > 0) {

			_transferOut(msg.sender, rewardToSend);

			emit CollectedReward(
				msg.sender, 
				pool, 
				currency, 
				rewardToSend
			);

		}

	}

	function getClaimableReward() external view returns(uint256) {

		uint256 currentClaimableReward = claimableReward[msg.sender];

		uint256 supply = IPool(pool).totalSupply();
		if (supply == 0) return currentClaimableReward;

		uint256 share;
		if (pool == IRouter(router).capPool()) {
			share = IRouter(router).getCapShare(currency);
		} else {
			share = IRouter(router).getPoolShare(currency);
		}

		uint256 _pendingReward = pendingReward + ITrading(trading).getPendingFee(currency) * share / 10**4;

		uint256 _rewardPerTokenStored = cumulativeRewardPerTokenStored + _pendingReward * UNIT / supply;
		if (_rewardPerTokenStored == 0) return currentClaimableReward; // no rewards yet

		uint256 accountStakedBalance = IPool(pool).getBalance(msg.sender);

		return currentClaimableReward + accountStakedBalance * (_rewardPerTokenStored - previousRewardPerToken[msg.sender]) / UNIT;
		
	}

	// To receive ETH
	fallback() external payable {}
	receive() external payable {}

	// Utils

	function _transferOut(address to, uint256 amount) internal {
		if (amount == 0 || to == address(0)) return;
		// adjust decimals
		uint256 decimals = IRouter(router).getDecimals(currency);
		amount = amount * (10**decimals) / UNIT;
		if (currency == address(0)) {
			payable(to).sendValue(amount);
		} else {
			IERC20(currency).safeTransfer(to, amount);
		}
	}

	modifier onlyOwner() {
		require(msg.sender == owner, "!owner");
		_;
	}

	modifier onlyTreasuryOrPool() {
		require(msg.sender == treasury || msg.sender == pool, "!treasury|pool");
		_;
	}

}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_currency","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"poolContract","type":"address"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CollectedReward","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cumulativeRewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currency","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyRewardReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trading","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"updateRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5060405161146d38038061146d83398101604081905261002f91610087565b600080546001600160a01b03199081163317909155600480546001600160a01b03948516908316179055600580549290931691161790556100ba565b80516001600160a01b038116811461008257600080fd5b919050565b6000806040838503121561009a57600080fd5b6100a38361006b565b91506100b16020840161006b565b90509250929050565b6113a4806100c96000396000f3fe6080604052600436106100e05760003560e01c8063835c284011610084578063e38a195b11610056578063e38a195b14610246578063e5a6b10f14610266578063ec44acf214610286578063f887ea40146102a657005b8063835c2840146101d45780638da5cb5b146101ea5780639d8e21771461020a578063c0d786551461022657005b806354c5aee1116100bd57806354c5aee11461016a5780635fd619651461017f57806361d027b31461019f578063706b3f5e146101bf57005b8063137ee36e146100e957806313af40351461011257806316f0115b1461013257005b366100e757005b005b3480156100f557600080fd5b506100ff60075481565b6040519081526020015b60405180910390f35b34801561011e57600080fd5b506100e761012d3660046110b6565b6102c6565b34801561013e57600080fd5b50600454610152906001600160a01b031681565b6040516001600160a01b039091168152602001610109565b34801561017657600080fd5b506100e7610330565b34801561018b57600080fd5b506100e761019a3660046110b6565b6103b8565b3480156101ab57600080fd5b50600354610152906001600160a01b031681565b3480156101cb57600080fd5b506100ff61061d565b3480156101e057600080fd5b506100ff60065481565b3480156101f657600080fd5b50600054610152906001600160a01b031681565b34801561021657600080fd5b506100ff670de0b6b3a764000081565b34801561023257600080fd5b506100e76102413660046110b6565b610a09565b34801561025257600080fd5b506100e7610261366004611112565b610b8c565b34801561027257600080fd5b50600554610152906001600160a01b031681565b34801561029257600080fd5b50600254610152906001600160a01b031681565b3480156102b257600080fd5b50600154610152906001600160a01b031681565b6000546001600160a01b0316331461030e5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610339336103b8565b336000908152600860205260408120805491905580156103b55761035d3382610c06565b600454600554604080513381526001600160a01b039384166020820152929091168282015260608201839052517f410fbfeefd5674942d8b9a1d30761d24614530363f87dc95a0f83c73f168b8999181900360800190a15b50565b6001600160a01b0381166103c95750565b600254600554604051632504fc9760e21b81526001600160a01b039182166004820152911690639413f25c90602401600060405180830381600087803b15801561041257600080fd5b505af1158015610426573d6000803e3d6000fd5b505050506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047a57600080fd5b505afa15801561048e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b2919061112b565b905080156104f75780670de0b6b3a76400006007546104d191906112dd565b6104db91906111ce565b600660008282546104ec91906111b6565b909155505060006007555b600654610502575050565b6004805460405163f8b2cb4f60e01b81526001600160a01b03858116938201939093526000929091169063f8b2cb4f9060240160206040518083038186803b15801561054d57600080fd5b505afa158015610561573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610585919061112b565b6001600160a01b038416600090815260096020526040902054600654919250670de0b6b3a7640000916105b891906112fc565b6105c290836112dd565b6105cc91906111ce565b6001600160a01b038416600090815260086020526040812080549091906105f49084906111b6565b90915550506006546001600160a01b039093166000908152600960205260409020929092555050565b336000908152600860209081526040808320546004805483516318160ddd60e01b81529351929486946001600160a01b03909216936318160ddd9383810193829003018186803b15801561067057600080fd5b505afa158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a8919061112b565b9050806106b55750919050565b60015460408051630489cce360e51b815290516000926001600160a01b0316916391399c60916004808301926020929190829003018186803b1580156106fa57600080fd5b505afa15801561070e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073291906110d3565b6004546001600160a01b03908116911614156107ce57600154600554604051630bba0caf60e31b81526001600160a01b039182166004820152911690635dd065789060240160206040518083038186803b15801561078f57600080fd5b505afa1580156107a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c7919061112b565b9050610850565b6001546005546040516357a78bcb60e11b81526001600160a01b03918216600482015291169063af4f17969060240160206040518083038186803b15801561081557600080fd5b505afa158015610829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084d919061112b565b90505b6002546005546040516364b9380d60e11b81526001600160a01b03918216600482015260009261271092859291169063c972701a9060240160206040518083038186803b1580156108a057600080fd5b505afa1580156108b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d8919061112b565b6108e291906112dd565b6108ec91906111ce565b6007546108f991906111b6565b9050600083610910670de0b6b3a7640000846112dd565b61091a91906111ce565b60065461092791906111b6565b905080610938575092949350505050565b6004805460405163f8b2cb4f60e01b815233928101929092526000916001600160a01b039091169063f8b2cb4f9060240160206040518083038186803b15801561098157600080fd5b505afa158015610995573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b9919061112b565b33600090815260096020526040902054909150670de0b6b3a7640000906109e090846112fc565b6109ea90836112dd565b6109f491906111ce565b6109fe90876111b6565b965050505050505090565b6000546001600160a01b03163314610a4c5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610305565b600180546001600160a01b0319166001600160a01b03831690811790915560408051637622567960e11b8152905163ec44acf291600480820192602092909190829003018186803b158015610aa057600080fd5b505afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad891906110d3565b600280546001600160a01b0319166001600160a01b03928316179055600154604080516361d027b360e01b8152905191909216916361d027b3916004808301926020929190829003018186803b158015610b3157600080fd5b505afa158015610b45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6991906110d3565b600380546001600160a01b0319166001600160a01b039290921691909117905550565b6003546001600160a01b0316331480610baf57506004546001600160a01b031633145b610bec5760405162461bcd60e51b815260206004820152600e60248201526d085d1c99585cdd5c9e5f1c1bdbdb60921b6044820152606401610305565b8060076000828254610bfe91906111b6565b909155505050565b801580610c1a57506001600160a01b038216155b15610c23575050565b60015460055460405163067aa55560e51b81526001600160a01b039182166004820152600092919091169063cf54aaa09060240160206040518083038186803b158015610c6f57600080fd5b505afa158015610c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca79190611144565b60ff169050670de0b6b3a7640000610cc082600a611233565b610cca90846112dd565b610cd491906111ce565b6005549092506001600160a01b0316610cff57610cfa6001600160a01b03841683610d16565b505050565b600554610cfa906001600160a01b03168484610e2f565b80471015610d665760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610305565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610db3576040519150601f19603f3d011682016040523d82523d6000602084013e610db8565b606091505b5050905080610cfa5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610305565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610cfa92869291600091610ebf918516908490610f3c565b805190915015610cfa5780806020019051810190610edd91906110f0565b610cfa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610305565b6060610f4b8484600085610f55565b90505b9392505050565b606082471015610fb65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610305565b843b6110045760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610305565b600080866001600160a01b031685876040516110209190611167565b60006040518083038185875af1925050503d806000811461105d576040519150601f19603f3d011682016040523d82523d6000602084013e611062565b606091505b509150915061107282828661107d565b979650505050505050565b6060831561108c575081610f4e565b82511561109c5782518084602001fd5b8160405162461bcd60e51b81526004016103059190611183565b6000602082840312156110c857600080fd5b8135610f4e81611359565b6000602082840312156110e557600080fd5b8151610f4e81611359565b60006020828403121561110257600080fd5b81518015158114610f4e57600080fd5b60006020828403121561112457600080fd5b5035919050565b60006020828403121561113d57600080fd5b5051919050565b60006020828403121561115657600080fd5b815160ff81168114610f4e57600080fd5b60008251611179818460208701611313565b9190910192915050565b60208152600082518060208401526111a2816040850160208701611313565b601f01601f19169190910160400192915050565b600082198211156111c9576111c9611343565b500190565b6000826111eb57634e487b7160e01b600052601260045260246000fd5b500490565b600181815b8085111561122b57816000190482111561121157611211611343565b8085161561121e57918102915b93841c93908002906111f5565b509250929050565b6000610f4e8383600082611249575060016112d7565b81611256575060006112d7565b816001811461126c576002811461127657611292565b60019150506112d7565b60ff84111561128757611287611343565b50506001821b6112d7565b5060208310610133831016604e8410600b84101617156112b5575081810a6112d7565b6112bf83836111f0565b80600019048211156112d3576112d3611343565b0290505b92915050565b60008160001904831182151516156112f7576112f7611343565b500290565b60008282101561130e5761130e611343565b500390565b60005b8381101561132e578181015183820152602001611316565b8381111561133d576000848401525b50505050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146103b557600080fdfea2646970667358221220a69047c97b9d9fc38b5193d96faec578c10c97fdb36676954343dd8cd4b66ef364736f6c63430008070033000000000000000000000000b224f2689bc0afc5b6721a0807d07017d8cdddf80000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode Sourcemap

16572:3831:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16947:28;;;;;;;;;;;;;;;;;;;6065:25:1;;;6053:2;6038:18;16947:28:0;;;;;;;;17403:81;;;;;;;;;;-1:-1:-1;17403:81:0;;;;;:::i;:::-;;:::i;16775:19::-;;;;;;;;;;-1:-1:-1;16775:19:0;;;;-1:-1:-1;;;;;16775:19:0;;;;;;-1:-1:-1;;;;;2109:32:1;;;2091:51;;2079:2;2064:18;16775:19:0;1945:203:1;18455:347:0;;;;;;;;;;;;;:::i;17799:651::-;;;;;;;;;;-1:-1:-1;17799:651:0;;;;;:::i;:::-;;:::i;16746:23::-;;;;;;;;;;-1:-1:-1;16746:23:0;;;;-1:-1:-1;;;;;16746:23:0;;;18807:913;;;;;;;;;;;;;:::i;16898:45::-;;;;;;;;;;;;;;;;16671:20;;;;;;;;;;-1:-1:-1;16671:20:0;;;;-1:-1:-1;;;;;16671:20:0;;;17100:37;;;;;;;;;;;;17131:6;17100:37;;17489:163;;;;;;;;;;-1:-1:-1;17489:163:0;;;;;:::i;:::-;;:::i;17672:122::-;;;;;;;;;;-1:-1:-1;17672:122:0;;;;;:::i;:::-;;:::i;16845:23::-;;;;;;;;;;-1:-1:-1;16845:23:0;;;;-1:-1:-1;;;;;16845:23:0;;;16720:22;;;;;;;;;;-1:-1:-1;16720:22:0;;;;-1:-1:-1;;;;;16720:22:0;;;16695:21;;;;;;;;;;-1:-1:-1;16695:21:0;;;;-1:-1:-1;;;;;16695:21:0;;;17403:81;20249:5;;-1:-1:-1;;;;;20249:5:0;20235:10;:19;20227:38;;;;-1:-1:-1;;;20227:38:0;;5787:2:1;20227:38:0;;;5769:21:1;5826:1;5806:18;;;5799:29;-1:-1:-1;;;5844:18:1;;;5837:36;5890:18;;20227:38:0;;;;;;;;;17463:5:::1;:16:::0;;-1:-1:-1;;;;;;17463:16:0::1;-1:-1:-1::0;;;;;17463:16:0;;;::::1;::::0;;;::::1;::::0;;17403:81::o;18455:347::-;18496:25;18510:10;18496:13;:25::i;:::-;18567:10;18528:20;18551:27;;;:15;:27;;;;;;;18583:31;;;18625:16;;18621:175;;18651:38;18664:10;18676:12;18651;:38::i;:::-;18742:4;;18754:8;;18702:86;;;18724:10;2422:34:1;;-1:-1:-1;;;;;18742:4:0;;;2487:2:1;2472:18;;2465:43;18754:8:0;;;;2524:18:1;;;2517:43;2591:2;2576:18;;2569:34;;;18702:86:0;;;;;;2371:3:1;18702:86:0;;;18621:175;18489:313;18455:347::o;17799:651::-;-1:-1:-1;;;;;17857:21:0;;17853:34;;17799:651;:::o;17853:34::-;17902:7;;17926:8;;17893:42;;-1:-1:-1;;;17893:42:0;;-1:-1:-1;;;;;17926:8:0;;;17893:42;;;2091:51:1;17902:7:0;;;17893:32;;2064:18:1;;17893:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17942:14;17965:4;;;;;;;;;-1:-1:-1;;;;;17965:4:0;-1:-1:-1;;;;;17959:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17942:42;-1:-1:-1;17995:10:0;;17991:114;;18070:6;17131;18047:13;;:20;;;;:::i;:::-;:29;;;;:::i;:::-;18013:30;;:63;;;;;;;:::i;:::-;;;;-1:-1:-1;;18098:1:0;18082:13;:17;17991:114;18115:30;;18111:48;;18152:7;17799:651;:::o;18111:48::-;18214:4;;;18208:31;;-1:-1:-1;;;18208:31:0;;-1:-1:-1;;;;;2109:32:1;;;18208:31:0;;;2091:51:1;;;;18183:22:0;;18214:4;;;;18208:22;;2064:18:1;;18208:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;18335:31:0;;;;;;:22;:31;;;;;;18302:30;;18183:56;;-1:-1:-1;17131:6:0;;18302:64;;18335:31;18302:64;:::i;:::-;18284:83;;:14;:83;:::i;:::-;:90;;;;:::i;:::-;-1:-1:-1;;;;;18256:24:0;;;;;;:15;:24;;;;;:118;;:24;;;:118;;;;;:::i;:::-;;;;-1:-1:-1;;18413:30:0;;-1:-1:-1;;;;;18379:31:0;;;;;;;:22;:31;;;;;:64;;;;-1:-1:-1;;17799:651:0:o;18807:913::-;18924:10;18859:7;18908:27;;;:15;:27;;;;;;;;;18965:4;;;18959:25;;-1:-1:-1;;;18959:25:0;;;;18908:27;;18859:7;;-1:-1:-1;;;;;18965:4:0;;;;18959:23;;:25;;;;;;;;;18965:4;18959:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;18942:42;-1:-1:-1;18993:11:0;18989:46;;-1:-1:-1;19013:22:0;18807:913;-1:-1:-1;18807:913:0:o;18989:46::-;19080:6;;19072:25;;;-1:-1:-1;;;19072:25:0;;;;19042:13;;-1:-1:-1;;;;;19080:6:0;;19072:23;;:25;;;;;;;;;;;;;;19080:6;19072:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;19064:4;;-1:-1:-1;;;;;19064:4:0;;;:33;;;19060:160;;;19121:6;;19141:8;;19113:37;;-1:-1:-1;;;19113:37:0;;-1:-1:-1;;;;;19141:8:0;;;19113:37;;;2091:51:1;19121:6:0;;;19113:27;;2064:18:1;;19113:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;19105:45;;19060:160;;;19184:6;;19205:8;;19176:38;;-1:-1:-1;;;19176:38:0;;-1:-1:-1;;;;;19205:8:0;;;19176:38;;;2091:51:1;19184:6:0;;;19176:28;;2064:18:1;;19176:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;19168:46;;19060:160;19276:7;;19299:8;;19267:41;;-1:-1:-1;;;19267:41:0;;-1:-1:-1;;;;;19299:8:0;;;19267:41;;;2091:51:1;19226:22:0;;19319:5;;19311;;19276:7;;;19267:31;;2064:18:1;;19267:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;:::i;:::-;:57;;;;:::i;:::-;19251:13;;:73;;;;:::i;:::-;19226:98;-1:-1:-1;19331:29:0;19420:6;19396:21;17131:6;19226:98;19396:21;:::i;:::-;:30;;;;:::i;:::-;19363;;:63;;;;:::i;:::-;19331:95;-1:-1:-1;19435:26:0;19431:61;;-1:-1:-1;19470:22:0;;18807:913;-1:-1:-1;;;;18807:913:0:o;19431:61::-;19554:4;;;19548:34;;-1:-1:-1;;;19548:34:0;;19571:10;19548:34;;;2091:51:1;;;;19517:28:0;;-1:-1:-1;;;;;19554:4:0;;;;19548:22;;2064:18:1;;19548:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;19692:10;19669:34;;;;:22;:34;;;;;;19517:65;;-1:-1:-1;17131:6:0;;19645:58;;:21;:58;:::i;:::-;19621:83;;:20;:83;:::i;:::-;:90;;;;:::i;:::-;19596:115;;:22;:115;:::i;:::-;19589:122;;;;;;;;18807:913;:::o;17489:163::-;20249:5;;-1:-1:-1;;;;;20249:5:0;20235:10;:19;20227:38;;;;-1:-1:-1;;;20227:38:0;;5787:2:1;20227:38:0;;;5769:21:1;5826:1;5806:18;;;5799:29;-1:-1:-1;;;5844:18:1;;;5837:36;5890:18;;20227:38:0;5585:329:1;20227:38:0;17549:6:::1;:16:::0;;-1:-1:-1;;;;;;17549:16:0::1;-1:-1:-1::0;;;;;17549:16:0;::::1;::::0;;::::1;::::0;;;17580:25:::1;::::0;;-1:-1:-1;;;17580:25:0;;;;:23:::1;::::0;:25:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;17549:16;17580:25;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17570:7;:35:::0;;-1:-1:-1;;;;;;17570:35:0::1;-1:-1:-1::0;;;;;17570:35:0;;::::1;;::::0;;-1:-1:-1;17629:6:0;17621:26:::1;::::0;;-1:-1:-1;;;17621:26:0;;;;17629:6;;;::::1;::::0;17621:24:::1;::::0;:26:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;17629:6;17621:26;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17610:8;:37:::0;;-1:-1:-1;;;;;;17610:37:0::1;-1:-1:-1::0;;;;;17610:37:0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;17489:163:0:o;17672:122::-;20338:8;;-1:-1:-1;;;;;20338:8:0;20324:10;:22;;:44;;-1:-1:-1;20364:4:0;;-1:-1:-1;;;;;20364:4:0;20350:10;:18;20324:44;20316:71;;;;-1:-1:-1;;;20316:71:0;;3483:2:1;20316:71:0;;;3465:21:1;3522:2;3502:18;;;3495:30;-1:-1:-1;;;3541:18:1;;;3534:44;3595:18;;20316:71:0;3281:338:1;20316:71:0;17768:6:::1;17751:13;;:23;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;;17672:122:0:o;19825:371::-;19893:11;;;:31;;-1:-1:-1;;;;;;19908:16:0;;;19893:31;19889:44;;;19825:371;;:::o;19889:44::-;19986:6;;20006:8;;19978:37;;-1:-1:-1;;;19978:37:0;;-1:-1:-1;;;;;20006:8:0;;;19978:37;;;2091:51:1;19959:16:0;;19986:6;;;;;19978:27;;2064:18:1;;19978:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;19959:56;;;-1:-1:-1;17131:6:0;20039:12;19959:56;20039:2;:12;:::i;:::-;20029:23;;:6;:23;:::i;:::-;:30;;;;:::i;:::-;20068:8;;20020:39;;-1:-1:-1;;;;;;20068:8:0;20064:128;;20098:29;-1:-1:-1;;;;;20098:21:0;;20120:6;20098:21;:29::i;:::-;19884:312;19825:371;;:::o;20064:128::-;20152:8;;20145:41;;-1:-1:-1;;;;;20152:8:0;20175:2;20179:6;20145:29;:41::i;4923:317::-;5038:6;5013:21;:31;;5005:73;;;;-1:-1:-1;;;5005:73:0;;4253:2:1;5005:73:0;;;4235:21:1;4292:2;4272:18;;;4265:30;4331:31;4311:18;;;4304:59;4380:18;;5005:73:0;4051:353:1;5005:73:0;5092:12;5110:9;-1:-1:-1;;;;;5110:14:0;5132:6;5110:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5091:52;;;5162:7;5154:78;;;;-1:-1:-1;;;5154:78:0;;3826:2:1;5154:78:0;;;3808:21:1;3865:2;3845:18;;;3838:30;3904:34;3884:18;;;3877:62;3975:28;3955:18;;;3948:56;4021:19;;5154:78:0;3624:422:1;11456:211:0;11600:58;;;-1:-1:-1;;;;;2806:32:1;;;11600:58:0;;;2788:51:1;2855:18;;;;2848:34;;;11600:58:0;;;;;;;;;;2761:18:1;;;;11600:58:0;;;;;;;;-1:-1:-1;;;;;11600:58:0;-1:-1:-1;;;11600:58:0;;;14479:69;;;;;;;;;;;;;;;;11573:86;;11593:5;;11600:58;-1:-1:-1;;14479:69:0;;:27;;;11600:58;;14479:27;:69::i;:::-;14563:17;;14453:95;;-1:-1:-1;14563:21:0;14559:179;;14660:10;14649:30;;;;;;;;;;;;:::i;:::-;14641:85;;;;-1:-1:-1;;;14641:85:0;;5376:2:1;14641:85:0;;;5358:21:1;5415:2;5395:18;;;5388:30;5454:34;5434:18;;;5427:62;-1:-1:-1;;;5505:18:1;;;5498:40;5555:19;;14641:85:0;5174:406:1;6407:229:0;6544:12;6576:52;6598:6;6606:4;6612:1;6615:12;6576:21;:52::i;:::-;6569:59;;6407:229;;;;;;:::o;7527:510::-;7697:12;7755:5;7730:21;:30;;7722:81;;;;-1:-1:-1;;;7722:81:0;;4611:2:1;7722:81:0;;;4593:21:1;4650:2;4630:18;;;4623:30;4689:34;4669:18;;;4662:62;-1:-1:-1;;;4740:18:1;;;4733:36;4786:19;;7722:81:0;4409:402:1;7722:81:0;3924:20;;7814:60;;;;-1:-1:-1;;;7814:60:0;;5018:2:1;7814:60:0;;;5000:21:1;5057:2;5037:18;;;5030:30;5096:31;5076:18;;;5069:59;5145:18;;7814:60:0;4816:353:1;7814:60:0;7888:12;7902:23;7929:6;-1:-1:-1;;;;;7929:11:0;7948:5;7955:4;7929:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7887:73;;;;7978:51;7995:7;8004:10;8016:12;7978:16;:51::i;:::-;7971:58;7527:510;-1:-1:-1;;;;;;;7527:510:0:o;10213:712::-;10363:12;10392:7;10388:530;;;-1:-1:-1;10423:10:0;10416:17;;10388:530;10537:17;;:21;10533:374;;10735:10;10729:17;10796:15;10783:10;10779:2;10775:19;10768:44;10533:374;10878:12;10871:20;;-1:-1:-1;;;10871:20:0;;;;;;;;:::i;14:247:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;181:9;168:23;200:31;225:5;200:31;:::i;266:251::-;336:6;389:2;377:9;368:7;364:23;360:32;357:52;;;405:1;402;395:12;357:52;437:9;431:16;456:31;481:5;456:31;:::i;522:277::-;589:6;642:2;630:9;621:7;617:23;613:32;610:52;;;658:1;655;648:12;610:52;690:9;684:16;743:5;736:13;729:21;722:5;719:32;709:60;;765:1;762;755:12;804:180;863:6;916:2;904:9;895:7;891:23;887:32;884:52;;;932:1;929;922:12;884:52;-1:-1:-1;955:23:1;;804:180;-1:-1:-1;804:180:1:o;989:184::-;1059:6;1112:2;1100:9;1091:7;1087:23;1083:32;1080:52;;;1128:1;1125;1118:12;1080:52;-1:-1:-1;1151:16:1;;989:184;-1:-1:-1;989:184:1:o;1178:273::-;1246:6;1299:2;1287:9;1278:7;1274:23;1270:32;1267:52;;;1315:1;1312;1305:12;1267:52;1347:9;1341:16;1397:4;1390:5;1386:16;1379:5;1376:27;1366:55;;1417:1;1414;1407:12;1456:274;1585:3;1623:6;1617:13;1639:53;1685:6;1680:3;1673:4;1665:6;1661:17;1639:53;:::i;:::-;1708:16;;;;;1456:274;-1:-1:-1;;1456:274:1:o;2893:383::-;3042:2;3031:9;3024:21;3005:4;3074:6;3068:13;3117:6;3112:2;3101:9;3097:18;3090:34;3133:66;3192:6;3187:2;3176:9;3172:18;3167:2;3159:6;3155:15;3133:66;:::i;:::-;3260:2;3239:15;-1:-1:-1;;3235:29:1;3220:45;;;;3267:2;3216:54;;2893:383;-1:-1:-1;;2893:383:1:o;6101:128::-;6141:3;6172:1;6168:6;6165:1;6162:13;6159:39;;;6178:18;;:::i;:::-;-1:-1:-1;6214:9:1;;6101:128::o;6234:217::-;6274:1;6300;6290:132;;6344:10;6339:3;6335:20;6332:1;6325:31;6379:4;6376:1;6369:15;6407:4;6404:1;6397:15;6290:132;-1:-1:-1;6436:9:1;;6234:217::o;6456:422::-;6545:1;6588:5;6545:1;6602:270;6623:7;6613:8;6610:21;6602:270;;;6682:4;6678:1;6674:6;6670:17;6664:4;6661:27;6658:53;;;6691:18;;:::i;:::-;6741:7;6731:8;6727:22;6724:55;;;6761:16;;;;6724:55;6840:22;;;;6800:15;;;;6602:270;;;6606:3;6456:422;;;;;:::o;6883:131::-;6943:5;6972:36;6999:8;6993:4;7068:5;7098:8;7088:80;;-1:-1:-1;7139:1:1;7153:5;;7088:80;7187:4;7177:76;;-1:-1:-1;7224:1:1;7238:5;;7177:76;7269:4;7287:1;7282:59;;;;7355:1;7350:130;;;;7262:218;;7282:59;7312:1;7303:10;;7326:5;;;7350:130;7387:3;7377:8;7374:17;7371:43;;;7394:18;;:::i;:::-;-1:-1:-1;;7450:1:1;7436:16;;7465:5;;7262:218;;7564:2;7554:8;7551:16;7545:3;7539:4;7536:13;7532:36;7526:2;7516:8;7513:16;7508:2;7502:4;7499:12;7495:35;7492:77;7489:159;;;-1:-1:-1;7601:19:1;;;7633:5;;7489:159;7680:34;7705:8;7699:4;7680:34;:::i;:::-;7750:6;7746:1;7742:6;7738:19;7729:7;7726:32;7723:58;;;7761:18;;:::i;:::-;7799:20;;-1:-1:-1;7019:806:1;;;;;:::o;7830:168::-;7870:7;7936:1;7932;7928:6;7924:14;7921:1;7918:21;7913:1;7906:9;7899:17;7895:45;7892:71;;;7943:18;;:::i;:::-;-1:-1:-1;7983:9:1;;7830:168::o;8003:125::-;8043:4;8071:1;8068;8065:8;8062:34;;;8076:18;;:::i;:::-;-1:-1:-1;8113:9:1;;8003:125::o;8133:258::-;8205:1;8215:113;8229:6;8226:1;8223:13;8215:113;;;8305:11;;;8299:18;8286:11;;;8279:39;8251:2;8244:10;8215:113;;;8346:6;8343:1;8340:13;8337:48;;;8381:1;8372:6;8367:3;8363:16;8356:27;8337:48;;8133:258;;;:::o;8396:127::-;8457:10;8452:3;8448:20;8445:1;8438:31;8488:4;8485:1;8478:15;8512:4;8509:1;8502:15;8528:131;-1:-1:-1;;;;;8603:31:1;;8593:42;;8583:70;;8649:1;8646;8639:12

Swarm Source

ipfs://a69047c97b9d9fc38b5193d96faec578c10c97fdb36676954343dd8cd4b66ef3
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.