ETH Price: $3,085.24 (+4.19%)

Contract

0x29D5cE86F42D7671B5be9dA9108Cc92c9EF1ddEA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x61012060123246472021-04-27 20:35:051292 days ago1619555705IN
 Create: FarmingPool
0 ETH0.0674321270

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FarmingPool

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 8 : FarmingPool.sol
pragma solidity =0.6.6;

import "./Distributor.sol";
import "./interfaces/IBorrowTracker.sol";
import "./interfaces/IVester.sol";
import "./libraries/Math.sol";

// ASSUMTPIONS:
// - advance is called at least once for each epoch
// - farmingPool shares edits are effective starting from the next epoch

contract FarmingPool is IBorrowTracker, Distributor {

	address public immutable borrowable;

	uint public immutable vestingBegin;
	uint public immutable segmentLength;
	
	uint public epochBegin;
	uint public epochAmount;
	uint public lastUpdate;
	
	event UpdateShareIndex(uint shareIndex);
	event Advance(uint epochBegin, uint epochAmount);
	
	constructor (
		address imx_,
		address claimable_,
		address borrowable_,
		address vester_
	) public Distributor(imx_, claimable_) {
		borrowable = borrowable_;
		uint _vestingBegin = IVester(vester_).vestingBegin();
		vestingBegin = _vestingBegin;
		segmentLength = IVester(vester_).vestingEnd().sub(_vestingBegin).div(IVester(vester_).segments());
	}
	
	function updateShareIndex() public virtual override returns (uint _shareIndex) {
		if (totalShares == 0) return shareIndex;
		if (epochBegin == 0) return shareIndex;
		uint epochEnd = epochBegin + segmentLength;
		uint blockTimestamp = getBlockTimestamp();
		uint timestamp = Math.min(blockTimestamp, epochEnd);
		uint timeElapsed = timestamp - lastUpdate;
		assert(timeElapsed <= segmentLength);
		if (timeElapsed == 0) return shareIndex;
		
		uint amount =  epochAmount.mul(timeElapsed).div(segmentLength);
		_shareIndex = amount.mul(2**160).div(totalShares).add(shareIndex);
		shareIndex = _shareIndex;
		lastUpdate = timestamp;
		emit UpdateShareIndex(_shareIndex);
	}
	
	function advance() public nonReentrant {
		uint blockTimestamp = getBlockTimestamp();
		if (blockTimestamp < vestingBegin) return;
		uint _epochBegin = epochBegin;
		if (_epochBegin != 0 && blockTimestamp < _epochBegin + segmentLength) return;
		uint amount = IClaimable(claimable).claim();
		if (amount == 0) return;
		updateShareIndex();		
		uint timeSinceBeginning = blockTimestamp - vestingBegin;
		epochBegin = blockTimestamp.sub(timeSinceBeginning.mod(segmentLength));
		epochAmount = amount;
		lastUpdate = epochBegin;
		emit Advance(epochBegin, epochAmount);
	}

	function claimInternal(address account) internal override returns (uint amount) {
		advance();
		return super.claimInternal(account);
	}
	
	function claimAccount(address account) external returns (uint amount) {
		return claimInternal(account);
	}
	
	function trackBorrow(address borrower, uint borrowBalance, uint borrowIndex) external override {
		require(msg.sender == borrowable, "FarmingPool: UNAUTHORIZED");
		uint newShares = borrowBalance.mul(2**96).div(borrowIndex);
		editRecipientInternal(borrower, newShares);
	}
	
	function getBlockTimestamp() public virtual view returns (uint) {
		return block.timestamp;
	}
}

File 2 of 8 : Distributor.sol
pragma solidity =0.6.6;

import "./libraries/SafeMath.sol";
import "./interfaces/IImx.sol";
import "./interfaces/IClaimable.sol";

abstract contract Distributor is IClaimable {
	using SafeMath for uint;

	address public immutable imx;
	address public immutable claimable;

	struct Recipient {
		uint shares;
		uint lastShareIndex;
		uint credit;
	}
	mapping(address => Recipient) public recipients;
	
	uint public totalShares;
	uint public shareIndex;
	
	event UpdateShareIndex(uint shareIndex);
	event UpdateCredit(address indexed account, uint lastShareIndex, uint credit);
	event Claim(address indexed account, uint amount);
	event EditRecipient(address indexed account, uint shares, uint totalShares);

	constructor (
		address imx_,
		address claimable_
	) public {
		imx = imx_;
		claimable = claimable_;
	}
	
	function updateShareIndex() public virtual nonReentrant returns (uint _shareIndex) {
		if (totalShares == 0) return shareIndex;
		uint amount = IClaimable(claimable).claim();
		if (amount == 0) return shareIndex;
		_shareIndex = amount.mul(2**160).div(totalShares).add(shareIndex);
		shareIndex = _shareIndex;
		emit UpdateShareIndex(_shareIndex);
	}
	
	function updateCredit(address account) public returns (uint credit) {
		uint _shareIndex = updateShareIndex();
		if (_shareIndex == 0) return 0;
		Recipient storage recipient = recipients[account];
		credit = recipient.credit + _shareIndex.sub(recipient.lastShareIndex).mul(recipient.shares) / 2**160;
		recipient.lastShareIndex = _shareIndex;
		recipient.credit = credit;
		emit UpdateCredit(account, _shareIndex, credit);
	}

	function claimInternal(address account) internal virtual returns (uint amount) {
		amount = updateCredit(account);
		if (amount > 0) {
			recipients[account].credit = 0;
			IImx(imx).transfer(account, amount);
			emit Claim(account, amount);
		}
	}

	function claim() external virtual override returns (uint amount) {
		return claimInternal(msg.sender);
	}
	
	function editRecipientInternal(address account, uint shares) internal {
		updateCredit(account);
		Recipient storage recipient = recipients[account];
		uint prevShares = recipient.shares;
		uint _totalShares = shares > prevShares ? 
			totalShares.add(shares - prevShares) : 
			totalShares.sub(prevShares - shares);
		totalShares = _totalShares;
		recipient.shares = shares;
		emit EditRecipient(account, shares, _totalShares);
	}
	
	// Prevents a contract from calling itself, directly or indirectly.
	bool internal _notEntered = true;
	modifier nonReentrant() {
		require(_notEntered, "Distributor: REENTERED");
		_notEntered = false;
		_;
		_notEntered = true;
	}
}

File 3 of 8 : IBorrowTracker.sol
pragma solidity >=0.5.0;

interface IBorrowTracker {
	function trackBorrow(address borrower, uint borrowBalance, uint borrowIndex) external;
}

File 4 of 8 : IClaimable.sol
pragma solidity =0.6.6;

interface IClaimable {
	function claim() external returns (uint amount);
	event Claim(address indexed account, uint amount);
}

File 5 of 8 : IImx.sol
pragma solidity =0.6.6;
//IERC20?
interface IImx {
    function balanceOf(address account) external view returns (uint);
    function transfer(address dst, uint rawAmount) external returns (bool);
}

File 6 of 8 : IVester.sol
pragma solidity >=0.5.0;

interface IVester {
	function segments() external pure returns (uint);
	function vestingAmount() external pure returns (uint);
	function vestingBegin() external pure returns (uint);
	function vestingEnd() external pure returns (uint);
}

File 7 of 8 : Math.sol
pragma solidity =0.6.6;

// a library for performing various math operations
// forked from: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/Math.sol

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 8 of 8 : SafeMath.sol
pragma solidity =0.6.6;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction underflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, errorMessage);

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts with custom message on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"imx_","type":"address"},{"internalType":"address","name":"claimable_","type":"address"},{"internalType":"address","name":"borrowable_","type":"address"},{"internalType":"address","name":"vester_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"epochBegin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"epochAmount","type":"uint256"}],"name":"Advance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalShares","type":"uint256"}],"name":"EditRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"lastShareIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"credit","type":"uint256"}],"name":"UpdateCredit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"shareIndex","type":"uint256"}],"name":"UpdateShareIndex","type":"event"},{"inputs":[],"name":"advance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimAccount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochBegin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"imx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"recipients","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"lastShareIndex","type":"uint256"},{"internalType":"uint256","name":"credit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"segmentLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shareIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"borrowBalance","type":"uint256"},{"internalType":"uint256","name":"borrowIndex","type":"uint256"}],"name":"trackBorrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"updateCredit","outputs":[{"internalType":"uint256","name":"credit","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateShareIndex","outputs":[{"internalType":"uint256","name":"_shareIndex","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vestingBegin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6101206040526003805460ff191660011790553480156200001f57600080fd5b506040516200140438038062001404833981810160405260808110156200004557600080fd5b5080516020808301516040808501516060958601516001600160601b031986881b811660805284881b811660a0529682901b90961660c052815163e29bc68b60e01b815291519495929490936000926001600160a01b0385169263e29bc68b92600480840193919291829003018186803b158015620000c357600080fd5b505afa158015620000d8573d6000803e3d6000fd5b505050506040513d6020811015620000ef57600080fd5b505160e08190526040805163716b438560e11b815290519192506200020a916001600160a01b0385169163e2d6870a916004808301926020929190829003018186803b1580156200013f57600080fd5b505afa15801562000154573d6000803e3d6000fd5b505050506040513d60208110156200016b57600080fd5b5051604080516384a1931f60e01b81529051620001f69185916001600160a01b038816916384a1931f916004808301926020929190829003018186803b158015620001b557600080fd5b505afa158015620001ca573d6000803e3d6000fd5b505050506040513d6020811015620001e157600080fd5b5051906200021a602090811b62000b7217901c565b6200026b60201b62000a621790919060201c565b6101005250620003b99350505050565b60006200026483836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250620002b560201b60201c565b9392505050565b60006200026483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506200035060201b60201c565b60008184841115620003485760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200030c578181015183820152602001620002f2565b50505050905090810190601f1680156200033a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183620003a25760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156200030c578181015183820152602001620002f2565b506000838581620003af57fe5b0495945050505050565b60805160601c60a05160601c60c05160601c60e05161010051610fd0620004346000398061056852806105aa52806105ec52806106b9528061080b52806109155250806106e352806107d052806108eb5250806102f6528061070752508061051b528061083f5250806103c55280610e3a5250610fd06000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063b260187d116100b2578063d01b671711610081578063e99a6ac711610066578063e99a6ac71461027d578063ea105ac714610285578063eb8203121461028d57610136565b8063d01b67171461026d578063e29bc68b1461027557610136565b8063b260187d1461024d578063c046371114610255578063c56ad1ad1461025d578063d013666e1461026557610136565b806345c08718116101095780637429d95a116100ee5780637429d95a1461020a578063796b89b91461023d578063af38d7571461024557610136565b806345c08718146101cf5780634e71d92d1461020257610136565b806305285d7f1461013b5780630f08025f1461017c5780632f5ee99b146101ad5780633a98ef39146101c7575b600080fd5b61017a6004803603606081101561015157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356102de565b005b6101846103c3565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101b56103e7565b60408051918252519081900360200190f35b6101b56103ed565b6101b5600480360360208110156101e557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166103f3565b6101b56104f3565b6101b56004803603602081101561022057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610504565b6101b5610515565b610184610519565b6101b561053d565b6101b56106ab565b6101b56106b1565b6101b56106b7565b6101b56106db565b6101b56106e1565b610184610705565b61017a610729565b6102c0600480360360208110156102a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109c7565b60408051938452602084019290925282820152519081900360600190f35b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461038257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4661726d696e67506f6f6c3a20554e415554484f52495a454400000000000000604482015290519081900360640190fd5b60006103b1826103a5856c0100000000000000000000000063ffffffff6109e816565b9063ffffffff610a6216565b90506103bd8482610aa4565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045481565b60015481565b6000806103fe61053d565b90508061040f5760009150506104ee565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090208054600182015474010000000000000000000000000000000000000000916104739161046790869063ffffffff610b7216565b9063ffffffff6109e816565b8161047a57fe5b0481600201540192508181600101819055508281600201819055508373ffffffffffffffffffffffffffffffffffffffff167ff7240857a4f83123f14a7bc3f77cd32d0ae71ede635c92ebdcc14d5ea8ed018a8385604051808381526020018281526020019250505060405180910390a250505b919050565b60006104fe33610bb4565b90505b90565b600061050f82610bb4565b92915050565b4290565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600154600014156105535750600254610501565b6004546105635750600254610501565b6004547f0000000000000000000000000000000000000000000000000000000000000000016000610592610515565b905060006105a08284610bc7565b60065490915081037f00000000000000000000000000000000000000000000000000000000000000008111156105d257fe5b806105e557600254945050505050610501565b60006106207f00000000000000000000000000000000000000000000000000000000000000006103a5846005546109e890919063ffffffff16565b90506106626002546106566001546103a574010000000000000000000000000000000000000000866109e890919063ffffffff16565b9063ffffffff610bdd16565b600281905560068490556040805182815290519197507f8cae7c5b456d193882de6985578f406aefb641501192211706c5aa0a32612fec919081900360200190a1505050505090565b60065481565b60025481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60055481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60035460ff1661079a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4469737472696275746f723a205245454e544552454400000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560006107cc610515565b90507f00000000000000000000000000000000000000000000000000000000000000008110156107fc575061099a565b600454801580159061082f57507f0000000000000000000000000000000000000000000000000000000000000000810182105b1561083b57505061099a565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634e71d92d6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050506040513d60208110156108cf57600080fd5b50519050806108e05750505061099a565b6108e861053d565b507f0000000000000000000000000000000000000000000000000000000000000000830361094c61093f827f000000000000000000000000000000000000000000000000000000000000000063ffffffff610c5116565b859063ffffffff610b7216565b600481905560058390556006819055604080519182526020820184905280517f80ed4614ab2b2c5fd2e6f2f0bb3c55b8bac2a16aee9296e0275b2214ebee65719281900390910190a1505050505b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60006020819052908152604090208054600182015460029092015490919083565b6000826109f75750600061050f565b82820282848281610a0457fe5b0414610a5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180610f7a6021913960400191505060405180910390fd5b9392505050565b6000610a5b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610c93565b610aad826103f3565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080549091818411610af857600154610af39085840363ffffffff610b7216565b610b0d565b600154610b0d9083860363ffffffff610bdd16565b60018190558484556040805186815260208101839052815192935073ffffffffffffffffffffffffffffffffffffffff8816927fff3664f5f2f8f85ecd8d30ef2aa6773d8a8448219c7421dcbb67957fb3fafba1929181900390910190a25050505050565b6000610a5b83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250610d4f565b6000610bbe610729565b61050f82610dc3565b6000818310610bd65781610a5b565b5090919050565b600082820183811015610a5b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610a5b83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250610efd565b60008183610d39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610cfe578181015183820152602001610ce6565b50505050905090810190601f168015610d2b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610d4557fe5b0495945050505050565b60008184841115610dbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315610cfe578181015183820152602001610ce6565b505050900390565b6000610dce826103f3565b905080156104ee5773ffffffffffffffffffffffffffffffffffffffff80831660008181526020818152604080832060020183905580517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019490945260248401869052517f00000000000000000000000000000000000000000000000000000000000000009094169363a9059cbb93604480820194918390030190829087803b158015610e8057600080fd5b505af1158015610e94573d6000803e3d6000fd5b505050506040513d6020811015610eaa57600080fd5b505060408051828152905173ffffffffffffffffffffffffffffffffffffffff8416917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4919081900360200190a2919050565b60008183610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315610cfe578181015183820152602001610ce6565b50828481610f7057fe5b0694935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212205561ac584d8536e3302172d4eb91f7c214eefef68597477033e3240899f8399564736f6c634300060600330000000000000000000000007b35ce522cb72e4077baeb96cb923a5529764a000000000000000000000000008a966ce90ee5d49ca78c0f1bb9ee4e34be3363350000000000000000000000003cc353b5e1d8abaf3d75d7ded1b11d27596decce000000000000000000000000073271a5da4e9ee4afde9ff08801feb2c672214e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063b260187d116100b2578063d01b671711610081578063e99a6ac711610066578063e99a6ac71461027d578063ea105ac714610285578063eb8203121461028d57610136565b8063d01b67171461026d578063e29bc68b1461027557610136565b8063b260187d1461024d578063c046371114610255578063c56ad1ad1461025d578063d013666e1461026557610136565b806345c08718116101095780637429d95a116100ee5780637429d95a1461020a578063796b89b91461023d578063af38d7571461024557610136565b806345c08718146101cf5780634e71d92d1461020257610136565b806305285d7f1461013b5780630f08025f1461017c5780632f5ee99b146101ad5780633a98ef39146101c7575b600080fd5b61017a6004803603606081101561015157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356102de565b005b6101846103c3565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101b56103e7565b60408051918252519081900360200190f35b6101b56103ed565b6101b5600480360360208110156101e557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166103f3565b6101b56104f3565b6101b56004803603602081101561022057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610504565b6101b5610515565b610184610519565b6101b561053d565b6101b56106ab565b6101b56106b1565b6101b56106b7565b6101b56106db565b6101b56106e1565b610184610705565b61017a610729565b6102c0600480360360208110156102a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109c7565b60408051938452602084019290925282820152519081900360600190f35b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003cc353b5e1d8abaf3d75d7ded1b11d27596decce161461038257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4661726d696e67506f6f6c3a20554e415554484f52495a454400000000000000604482015290519081900360640190fd5b60006103b1826103a5856c0100000000000000000000000063ffffffff6109e816565b9063ffffffff610a6216565b90506103bd8482610aa4565b50505050565b7f0000000000000000000000007b35ce522cb72e4077baeb96cb923a5529764a0081565b60045481565b60015481565b6000806103fe61053d565b90508061040f5760009150506104ee565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090208054600182015474010000000000000000000000000000000000000000916104739161046790869063ffffffff610b7216565b9063ffffffff6109e816565b8161047a57fe5b0481600201540192508181600101819055508281600201819055508373ffffffffffffffffffffffffffffffffffffffff167ff7240857a4f83123f14a7bc3f77cd32d0ae71ede635c92ebdcc14d5ea8ed018a8385604051808381526020018281526020019250505060405180910390a250505b919050565b60006104fe33610bb4565b90505b90565b600061050f82610bb4565b92915050565b4290565b7f0000000000000000000000008a966ce90ee5d49ca78c0f1bb9ee4e34be33633581565b6000600154600014156105535750600254610501565b6004546105635750600254610501565b6004547f00000000000000000000000000000000000000000000000000000000001342e0016000610592610515565b905060006105a08284610bc7565b60065490915081037f00000000000000000000000000000000000000000000000000000000001342e08111156105d257fe5b806105e557600254945050505050610501565b60006106207f00000000000000000000000000000000000000000000000000000000001342e06103a5846005546109e890919063ffffffff16565b90506106626002546106566001546103a574010000000000000000000000000000000000000000866109e890919063ffffffff16565b9063ffffffff610bdd16565b600281905560068490556040805182815290519197507f8cae7c5b456d193882de6985578f406aefb641501192211706c5aa0a32612fec919081900360200190a1505050505090565b60065481565b60025481565b7f00000000000000000000000000000000000000000000000000000000001342e081565b60055481565b7f00000000000000000000000000000000000000000000000000000000608abbe081565b7f0000000000000000000000003cc353b5e1d8abaf3d75d7ded1b11d27596decce81565b60035460ff1661079a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4469737472696275746f723a205245454e544552454400000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560006107cc610515565b90507f00000000000000000000000000000000000000000000000000000000608abbe08110156107fc575061099a565b600454801580159061082f57507f00000000000000000000000000000000000000000000000000000000001342e0810182105b1561083b57505061099a565b60007f0000000000000000000000008a966ce90ee5d49ca78c0f1bb9ee4e34be33633573ffffffffffffffffffffffffffffffffffffffff16634e71d92d6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050506040513d60208110156108cf57600080fd5b50519050806108e05750505061099a565b6108e861053d565b507f00000000000000000000000000000000000000000000000000000000608abbe0830361094c61093f827f00000000000000000000000000000000000000000000000000000000001342e063ffffffff610c5116565b859063ffffffff610b7216565b600481905560058390556006819055604080519182526020820184905280517f80ed4614ab2b2c5fd2e6f2f0bb3c55b8bac2a16aee9296e0275b2214ebee65719281900390910190a1505050505b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60006020819052908152604090208054600182015460029092015490919083565b6000826109f75750600061050f565b82820282848281610a0457fe5b0414610a5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180610f7a6021913960400191505060405180910390fd5b9392505050565b6000610a5b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610c93565b610aad826103f3565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080549091818411610af857600154610af39085840363ffffffff610b7216565b610b0d565b600154610b0d9083860363ffffffff610bdd16565b60018190558484556040805186815260208101839052815192935073ffffffffffffffffffffffffffffffffffffffff8816927fff3664f5f2f8f85ecd8d30ef2aa6773d8a8448219c7421dcbb67957fb3fafba1929181900390910190a25050505050565b6000610a5b83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250610d4f565b6000610bbe610729565b61050f82610dc3565b6000818310610bd65781610a5b565b5090919050565b600082820183811015610a5b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610a5b83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250610efd565b60008183610d39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610cfe578181015183820152602001610ce6565b50505050905090810190601f168015610d2b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610d4557fe5b0495945050505050565b60008184841115610dbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315610cfe578181015183820152602001610ce6565b505050900390565b6000610dce826103f3565b905080156104ee5773ffffffffffffffffffffffffffffffffffffffff80831660008181526020818152604080832060020183905580517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019490945260248401869052517f0000000000000000000000007b35ce522cb72e4077baeb96cb923a5529764a009094169363a9059cbb93604480820194918390030190829087803b158015610e8057600080fd5b505af1158015610e94573d6000803e3d6000fd5b505050506040513d6020811015610eaa57600080fd5b505060408051828152905173ffffffffffffffffffffffffffffffffffffffff8416917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4919081900360200190a2919050565b60008183610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315610cfe578181015183820152602001610ce6565b50828481610f7057fe5b0694935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212205561ac584d8536e3302172d4eb91f7c214eefef68597477033e3240899f8399564736f6c63430006060033

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

0000000000000000000000007b35ce522cb72e4077baeb96cb923a5529764a000000000000000000000000008a966ce90ee5d49ca78c0f1bb9ee4e34be3363350000000000000000000000003cc353b5e1d8abaf3d75d7ded1b11d27596decce000000000000000000000000073271a5da4e9ee4afde9ff08801feb2c672214e

-----Decoded View---------------
Arg [0] : imx_ (address): 0x7b35Ce522CB72e4077BaeB96Cb923A5529764a00
Arg [1] : claimable_ (address): 0x8A966ce90eE5D49ca78C0f1Bb9ee4E34BE336335
Arg [2] : borrowable_ (address): 0x3CC353b5E1D8AbaF3D75D7dED1B11d27596dEcCE
Arg [3] : vester_ (address): 0x073271A5da4E9EE4afDe9ff08801feb2c672214E

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000007b35ce522cb72e4077baeb96cb923a5529764a00
Arg [1] : 0000000000000000000000008a966ce90ee5d49ca78c0f1bb9ee4e34be336335
Arg [2] : 0000000000000000000000003cc353b5e1d8abaf3d75d7ded1b11d27596decce
Arg [3] : 000000000000000000000000073271a5da4e9ee4afde9ff08801feb2c672214e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.