Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 39 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 11681274 | 1299 days ago | IN | 0 ETH | 0.00201373 | ||||
Transfer | 11680261 | 1299 days ago | IN | 0 ETH | 0.0041572 | ||||
Lock | 11160519 | 1379 days ago | IN | 0 ETH | 0.00272742 | ||||
Deposit | 11160471 | 1379 days ago | IN | 0 ETH | 0.00199692 | ||||
Deposit | 11160405 | 1379 days ago | IN | 0 ETH | 0.0014866 | ||||
Deposit | 11160377 | 1379 days ago | IN | 0 ETH | 0.0014866 | ||||
Deposit | 11160370 | 1379 days ago | IN | 0 ETH | 0.00185647 | ||||
Deposit | 11158946 | 1379 days ago | IN | 0 ETH | 0.00333287 | ||||
Deposit | 11158855 | 1379 days ago | IN | 0 ETH | 0.00280167 | ||||
Deposit | 11158783 | 1379 days ago | IN | 0 ETH | 0.00210125 | ||||
Deposit | 11158535 | 1379 days ago | IN | 0 ETH | 0.00268731 | ||||
Deposit | 11158438 | 1379 days ago | IN | 0 ETH | 0.00245442 | ||||
Deposit | 11158341 | 1379 days ago | IN | 0 ETH | 0.00171531 | ||||
Deposit | 11154699 | 1380 days ago | IN | 0 ETH | 0.00093001 | ||||
Deposit | 11154699 | 1380 days ago | IN | 0 ETH | 0.00171531 | ||||
Deposit | 11154556 | 1380 days ago | IN | 0 ETH | 0.00165012 | ||||
Deposit | 11154534 | 1380 days ago | IN | 0 ETH | 0.00171531 | ||||
Deposit | 11154475 | 1380 days ago | IN | 0 ETH | 0.0014866 | ||||
Deposit | 11154368 | 1380 days ago | IN | 0 ETH | 0.00131507 | ||||
Deposit | 11154345 | 1380 days ago | IN | 0 ETH | 0.00200534 | ||||
Deposit | 11154318 | 1380 days ago | IN | 0 ETH | 0.00131507 | ||||
Deposit | 11154238 | 1380 days ago | IN | 0 ETH | 0.00131507 | ||||
Deposit | 11148117 | 1381 days ago | IN | 0 ETH | 0.00142942 | ||||
Deposit | 11147859 | 1381 days ago | IN | 0 ETH | 0.00137224 | ||||
Deposit | 11140370 | 1382 days ago | IN | 0 ETH | 0.00324025 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
LendingPool
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-10-26 */ pragma solidity ^0.6.2; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ 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 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 subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ 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 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) { 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; } } /** * @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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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); } } } } /** * @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 SafeMath for uint256; 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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"); } } } /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract LendingPool is Ownable { using SafeERC20 for ERC20; using SafeMath for uint256; address public token; uint256 public poolTotalCapacity; uint256 public userDepositLimit; uint256 public userDepositMinimum; uint256 public poolTotalDepositBalance; mapping(address => uint256) private balances; // different stages of the lending pool enum Stage { AcceptingDeposits, Locked } Stage public currentStage = Stage.AcceptingDeposits; // could add cumulative balance/remaining balance as value, but the only benefit of that would be reducing the number // of queries on the front end event Deposited( address indexed _user, uint256 _amount ); event TransitionedTo( string _stage ); event Transferred( address indexed _to, uint256 _amount ); modifier atStage(Stage _stage) { require(currentStage == _stage, "METHOD_CALL_NOT_ALLOWED"); _; } constructor (address _token, uint256 _poolTotalCapacity, uint256 _userDepositLimit, uint256 _userDepositMinimum) public { token = _token; poolTotalCapacity = _poolTotalCapacity; userDepositLimit = _userDepositLimit; userDepositMinimum = _userDepositMinimum; emit TransitionedTo("AcceptingDeposits"); } // not payable so you cannot send eth function deposit(uint256 _amount) external atStage(Stage.AcceptingDeposits) { // validate the amount require(_amount > 0, "DEPOSIT_VALUE_ZERO"); require(_amount >= _depositMinimum(msg.sender), "DEPOSIT_VALUE_MINIMUM"); require(_amount <= _depositLimit(msg.sender), "ADDRESS_LIMIT_VIOLATED"); ERC20(token).safeTransferFrom(msg.sender, address(this), _amount); balances[msg.sender] = balances[msg.sender].add(_amount); poolTotalDepositBalance = poolTotalDepositBalance.add(_amount); emit Deposited(msg.sender, _amount); } // if the value provided is more than the current balance, the transaction will revert function transfer(address _to, uint256 _value) external onlyOwner atStage(Stage.Locked) { ERC20(token).safeTransfer(_to, _value); emit Transferred(_to, _value); } function lock() external onlyOwner atStage(Stage.AcceptingDeposits) { currentStage = Stage.Locked; emit TransitionedTo("Locked"); } function depositBalanceOf(address _account) public view returns (uint256) { return _balanceOf(_account); } function depositLimitOf(address _account) public view returns (uint256) { return _depositLimit(_account); } function depositMinimumOf(address _account) public view returns (uint256) { return _depositMinimum(_account); } function poolRemainingCapacity() public view returns (uint256) { return _poolRemainingCapacity(); } function summaryStateFor(address _account) public view returns (uint256, uint256, uint256, uint256) { return (_balanceOf(_account), _depositLimit(_account), _poolRemainingCapacity(), _depositMinimum(_account)); } function multiTransfer(address[] memory _contributors, uint256[] memory _balances) public { ERC20 erc20token = ERC20(token); uint8 i = 0; for (i; i < _contributors.length; i++) { erc20token.safeTransferFrom(msg.sender, _contributors[i], _balances[i]); } } receive() external payable { revert(); } // internal methods function _depositMinimum(address _account) internal view returns (uint256) { // as per the specs, special exemption for the owner address if (_account == owner()) { return 0; } // require first contribution to be atleast the minimum amount if (_balanceOf(_account) >= userDepositMinimum) { return 0; } return userDepositMinimum; } // subtraction of two unsigned integers reverts on overflow (when the result is negative) function _depositLimit(address _account) internal view returns (uint256){ return _min(userDepositLimit.sub(_balanceOf(_account)), _poolRemainingCapacity()); } function _balanceOf(address _account) internal view returns (uint256) { return balances[_account]; } // subtraction of two unsigned integers reverts on overflow (when the result is negative) function _poolRemainingCapacity() internal view returns (uint256) { return poolTotalCapacity.sub(poolTotalDepositBalance); } function _min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_poolTotalCapacity","type":"uint256"},{"internalType":"uint256","name":"_userDepositLimit","type":"uint256"},{"internalType":"uint256","name":"_userDepositMinimum","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_stage","type":"string"}],"name":"TransitionedTo","type":"event"},{"inputs":[],"name":"currentStage","outputs":[{"internalType":"enum LendingPool.Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"depositBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"depositLimitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"depositMinimumOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_contributors","type":"address[]"},{"internalType":"uint256[]","name":"_balances","type":"uint256[]"}],"name":"multiTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolRemainingCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolTotalCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolTotalDepositBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"summaryStateFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userDepositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"userDepositMinimum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526007805460ff1916905534801561001a57600080fd5b506040516112ce3803806112ce8339818101604052608081101561003d57600080fd5b5080516020820151604083015160609093015191929091600061005e61013c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b0386161790556002839055600382905560048190556040805160208082526011908201527f416363657074696e674465706f736974730000000000000000000000000000008183015290517fa44259a491d135005df1527863204fb4e7675e87912fb0ce35bd3d5da5ed9507916060908290030190a150505050610140565b3390565b61117f8061014f6000396000f3fe60806040526004361061010d5760003560e01c8063a9059cbb11610095578063dbef61a611610064578063dbef61a614610456578063f2fde38b1461046b578063f83d08ba1461049e578063fba13bd0146104b3578063fc0c546a146104e657610117565b8063a9059cbb14610385578063b4237339146103be578063b534da0f146103d3578063b6b55f251461042c57610117565b8063715018a6116100dc578063715018a6146102e25780637e081911146102f75780638da5cb5b1461030c57806393bb90871461033d5780639599af2a1461035257610117565b80631e89d5451461011c5780631ec36bfa146102525780632974161c146102795780635bf5d54c146102ac57610117565b3661011757600080fd5b600080fd5b34801561012857600080fd5b506102506004803603604081101561013f57600080fd5b81019060208101813564010000000081111561015a57600080fd5b82018360208201111561016c57600080fd5b8035906020019184602083028401116401000000008311171561018e57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156101de57600080fd5b8201836020820111156101f057600080fd5b8035906020019184602083028401116401000000008311171561021257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104fb945050505050565b005b34801561025e57600080fd5b50610267610570565b60408051918252519081900360200190f35b34801561028557600080fd5b506102676004803603602081101561029c57600080fd5b50356001600160a01b0316610576565b3480156102b857600080fd5b506102c1610589565b604051808260018111156102d157fe5b815260200191505060405180910390f35b3480156102ee57600080fd5b50610250610592565b34801561030357600080fd5b50610267610634565b34801561031857600080fd5b5061032161063a565b604080516001600160a01b039092168252519081900360200190f35b34801561034957600080fd5b50610267610649565b34801561035e57600080fd5b506102676004803603602081101561037557600080fd5b50356001600160a01b031661064f565b34801561039157600080fd5b50610250600480360360408110156103a857600080fd5b506001600160a01b03813516906020013561065a565b3480156103ca57600080fd5b5061026761076d565b3480156103df57600080fd5b50610406600480360360208110156103f657600080fd5b50356001600160a01b0316610773565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561043857600080fd5b506102506004803603602081101561044f57600080fd5b50356107ab565b34801561046257600080fd5b5061026761098c565b34801561047757600080fd5b506102506004803603602081101561048e57600080fd5b50356001600160a01b031661099b565b3480156104aa57600080fd5b50610250610a93565b3480156104bf57600080fd5b50610267600480360360208110156104d657600080fd5b50356001600160a01b0316610ba5565b3480156104f257600080fd5b50610321610bb0565b6001546001600160a01b031660005b83518160ff16101561056a5761056233858360ff168151811061052957fe5b6020026020010151858460ff168151811061054057fe5b6020026020010151856001600160a01b0316610bbf909392919063ffffffff16565b60010161050a565b50505050565b60035481565b600061058182610c19565b90505b919050565b60075460ff1681565b61059a610c65565b6000546001600160a01b039081169116146105ea576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055481565b6000546001600160a01b031690565b60045481565b600061058182610c69565b610662610c65565b6000546001600160a01b039081169116146106b2576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b60018060075460ff1660018111156106c657fe5b14610712576040805162461bcd60e51b81526020600482015260176024820152761351551213d117d0d0531317d393d517d0531313d5d151604a1b604482015290519081900360640190fd5b600154610729906001600160a01b03168484610c90565b6040805183815290516001600160a01b038516917fe6d858f14d755446648a6e0c8ab8b5a0f58ccc7920d4c910b0454e4dcd869af0919081900360200190a2505050565b60025481565b60008060008061078285610ce7565b61078b86610c69565b610793610d02565b61079c88610c19565b93509350935093509193509193565b60008060075460ff1660018111156107bf57fe5b1461080b576040805162461bcd60e51b81526020600482015260176024820152761351551213d117d0d0531317d393d517d0531313d5d151604a1b604482015290519081900360640190fd5b60008211610855576040805162461bcd60e51b81526020600482015260126024820152714445504f5349545f56414c55455f5a45524f60701b604482015290519081900360640190fd5b61085e33610c19565b8210156108aa576040805162461bcd60e51b81526020600482015260156024820152744445504f5349545f56414c55455f4d494e494d554d60581b604482015290519081900360640190fd5b6108b333610c69565b821115610900576040805162461bcd60e51b8152602060048201526016602482015275105111149154d4d7d31253525517d59253d31055115160521b604482015290519081900360640190fd5b600154610918906001600160a01b0316333085610bbf565b336000908152600660205260409020546109329083610d1b565b3360009081526006602052604090205560055461094f9083610d1b565b60055560408051838152905133917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4919081900360200190a25050565b6000610996610d02565b905090565b6109a3610c65565b6000546001600160a01b039081169116146109f3576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b6001600160a01b038116610a385760405162461bcd60e51b81526004018080602001828103825260268152602001806110da6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610a9b610c65565b6000546001600160a01b03908116911614610aeb576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b60008060075460ff166001811115610aff57fe5b14610b4b576040805162461bcd60e51b81526020600482015260176024820152761351551213d117d0d0531317d393d517d0531313d5d151604a1b604482015290519081900360640190fd5b6007805460ff1916600117905560408051602080825260069082015265131bd8dad95960d21b8183015290517fa44259a491d135005df1527863204fb4e7675e87912fb0ce35bd3d5da5ed9507916060908290030190a150565b600061058182610ce7565b6001546001600160a01b031681565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261056a908590610d7c565b6000610c2361063a565b6001600160a01b0316826001600160a01b03161415610c4457506000610584565b600454610c5083610ce7565b10610c5d57506000610584565b505060045490565b3390565b6000610581610c83610c7a84610ce7565b60035490610e2d565b610c8b610d02565b610e6f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ce2908490610d7c565b505050565b6001600160a01b031660009081526006602052604090205490565b6000610996600554600254610e2d90919063ffffffff16565b600082820183811015610d75576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6060610dd1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e859092919063ffffffff16565b805190915015610ce257808060200190516020811015610df057600080fd5b5051610ce25760405162461bcd60e51b815260040180806020018281038252602a815260200180611120602a913960400191505060405180910390fd5b6000610d7583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e9c565b6000818310610e7e5781610d75565b5090919050565b6060610e948484600085610f33565b949350505050565b60008184841115610f2b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ef0578181015183820152602001610ed8565b50505050905090810190601f168015610f1d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060610f3e856110a0565b610f8f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610fce5780518252601f199092019160209182019101610faf565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611030576040519150601f19603f3d011682016040523d82523d6000602084013e611035565b606091505b50915091508115611049579150610e949050565b8051156110595780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610ef0578181015183820152602001610ed8565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610e9457505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122062d97eb488d9f724752459a8ffaf3ba55786940274a7b35ecaff947d8c96722064736f6c634300060c0033000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000ba43b7400000000000000000000000000000000000000000000000000000000009502f9000000000000000000000000000000000000000000000000000000000005f5e100
Deployed Bytecode
0x60806040526004361061010d5760003560e01c8063a9059cbb11610095578063dbef61a611610064578063dbef61a614610456578063f2fde38b1461046b578063f83d08ba1461049e578063fba13bd0146104b3578063fc0c546a146104e657610117565b8063a9059cbb14610385578063b4237339146103be578063b534da0f146103d3578063b6b55f251461042c57610117565b8063715018a6116100dc578063715018a6146102e25780637e081911146102f75780638da5cb5b1461030c57806393bb90871461033d5780639599af2a1461035257610117565b80631e89d5451461011c5780631ec36bfa146102525780632974161c146102795780635bf5d54c146102ac57610117565b3661011757600080fd5b600080fd5b34801561012857600080fd5b506102506004803603604081101561013f57600080fd5b81019060208101813564010000000081111561015a57600080fd5b82018360208201111561016c57600080fd5b8035906020019184602083028401116401000000008311171561018e57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156101de57600080fd5b8201836020820111156101f057600080fd5b8035906020019184602083028401116401000000008311171561021257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104fb945050505050565b005b34801561025e57600080fd5b50610267610570565b60408051918252519081900360200190f35b34801561028557600080fd5b506102676004803603602081101561029c57600080fd5b50356001600160a01b0316610576565b3480156102b857600080fd5b506102c1610589565b604051808260018111156102d157fe5b815260200191505060405180910390f35b3480156102ee57600080fd5b50610250610592565b34801561030357600080fd5b50610267610634565b34801561031857600080fd5b5061032161063a565b604080516001600160a01b039092168252519081900360200190f35b34801561034957600080fd5b50610267610649565b34801561035e57600080fd5b506102676004803603602081101561037557600080fd5b50356001600160a01b031661064f565b34801561039157600080fd5b50610250600480360360408110156103a857600080fd5b506001600160a01b03813516906020013561065a565b3480156103ca57600080fd5b5061026761076d565b3480156103df57600080fd5b50610406600480360360208110156103f657600080fd5b50356001600160a01b0316610773565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561043857600080fd5b506102506004803603602081101561044f57600080fd5b50356107ab565b34801561046257600080fd5b5061026761098c565b34801561047757600080fd5b506102506004803603602081101561048e57600080fd5b50356001600160a01b031661099b565b3480156104aa57600080fd5b50610250610a93565b3480156104bf57600080fd5b50610267600480360360208110156104d657600080fd5b50356001600160a01b0316610ba5565b3480156104f257600080fd5b50610321610bb0565b6001546001600160a01b031660005b83518160ff16101561056a5761056233858360ff168151811061052957fe5b6020026020010151858460ff168151811061054057fe5b6020026020010151856001600160a01b0316610bbf909392919063ffffffff16565b60010161050a565b50505050565b60035481565b600061058182610c19565b90505b919050565b60075460ff1681565b61059a610c65565b6000546001600160a01b039081169116146105ea576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055481565b6000546001600160a01b031690565b60045481565b600061058182610c69565b610662610c65565b6000546001600160a01b039081169116146106b2576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b60018060075460ff1660018111156106c657fe5b14610712576040805162461bcd60e51b81526020600482015260176024820152761351551213d117d0d0531317d393d517d0531313d5d151604a1b604482015290519081900360640190fd5b600154610729906001600160a01b03168484610c90565b6040805183815290516001600160a01b038516917fe6d858f14d755446648a6e0c8ab8b5a0f58ccc7920d4c910b0454e4dcd869af0919081900360200190a2505050565b60025481565b60008060008061078285610ce7565b61078b86610c69565b610793610d02565b61079c88610c19565b93509350935093509193509193565b60008060075460ff1660018111156107bf57fe5b1461080b576040805162461bcd60e51b81526020600482015260176024820152761351551213d117d0d0531317d393d517d0531313d5d151604a1b604482015290519081900360640190fd5b60008211610855576040805162461bcd60e51b81526020600482015260126024820152714445504f5349545f56414c55455f5a45524f60701b604482015290519081900360640190fd5b61085e33610c19565b8210156108aa576040805162461bcd60e51b81526020600482015260156024820152744445504f5349545f56414c55455f4d494e494d554d60581b604482015290519081900360640190fd5b6108b333610c69565b821115610900576040805162461bcd60e51b8152602060048201526016602482015275105111149154d4d7d31253525517d59253d31055115160521b604482015290519081900360640190fd5b600154610918906001600160a01b0316333085610bbf565b336000908152600660205260409020546109329083610d1b565b3360009081526006602052604090205560055461094f9083610d1b565b60055560408051838152905133917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4919081900360200190a25050565b6000610996610d02565b905090565b6109a3610c65565b6000546001600160a01b039081169116146109f3576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b6001600160a01b038116610a385760405162461bcd60e51b81526004018080602001828103825260268152602001806110da6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610a9b610c65565b6000546001600160a01b03908116911614610aeb576040805162461bcd60e51b81526020600482018190526024820152600080516020611100833981519152604482015290519081900360640190fd5b60008060075460ff166001811115610aff57fe5b14610b4b576040805162461bcd60e51b81526020600482015260176024820152761351551213d117d0d0531317d393d517d0531313d5d151604a1b604482015290519081900360640190fd5b6007805460ff1916600117905560408051602080825260069082015265131bd8dad95960d21b8183015290517fa44259a491d135005df1527863204fb4e7675e87912fb0ce35bd3d5da5ed9507916060908290030190a150565b600061058182610ce7565b6001546001600160a01b031681565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261056a908590610d7c565b6000610c2361063a565b6001600160a01b0316826001600160a01b03161415610c4457506000610584565b600454610c5083610ce7565b10610c5d57506000610584565b505060045490565b3390565b6000610581610c83610c7a84610ce7565b60035490610e2d565b610c8b610d02565b610e6f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ce2908490610d7c565b505050565b6001600160a01b031660009081526006602052604090205490565b6000610996600554600254610e2d90919063ffffffff16565b600082820183811015610d75576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6060610dd1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e859092919063ffffffff16565b805190915015610ce257808060200190516020811015610df057600080fd5b5051610ce25760405162461bcd60e51b815260040180806020018281038252602a815260200180611120602a913960400191505060405180910390fd5b6000610d7583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e9c565b6000818310610e7e5781610d75565b5090919050565b6060610e948484600085610f33565b949350505050565b60008184841115610f2b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ef0578181015183820152602001610ed8565b50505050905090810190601f168015610f1d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060610f3e856110a0565b610f8f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610fce5780518252601f199092019160209182019101610faf565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611030576040519150601f19603f3d011682016040523d82523d6000602084013e611035565b606091505b50915091508115611049579150610e949050565b8051156110595780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610ef0578181015183820152602001610ed8565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610e9457505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122062d97eb488d9f724752459a8ffaf3ba55786940274a7b35ecaff947d8c96722064736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000ba43b7400000000000000000000000000000000000000000000000000000000009502f9000000000000000000000000000000000000000000000000000000000005f5e100
-----Decoded View---------------
Arg [0] : _token (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : _poolTotalCapacity (uint256): 50000000000
Arg [2] : _userDepositLimit (uint256): 2500000000
Arg [3] : _userDepositMinimum (uint256): 100000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 0000000000000000000000000000000000000000000000000000000ba43b7400
Arg [2] : 000000000000000000000000000000000000000000000000000000009502f900
Arg [3] : 0000000000000000000000000000000000000000000000000000000005f5e100
Deployed Bytecode Sourcemap
31844:4992:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35605:8;;;31844:4992;;;;35248:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35248:309:0;;;;;;;;-1:-1:-1;35248:309:0;;-1:-1:-1;;35248:309:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35248:309:0;;-1:-1:-1;35248:309:0;;-1:-1:-1;;;;;35248:309:0:i;:::-;;32016:31;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;34709:125;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34709:125:0;-1:-1:-1;;;;;34709:125:0;;:::i;32312:51::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;31290:148;;;;;;;;;;;;;:::i;32096:38::-;;;;;;;;;;;;;:::i;30648:79::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;30648:79:0;;;;;;;;;;;;;;32054:33;;;;;;;;;;;;;:::i;34580:121::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34580:121:0;-1:-1:-1;;;;;34580:121:0;;:::i;34067:200::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34067:200:0;;;;;;;;:::i;31977:32::-;;;;;;;;;;;;;:::i;34963:277::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34963:277:0;-1:-1:-1;;;;;34963:277:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33353:614;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33353:614:0;;:::i;34842:113::-;;;;;;;;;;;;;:::i;31593:244::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31593:244:0;-1:-1:-1;;;;;31593:244:0;;:::i;34275:169::-;;;;;;;;;;;;;:::i;34452:120::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34452:120:0;-1:-1:-1;;;;;34452:120:0;;:::i;31948:20::-;;;;;;;;;;;;;:::i;35248:309::-;35374:5;;-1:-1:-1;;;;;35374:5:0;35349:16;35413:137;35425:13;:20;35421:1;:24;;;35413:137;;;35467:71;35495:10;35507:13;35521:1;35507:16;;;;;;;;;;;;;;;;35525:9;35535:1;35525:12;;;;;;;;;;;;;;;;35467:10;-1:-1:-1;;;;;35467:27:0;;;:71;;;;;;:::i;:::-;35447:3;;35413:137;;;35248:309;;;;:::o;32016:31::-;;;;:::o;34709:125::-;34774:7;34801:25;34817:8;34801:15;:25::i;:::-;34794:32;;34709:125;;;;:::o;32312:51::-;;;;;;:::o;31290:148::-;30870:12;:10;:12::i;:::-;30860:6;;-1:-1:-1;;;;;30860:6:0;;;:22;;;30852:67;;;;;-1:-1:-1;;;30852:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;30852:67:0;;;;;;;;;;;;;;;31397:1:::1;31381:6:::0;;31360:40:::1;::::0;-1:-1:-1;;;;;31381:6:0;;::::1;::::0;31360:40:::1;::::0;31397:1;;31360:40:::1;31428:1;31411:19:::0;;-1:-1:-1;;;;;;31411:19:0::1;::::0;;31290:148::o;32096:38::-;;;;:::o;30648:79::-;30686:7;30713:6;-1:-1:-1;;;;;30713:6:0;30648:79;:::o;32054:33::-;;;;:::o;34580:121::-;34643:7;34670:23;34684:8;34670:13;:23::i;34067:200::-;30870:12;:10;:12::i;:::-;30860:6;;-1:-1:-1;;;;;30860:6:0;;;:22;;;30852:67;;;;;-1:-1:-1;;;30852:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;30852:67:0;;;;;;;;;;;;;;;34156:12:::1;::::0;32819::::1;::::0;::::1;;::::0;:22;::::1;;;;;;;32811:58;;;::::0;;-1:-1:-1;;;32811:58:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;32811:58:0;;;;;;;;;;;;;::::1;;34187:5:::2;::::0;34181:38:::2;::::0;-1:-1:-1;;;;;34187:5:0::2;34207:3:::0;34212:6;34181:25:::2;:38::i;:::-;34235:24;::::0;;;;;;;-1:-1:-1;;;;;34235:24:0;::::2;::::0;::::2;::::0;;;;;::::2;::::0;;::::2;30930:1:::1;34067:200:::0;;:::o;31977:32::-;;;;:::o;34963:277::-;35027:7;35036;35045;35054;35082:20;35093:8;35082:10;:20::i;:::-;35121:23;35135:8;35121:13;:23::i;:::-;35163:24;:22;:24::i;:::-;35206:25;35222:8;35206:15;:25::i;:::-;35074:158;;;;;;;;34963:277;;;;;:::o;33353:614::-;33414:23;;32819:12;;;;;:22;;;;;;;;32811:58;;;;;-1:-1:-1;;;32811:58:0;;;;;;;;;;;;-1:-1:-1;;;32811:58:0;;;;;;;;;;;;;;;33502:1:::1;33492:7;:11;33484:42;;;::::0;;-1:-1:-1;;;33484:42:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;33484:42:0;;;;;;;;;;;;;::::1;;33556:27;33572:10;33556:15;:27::i;:::-;33545:7;:38;;33537:72;;;::::0;;-1:-1:-1;;;33537:72:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;33537:72:0;;;;;;;;;;;;;::::1;;33639:25;33653:10;33639:13;:25::i;:::-;33628:7;:36;;33620:71;;;::::0;;-1:-1:-1;;;33620:71:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;33620:71:0;;;;;;;;;;;;;::::1;;33710:5;::::0;33704:65:::1;::::0;-1:-1:-1;;;;;33710:5:0::1;33734:10;33754:4;33761:7:::0;33704:29:::1;:65::i;:::-;33814:10;33805:20;::::0;;;:8:::1;:20;::::0;;;;;:33:::1;::::0;33830:7;33805:24:::1;:33::i;:::-;33791:10;33782:20;::::0;;;:8:::1;:20;::::0;;;;:56;33875:23:::1;::::0;:36:::1;::::0;33903:7;33875:27:::1;:36::i;:::-;33849:23;:62:::0;33929:30:::1;::::0;;;;;;;33939:10:::1;::::0;33929:30:::1;::::0;;;;;::::1;::::0;;::::1;33353:614:::0;;:::o;34842:113::-;34896:7;34923:24;:22;:24::i;:::-;34916:31;;34842:113;:::o;31593:244::-;30870:12;:10;:12::i;:::-;30860:6;;-1:-1:-1;;;;;30860:6:0;;;:22;;;30852:67;;;;;-1:-1:-1;;;30852:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;30852:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;31682:22:0;::::1;31674:73;;;;-1:-1:-1::0;;;31674:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31784:6;::::0;;31763:38:::1;::::0;-1:-1:-1;;;;;31763:38:0;;::::1;::::0;31784:6;::::1;::::0;31763:38:::1;::::0;::::1;31812:6;:17:::0;;-1:-1:-1;;;;;;31812:17:0::1;-1:-1:-1::0;;;;;31812:17:0;;;::::1;::::0;;;::::1;::::0;;31593:244::o;34275:169::-;30870:12;:10;:12::i;:::-;30860:6;;-1:-1:-1;;;;;30860:6:0;;;:22;;;30852:67;;;;;-1:-1:-1;;;30852:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;30852:67:0;;;;;;;;;;;;;;;34333:23:::1;::::0;32819:12:::1;::::0;::::1;;::::0;:22;::::1;;;;;;;32811:58;;;::::0;;-1:-1:-1;;;32811:58:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;32811:58:0;;;;;;;;;;;;;::::1;;34369:12:::2;:27:::0;;-1:-1:-1;;34369:27:0::2;34384:12;34369:27;::::0;;34412:24:::2;::::0;;::::2;::::0;;;::::2;::::0;;::::2;::::0;-1:-1:-1;;;34412:24:0;;;;;;::::2;::::0;;;;;;;;::::2;30930:1:::1;34275:169::o:0;34452:120::-;34517:7;34544:20;34555:8;34544:10;:20::i;31948:::-;;;-1:-1:-1;;;;;31948:20:0;;:::o;14945:205::-;15073:68;;;-1:-1:-1;;;;;15073:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15073:68:0;-1:-1:-1;;;15073:68:0;;;15046:96;;15066:5;;15046:19;:96::i;35656:424::-;35722:7;35828;:5;:7::i;:::-;-1:-1:-1;;;;;35816:19:0;:8;-1:-1:-1;;;;;35816:19:0;;35812:60;;;-1:-1:-1;35859:1:0;35852:8;;35812:60;35982:18;;35958:20;35969:8;35958:10;:20::i;:::-;:42;35954:83;;-1:-1:-1;36024:1:0;36017:8;;35954:83;-1:-1:-1;;36054:18:0;;;35656:424::o;18376:106::-;18464:10;18376:106;:::o;36183:172::-;36247:7;36273:74;36278:42;36299:20;36310:8;36299:10;:20::i;:::-;36278:16;;;:20;:42::i;:::-;36322:24;:22;:24::i;:::-;36273:4;:74::i;14760:177::-;14870:58;;;-1:-1:-1;;;;;14870:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14870:58:0;-1:-1:-1;;;14870:58:0;;;14843:86;;14863:5;;14843:19;:86::i;:::-;14760:177;;;:::o;36363:114::-;-1:-1:-1;;;;;36451:18:0;36424:7;36451:18;;;:8;:18;;;;;;;36363:114::o;36580:138::-;36637:7;36664:46;36686:23;;36664:17;;:21;;:46;;;;:::i;3582:181::-;3640:7;3672:5;;;3696:6;;;;3688:46;;;;;-1:-1:-1;;;3688:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3754:1;3582:181;-1:-1:-1;;;3582:181:0:o;17065:761::-;17489:23;17515:69;17543:4;17515:69;;;;;;;;;;;;;;;;;17523:5;-1:-1:-1;;;;;17515:27:0;;;:69;;;;;:::i;:::-;17599:17;;17489:95;;-1:-1:-1;17599:21:0;17595:224;;17741:10;17730:30;;;;;;;;;;;;;;;-1:-1:-1;17730:30:0;17722:85;;;;-1:-1:-1;;;17722:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4046:136;4104:7;4131:43;4135:1;4138;4131:43;;;;;;;;;;;;;;;;;:3;:43::i;36726:107::-;36785:7;36816:1;36812;:5;:13;;36824:1;36812:13;;;-1:-1:-1;36820:1:0;;36726:107;-1:-1:-1;36726:107:0:o;11838:196::-;11941:12;11973:53;11996:6;12004:4;12010:1;12013:12;11973:22;:53::i;:::-;11966:60;11838:196;-1:-1:-1;;;;11838:196:0:o;4485:192::-;4571:7;4607:12;4599:6;;;;4591:29;;;;-1:-1:-1;;;4591:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4643:5:0;;;4485:192::o;13215:979::-;13345:12;13378:18;13389:6;13378:10;:18::i;:::-;13370:60;;;;;-1:-1:-1;;;13370:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13504:12;13518:23;13545:6;-1:-1:-1;;;;;13545:11:0;13565:8;13576:4;13545:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13545:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13503:78;;;;13596:7;13592:595;;;13627:10;-1:-1:-1;13620:17:0;;-1:-1:-1;13620:17:0;13592:595;13741:17;;:21;13737:439;;14004:10;13998:17;14065:15;14052:10;14048:2;14044:19;14037:44;13952:148;14140:20;;-1:-1:-1;;;14140:20:0;;;;;;;;;;;;;;;;;14147:12;;14140:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8723:619;8783:4;9251:20;;9094:66;9291:23;;;;;;:42;;-1:-1:-1;;9318:15:0;;;9283:51;-1:-1:-1;;8723:619:0:o
Swarm Source
ipfs://62d97eb488d9f724752459a8ffaf3ba55786940274a7b35ecaff947d8c967220
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.