ETH Price: $2,682.73 (-1.14%)

Contract

0x69e51c852Fb4d7a8c47BDF438B115AD13a6bfc52
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Weth Withdraw73783232019-03-16 6:07:412166 days ago1552716461IN
0x69e51c85...13a6bfc52
0 ETH0.000163045
Open Cdp72380662019-02-18 23:59:462192 days ago1550534386IN
0x69e51c85...13a6bfc52
0.01022 ETH0.001358873
Open Cdp72104522019-02-12 9:39:542198 days ago1549964394IN
0x69e51c85...13a6bfc52
2.11436 ETH0.003078353
Open Cdp72011172019-02-10 4:35:322200 days ago1549773332IN
0x69e51c85...13a6bfc52
0.01023 ETH0.000991762.1
Weth Deposit71999432019-02-09 22:30:472201 days ago1549751447IN
0x69e51c85...13a6bfc52
20.4 ETH0.000111783
Weth Withdraw71999112019-02-09 22:23:062201 days ago1549750986IN
0x69e51c85...13a6bfc52
0 ETH0.000141863
Weth Deposit71999012019-02-09 22:20:182201 days ago1549750818IN
0x69e51c85...13a6bfc52
0.2 ETH0.000209054
Claim Ownership71998772019-02-09 22:12:102201 days ago1549750330IN
0x69e51c85...13a6bfc52
0 ETH0.000077724
Transfer Ownersh...71998492019-02-09 22:03:472201 days ago1549749827IN
0x69e51c85...13a6bfc52
0 ETH0.00017684

Latest 15 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
73783232019-03-16 6:07:412166 days ago1552716461
0x69e51c85...13a6bfc52
20.62014999 ETH
73783232019-03-16 6:07:412166 days ago1552716461
0x69e51c85...13a6bfc52
20.62014999 ETH
72380662019-02-18 23:59:462192 days ago1550534386
0x69e51c85...13a6bfc52
0.00000793 ETH
72380662019-02-18 23:59:462192 days ago1550534386
0x69e51c85...13a6bfc52
0.00000793 ETH
72380662019-02-18 23:59:462192 days ago1550534386
0x69e51c85...13a6bfc52
0.01022 ETH
72104522019-02-12 9:39:542198 days ago1549964394
0x69e51c85...13a6bfc52
0.03127008 ETH
72104522019-02-12 9:39:542198 days ago1549964394
0x69e51c85...13a6bfc52
0.03127008 ETH
72104522019-02-12 9:39:542198 days ago1549964394
0x69e51c85...13a6bfc52
2.11436 ETH
72011172019-02-10 4:35:322200 days ago1549773332
0x69e51c85...13a6bfc52
0.00000514 ETH
72011172019-02-10 4:35:322200 days ago1549773332
0x69e51c85...13a6bfc52
0.00000514 ETH
72011172019-02-10 4:35:322200 days ago1549773332
0x69e51c85...13a6bfc52
0.01023 ETH
71999432019-02-09 22:30:472201 days ago1549751447
0x69e51c85...13a6bfc52
20.4 ETH
71999112019-02-09 22:23:062201 days ago1549750986
0x69e51c85...13a6bfc52
0 ETH
71999112019-02-09 22:23:062201 days ago1549750986
0x69e51c85...13a6bfc52
0 ETH
71999012019-02-09 22:20:182201 days ago1549750818
0x69e51c85...13a6bfc52
0.2 ETH
Loading...
Loading

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

Contract Name:
LiquidLong

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-01-22
*/

pragma solidity 0.4.25;
pragma experimental ABIEncoderV2;
pragma experimental "v0.5.0";

/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/d17ae0b806b2f8e69b291284bbf30321640609e3/contracts/math/SafeMath.sol
 */
library SafeMath {
	int256 constant private INT256_MIN = -2**255;

	/**
	* @dev Multiplies two unsigned integers, reverts on 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-solidity/pull/522
		if (a == 0) {
			return 0;
		}

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

		return c;
	}

	/**
	* @dev Multiplies two signed integers, reverts on overflow.
	*/
	function mul(int256 a, int256 b) internal pure returns (int256) {
		// 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-solidity/pull/522
		if (a == 0) {
			return 0;
		}

		require(!(a == -1 && b == INT256_MIN)); // This is the only case of overflow not detected by the check below

		int256 c = a * b;
		require(c / a == b);

		return c;
	}

	/**
	* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
	*/
	function div(uint256 a, uint256 b) internal pure returns (uint256) {
		// Solidity only automatically asserts when dividing by 0
		require(b > 0);
		uint256 c = a / b;
		// assert(a == b * c + a % b); // There is no case in which this doesn't hold

		return c;
	}

	/**
	* @dev Integer division of two signed integers truncating the quotient, reverts on division by zero.
	*/
	function div(int256 a, int256 b) internal pure returns (int256) {
		require(b != 0); // Solidity only automatically asserts when dividing by 0
		require(!(b == -1 && a == INT256_MIN)); // This is the only case of overflow

		int256 c = a / b;

		return c;
	}

	/**
	* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
	*/
	function sub(uint256 a, uint256 b) internal pure returns (uint256) {
		require(b <= a);
		uint256 c = a - b;

		return c;
	}

	/**
	* @dev Subtracts two signed integers, reverts on overflow.
	*/
	function sub(int256 a, int256 b) internal pure returns (int256) {
		int256 c = a - b;
		require((b >= 0 && c <= a) || (b < 0 && c > a));

		return c;
	}

	/**
	* @dev Adds two unsigned integers, reverts on overflow.
	*/
	function add(uint256 a, uint256 b) internal pure returns (uint256) {
		uint256 c = a + b;
		require(c >= a);

		return c;
	}

	/**
	* @dev Adds two signed integers, reverts on overflow.
	*/
	function add(int256 a, int256 b) internal pure returns (int256) {
		int256 c = a + b;
		require((b >= 0 && c >= a) || (b < 0 && c < a));

		return c;
	}

	/**
	* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), reverts when dividing by zero.
	*/
	function mod(uint256 a, uint256 b) internal pure returns (uint256) {
		require(b != 0);
		return a % b;
	}
}

/**
* @title Convenience and rounding functions when dealing with numbers already factored by 10**18 or 10**27
* @dev Math operations with safety checks that throw on error
* https://github.com/dapphub/ds-math/blob/87bef2f67b043819b7195ce6df3058bd3c321107/src/math.sol
*/
library SafeMathFixedPoint {
	using SafeMath for uint256;

	function mul27(uint256 x, uint256 y) internal pure returns (uint256 z) {
		z = x.mul(y).add(5 * 10**26).div(10**27);
	}
	function mul18(uint256 x, uint256 y) internal pure returns (uint256 z) {
		z = x.mul(y).add(5 * 10**17).div(10**18);
	}

	function div18(uint256 x, uint256 y) internal pure returns (uint256 z) {
		z = x.mul(10**18).add(y.div(2)).div(y);
	}
	function div27(uint256 x, uint256 y) internal pure returns (uint256 z) {
		z = x.mul(10**27).add(y.div(2)).div(y);
	}
}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20Basic.sol
 */
contract ERC20Basic {
	function totalSupply() public view returns (uint256);
	function balanceOf(address who) public view returns (uint256);
	function transfer(address to, uint256 value) public returns (bool);
	event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20.sol
 */
contract ERC20 is ERC20Basic {
	function allowance(address owner, address spender) public view returns (uint256);
	function transferFrom(address from, address to, uint256 value) public returns (bool);
	function approve(address spender, uint256 value) public returns (bool);
	event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
 */
contract Ownable {
	address public owner;

	event OwnershipRenounced(address indexed previousOwner);
	event OwnershipTransferred(
		address indexed previousOwner,
		address indexed newOwner
	);

	/**
	 * @dev The Ownable constructor sets the original `owner` of the contract to the sender
	 * account.
	 */
	constructor() public {
		owner = msg.sender;
	}

	/**
	 * @dev Throws if called by any account other than the owner.
	 */
	modifier onlyOwner() {
		require(msg.sender == owner);
		_;
	}

	/**
	 * @dev Allows the current owner to transfer control of the contract to a newOwner.
	 * @param newOwner The address to transfer ownership to.
	 */
	function transferOwnership(address newOwner) public onlyOwner {
		require(newOwner != address(0));
		emit OwnershipTransferred(owner, newOwner);
		owner = newOwner;
	}

	/**
	 * @dev Allows the current owner to relinquish control of the contract.
	 */
	function renounceOwnership() public onlyOwner {
		emit OwnershipRenounced(owner);
		owner = address(0);
	}
}

/**
 * @title Claimable
 * @dev Extension for the Ownable contract, where the ownership needs to be claimed.
 * This allows the new owner to accept the transfer.
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Claimable.sol
 */
contract Claimable is Ownable {
	address public pendingOwner;

	/**
	 * @dev Modifier throws if called by any account other than the pendingOwner.
	 */
	modifier onlyPendingOwner() {
		require(msg.sender == pendingOwner);
		_;
	}

	/**
	 * @dev Allows the current owner to set the pendingOwner address.
	 * @param newOwner The address to transfer ownership to.
	 */
	function transferOwnership(address newOwner) onlyOwner public {
		pendingOwner = newOwner;
	}

	/**
	 * @dev Allows the pendingOwner address to finalize the transfer.
	 */
	function claimOwnership() onlyPendingOwner public {
		emit OwnershipTransferred(owner, pendingOwner);
		owner = pendingOwner;
		pendingOwner = address(0);
	}
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/lifecycle/Pausable.sol
 */
contract Pausable is Ownable {
	event Pause();
	event Unpause();

	bool public paused = false;


	/**
	 * @dev Modifier to make a function callable only when the contract is not paused.
	 */
	modifier whenNotPaused() {
		require(!paused);
		_;
	}

	/**
	 * @dev Modifier to make a function callable only when the contract is paused.
	 */
	modifier whenPaused() {
		require(paused);
		_;
	}

	/**
	 * @dev called by the owner to pause, triggers stopped state
	 */
	function pause() onlyOwner whenNotPaused public {
		paused = true;
		emit Pause();
	}

	/**
	 * @dev called by the owner to unpause, returns to normal state
	 */
	function unpause() onlyOwner whenPaused public {
		paused = false;
		emit Unpause();
	}
}

contract Dai is ERC20 {

}

contract Weth is ERC20 {
	function deposit() public payable;
	function withdraw(uint wad) public;
}

contract Mkr is ERC20 {

}

contract Peth is ERC20 {

}

contract Oasis {
	function getBuyAmount(ERC20 tokenToBuy, ERC20 tokenToPay, uint256 amountToPay) external view returns(uint256 amountBought);
	function getPayAmount(ERC20 tokenToPay, ERC20 tokenToBuy, uint amountToBuy) public constant returns (uint amountPaid);
	function getBestOffer(ERC20 sell_gem, ERC20 buy_gem) public constant returns(uint offerId);
	function getWorseOffer(uint id) public constant returns(uint offerId);
	function getOffer(uint id) public constant returns (uint pay_amt, ERC20 pay_gem, uint buy_amt, ERC20 buy_gem);
	function sellAllAmount(ERC20 pay_gem, uint pay_amt, ERC20 buy_gem, uint min_fill_amount) public returns (uint fill_amt);
}

contract Medianizer {
	function read() external view returns(bytes32);
}

contract Maker {
	function sai() external view returns(Dai);
	function gem() external view returns(Weth);
	function gov() external view returns(Mkr);
	function skr() external view returns(Peth);
	function pip() external view returns(Medianizer);

	// Join-Exit Spread
	 uint256 public gap;

	struct Cup {
		// CDP owner
		address lad;
		// Locked collateral (in SKR)
		uint256 ink;
		// Outstanding normalised debt (tax only)
		uint256 art;
		// Outstanding normalised debt
		uint256 ire;
	}

	uint256 public cupi;
	mapping (bytes32 => Cup) public cups;

	function lad(bytes32 cup) public view returns (address);
	function per() public view returns (uint ray);
	function tab(bytes32 cup) public returns (uint);
	function ink(bytes32 cup) public returns (uint);
	function rap(bytes32 cup) public returns (uint);
	function chi() public returns (uint);

	function open() public returns (bytes32 cup);
	function give(bytes32 cup, address guy) public;
	function lock(bytes32 cup, uint wad) public;
	function draw(bytes32 cup, uint wad) public;
	function join(uint wad) public;
	function wipe(bytes32 cup, uint wad) public;
}

contract DSProxy {
	// Technically from DSAuth
	address public owner;

	function execute(address _target, bytes _data) public payable returns (bytes32 response);
}

contract ProxyRegistry {
	mapping(address => DSProxy) public proxies;
	function build(address owner) public returns (DSProxy proxy);
}

contract LiquidLong is Ownable, Claimable, Pausable {
	using SafeMath for uint256;
	using SafeMathFixedPoint for uint256;

	uint256 public providerFeePerEth;

	Oasis public oasis;
	Maker public maker;
	Dai public dai;
	Weth public weth;
	Peth public peth;
	Mkr public mkr;

	ProxyRegistry public proxyRegistry;

	event NewCup(address user, bytes32 cup);

	constructor(Oasis _oasis, Maker _maker, ProxyRegistry _proxyRegistry) public payable {
		providerFeePerEth = 0.01 ether;

		oasis = _oasis;
		maker = _maker;
		dai = maker.sai();
		weth = maker.gem();
		peth = maker.skr();
		mkr = maker.gov();

		// Oasis buy/sell
		dai.approve(address(_oasis), uint256(-1));
		// Wipe
		dai.approve(address(_maker), uint256(-1));
		mkr.approve(address(_maker), uint256(-1));
		// Join
		weth.approve(address(_maker), uint256(-1));
		// Lock
		peth.approve(address(_maker), uint256(-1));

		proxyRegistry = _proxyRegistry;

		if (msg.value > 0) {
			weth.deposit.value(msg.value)();
		}
	}

	// Receive ETH from WETH withdraw
	function () external payable {
	}

	function wethDeposit() public payable {
		weth.deposit.value(msg.value)();
	}

	function wethWithdraw(uint256 _amount) public onlyOwner {
		weth.withdraw(_amount);
		owner.transfer(_amount);
	}

	function attowethBalance() public view returns (uint256 _attoweth) {
		return weth.balanceOf(address(this));
	}

	function ethWithdraw() public onlyOwner {
		uint256 _amount = address(this).balance;
		owner.transfer(_amount);
	}

	function transferTokens(ERC20 _token) public onlyOwner {
		_token.transfer(owner, _token.balanceOf(this));
	}

	function ethPriceInUsd() public view returns (uint256 _attousd) {
		return uint256(maker.pip().read());
	}

	function estimateDaiSaleProceeds(uint256 _attodaiToSell) public view returns (uint256 _daiPaid, uint256 _wethBought) {
		return getPayPriceAndAmount(dai, weth, _attodaiToSell);
	}

	// buy/pay are from the perspective of the taker/caller (Oasis contracts use buy/pay terminology from perspective of the maker)
	function getPayPriceAndAmount(ERC20 _payGem, ERC20 _buyGem, uint256 _payDesiredAmount) public view returns (uint256 _paidAmount, uint256 _boughtAmount) {
		uint256 _offerId = oasis.getBestOffer(_buyGem, _payGem);
		while (_offerId != 0) {
			uint256 _payRemaining = _payDesiredAmount.sub(_paidAmount);
			(uint256 _buyAvailableInOffer,  , uint256 _payAvailableInOffer,) = oasis.getOffer(_offerId);
			if (_payRemaining <= _payAvailableInOffer) {
				uint256 _buyRemaining = _payRemaining.mul(_buyAvailableInOffer).div(_payAvailableInOffer);
				_paidAmount = _paidAmount.add(_payRemaining);
				_boughtAmount = _boughtAmount.add(_buyRemaining);
				break;
			}
			_paidAmount = _paidAmount.add(_payAvailableInOffer);
			_boughtAmount = _boughtAmount.add(_buyAvailableInOffer);
			_offerId = oasis.getWorseOffer(_offerId);
		}
		return (_paidAmount, _boughtAmount);
	}

	modifier wethBalanceIncreased() {
		uint256 _startingAttowethBalance = weth.balanceOf(this);
		_;
		require(weth.balanceOf(this) > _startingAttowethBalance);
	}

	// TODO: change affiliate fee to be 50% of service fee, no parameter needed
	function openCdp(uint256 _leverage, uint256 _leverageSizeInAttoeth, uint256 _allowedFeeInAttoeth, address _affiliateAddress) public payable wethBalanceIncreased returns (bytes32 _cdpId) {
		require(_leverage >= 100 && _leverage <= 300);
		uint256 _lockedInCdpInAttoeth = _leverageSizeInAttoeth.mul(_leverage).div(100);
		uint256 _loanInAttoeth = _lockedInCdpInAttoeth.sub(_leverageSizeInAttoeth);
		uint256 _feeInAttoeth = _loanInAttoeth.mul18(providerFeePerEth);
		require(_feeInAttoeth <= _allowedFeeInAttoeth);
		uint256 _drawInAttodai = _loanInAttoeth.mul18(uint256(maker.pip().read()));
		uint256 _attopethLockedInCdp = _lockedInCdpInAttoeth.div27(maker.per());

		// Convert all incoming eth to weth (we will pay back later if too much)
		weth.deposit.value(msg.value)();
		// Open CDP
		_cdpId = maker.open();
		// Convert WETH into PETH
		maker.join(_attopethLockedInCdp);
		// Store PETH in CDP
		maker.lock(_cdpId, _attopethLockedInCdp);
		// Withdraw DAI from CDP
		maker.draw(_cdpId, _drawInAttodai);
		// Sell DAI for WETH
		sellDai(_drawInAttodai, _lockedInCdpInAttoeth, _feeInAttoeth);
		// Pay provider fee
		if (_affiliateAddress != address(0)) {
			// Fee charged is constant. If affiliate provided, split fee with affiliate
			// Don't bother sending eth to owner, the owner has all non-async-sent eth anyway
			weth.transfer(_affiliateAddress, _feeInAttoeth.div(2));
		}

		emit NewCup(msg.sender, _cdpId);

		giveCdpToProxy(msg.sender, _cdpId);
	}

	function giveCdpToProxy(address _ownerOfProxy, bytes32 _cdpId) private {
		DSProxy _proxy = proxyRegistry.proxies(_ownerOfProxy);
		if (_proxy == DSProxy(0) || _proxy.owner() != _ownerOfProxy) {
			_proxy = proxyRegistry.build(_ownerOfProxy);
		}
		// Send the CDP to the owner's proxy instead of directly to owner
		maker.give(_cdpId, _proxy);
	}

	// extracted function to mitigate stack depth issues
	function sellDai(uint256 _drawInAttodai, uint256 _lockedInCdpInAttoeth, uint256 _feeInAttoeth) private {
		uint256 _wethBoughtInAttoweth = oasis.sellAllAmount(dai, _drawInAttodai, weth, 0);
		// SafeMath failure below catches not enough eth provided
		uint256 _refundDue = msg.value.add(_wethBoughtInAttoweth).sub(_lockedInCdpInAttoeth).sub(_feeInAttoeth);
		if (_refundDue > 0) {
			weth.withdraw(_refundDue);
			require(msg.sender.call.value(_refundDue)());
		}
	}
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"transferTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_payGem","type":"address"},{"name":"_buyGem","type":"address"},{"name":"_payDesiredAmount","type":"uint256"}],"name":"getPayPriceAndAmount","outputs":[{"name":"_paidAmount","type":"uint256"},{"name":"_boughtAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_leverage","type":"uint256"},{"name":"_leverageSizeInAttoeth","type":"uint256"},{"name":"_allowedFeeInAttoeth","type":"uint256"},{"name":"_affiliateAddress","type":"address"}],"name":"openCdp","outputs":[{"name":"_cdpId","type":"bytes32"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"wethDeposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"ethWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_attodaiToSell","type":"uint256"}],"name":"estimateDaiSaleProceeds","outputs":[{"name":"_daiPaid","type":"uint256"},{"name":"_wethBought","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethPriceInUsd","outputs":[{"name":"_attousd","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"peth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mkr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"attowethBalance","outputs":[{"name":"_attoweth","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"wethWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"oasis","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxyRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"providerFeePerEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_oasis","type":"address"},{"name":"_maker","type":"address"},{"name":"_proxyRegistry","type":"address"}],"payable":true,"stateMutability":"payable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"user","type":"address"},{"indexed":false,"name":"cup","type":"bytes32"}],"name":"NewCup","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Deployed Bytecode

0x60806040526004361061012f5763ffffffff60e060020a6000350416630c89a0df81146101315780631a2def78146101515780632b1841d21461018857806335cb1f07146101a85780633f4ba83a146101b05780633fc8cef3146101c55780634e71e0c8146101e757806350655d8c146101fc578063540c755f146102115780635988899c146102265780635c975abb14610246578063683e0bcd14610268578063715018a61461027d5780637d211c75146102925780637e992cb8146102a75780638456cb59146102bc5780638da5cb5b146102d1578063997a12fa146102f35780639b121e7c14610308578063a3afda1a14610328578063b50cbd9f1461033d578063e30c397814610352578063f2fde38b14610367578063f4b9fa7514610387578063fa72c53e1461039c575b005b34801561013d57600080fd5b5061012f61014c366004611a22565b6103b1565b34801561015d57600080fd5b5061017161016c366004611a40565b6104e2565b60405161017f929190611bfa565b60405180910390f35b61019b610196366004611b0c565b610767565b60405161017f9190611bd1565b61012f610e3c565b3480156101bc57600080fd5b5061012f610eaa565b3480156101d157600080fd5b506101da610f33565b60405161017f9190611c08565b3480156101f357600080fd5b5061012f610f42565b34801561020857600080fd5b506101da610fca565b34801561021d57600080fd5b5061012f610fd9565b34801561023257600080fd5b50610171610241366004611a8d565b61102e565b34801561025257600080fd5b5061025b611059565b60405161017f9190611bc3565b34801561027457600080fd5b5061019b61107a565b34801561028957600080fd5b5061012f61117d565b34801561029e57600080fd5b506101da6111e9565b3480156102b357600080fd5b506101da6111f8565b3480156102c857600080fd5b5061012f611207565b3480156102dd57600080fd5b506102e66112a6565b60405161017f9190611b94565b3480156102ff57600080fd5b5061019b6112b5565b34801561031457600080fd5b5061012f610323366004611a8d565b611317565b34801561033457600080fd5b506101da6113e2565b34801561034957600080fd5b506101da6113f1565b34801561035e57600080fd5b506102e6611400565b34801561037357600080fd5b5061012f610382366004611984565b61140f565b34801561039357600080fd5b506101da611455565b3480156103a857600080fd5b5061019b611464565b600054600160a060020a031633146103c857600080fd5b6000546040517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038084169263a9059cbb9291169083906370a082319061041c903090600401611c08565b60206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061046c91908101906119e6565b6040518363ffffffff1660e060020a02815260040161048c929190611ba8565b602060405180830381600087803b1580156104a657600080fd5b505af11580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104de91908101906119c8565b5050565b6003546040517f0374fc6f000000000000000000000000000000000000000000000000000000008152600091829182918291829182918291600160a060020a031690630374fc6f9061053a908c908e90600401611c54565b60206040518083038186803b15801561055257600080fd5b505afa158015610566573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061058a91908101906119e6565b94505b841561075a576105a3888863ffffffff61146a16565b6003546040517f4579268a000000000000000000000000000000000000000000000000000000008152919550600160a060020a031690634579268a906105ed908890600401611bd1565b60806040518083038186803b15801561060557600080fd5b505afa158015610619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061063d9190810190611aab565b50935050925081841115156106975761066c82610660868663ffffffff61148816565b9063ffffffff6114bd16565b905061067e878563ffffffff6114e016565b9650610690868263ffffffff6114e016565b955061075a565b6106a7878363ffffffff6114e016565b96506106b9868463ffffffff6114e016565b6003546040517f943911bc000000000000000000000000000000000000000000000000000000008152919750600160a060020a03169063943911bc90610703908890600401611bd1565b60206040518083038186803b15801561071b57600080fd5b505afa15801561072f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061075391908101906119e6565b945061058d565b5050505050935093915050565b6006546040517f70a08231000000000000000000000000000000000000000000000000000000008152600091829182918291829182918291600160a060020a0316906370a08231906107bd903090600401611c08565b60206040518083038186803b1580156107d557600080fd5b505afa1580156107e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061080d91908101906119e6565b905060648b10158015610822575061012c8b11155b151561082d57600080fd5b61084260646106608c8e63ffffffff61148816565b9550610854868b63ffffffff61146a16565b945061086b600254866114f290919063ffffffff16565b93508884111561087a57600080fd5b610986600460009054906101000a9004600160a060020a0316600160a060020a031663d741e2f96040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156108ce57600080fd5b505afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109069190810190611a04565b600160a060020a03166357de26a46040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561094157600080fd5b505afa158015610955573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061097991908101906119e6565b869063ffffffff6114f216565b9250610a21600460009054906101000a9004600160a060020a0316600160a060020a0316637ec9c3b86040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156109dc57600080fd5b505afa1580156109f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a1491908101906119e6565b879063ffffffff61152816565b9150600660009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0346040518263ffffffff1660e060020a0281526004016000604051808303818588803b158015610a7657600080fd5b505af1158015610a8a573d6000803e3d6000fd5b505060048054604080517ffcfff16f0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216955063fcfff16f94508083019350602092908290030181600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b2491908101906119e6565b600480546040517f049878f3000000000000000000000000000000000000000000000000000000008152929950600160a060020a03169163049878f391610b6d91869101611bd1565b600060405180830381600087803b158015610b8757600080fd5b505af1158015610b9b573d6000803e3d6000fd5b5050600480546040517fb3b77a51000000000000000000000000000000000000000000000000000000008152600160a060020a03909116935063b3b77a519250610be9918b91879101611bfa565b600060405180830381600087803b158015610c0357600080fd5b505af1158015610c17573d6000803e3d6000fd5b5050600480546040517f440f19ba000000000000000000000000000000000000000000000000000000008152600160a060020a03909116935063440f19ba9250610c65918b91889101611bfa565b600060405180830381600087803b158015610c7f57600080fd5b505af1158015610c93573d6000803e3d6000fd5b50505050610ca283878661155e565b600160a060020a03881615610d4857600654600160a060020a031663a9059cbb89610cd487600263ffffffff6114bd16565b6040518363ffffffff1660e060020a028152600401610cf4929190611ba8565b602060405180830381600087803b158015610d0e57600080fd5b505af1158015610d22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d4691908101906119c8565b505b7f09d6d33a845fa3f52a386be17335b767ed30f5ea181dd01e2fbf678af3c251573388604051610d79929190611ba8565b60405180910390a1610d8b33886116d5565b6006546040517f70a082310000000000000000000000000000000000000000000000000000000081528291600160a060020a0316906370a0823190610dd4903090600401611c08565b60206040518083038186803b158015610dec57600080fd5b505afa158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e2491908101906119e6565b11610e2e57600080fd5b505050505050949350505050565b600660009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0346040518263ffffffff1660e060020a0281526004016000604051808303818588803b158015610e8f57600080fd5b505af1158015610ea3573d6000803e3d6000fd5b5050505050565b600054600160a060020a03163314610ec157600080fd5b60015474010000000000000000000000000000000000000000900460ff161515610eea57600080fd5b6001805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600654600160a060020a031681565b600154600160a060020a03163314610f5957600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600454600160a060020a031681565b60008054600160a060020a03163314610ff157600080fd5b5060008054604051303192600160a060020a03909216916108fc841502918491818181858888f193505050501580156104de573d6000803e3d6000fd5b600554600654600091829161105091600160a060020a039081169116856104e2565b91509150915091565b60015474010000000000000000000000000000000000000000900460ff1681565b6000600460009054906101000a9004600160a060020a0316600160a060020a031663d741e2f96040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111059190810190611a04565b600160a060020a03166357de26a46040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561114057600080fd5b505afa158015611154573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061117891908101906119e6565b905090565b600054600160a060020a0316331461119457600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600754600160a060020a031681565b600854600160a060020a031681565b600054600160a060020a0316331461121e57600080fd5b60015474010000000000000000000000000000000000000000900460ff161561124657600080fd5b6001805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600054600160a060020a031681565b6006546040517f70a08231000000000000000000000000000000000000000000000000000000008152600091600160a060020a0316906370a08231906112ff903090600401611b94565b60206040518083038186803b15801561114057600080fd5b600054600160a060020a0316331461132e57600080fd5b6006546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600160a060020a0390911690632e1a7d4d90611377908490600401611bd1565b600060405180830381600087803b15801561139157600080fd5b505af11580156113a5573d6000803e3d6000fd5b505060008054604051600160a060020a03909116935084156108fc0292508491818181858888f193505050501580156104de573d6000803e3d6000fd5b600354600160a060020a031681565b600954600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a0316331461142657600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600554600160a060020a031681565b60025481565b6000808383111561147a57600080fd5b5050808203805b5092915050565b60008083151561149b5760009150611481565b508282028284828115156114ab57fe5b04146114b657600080fd5b9392505050565b6000808083116114cc57600080fd5b82848115156114d757fe5b04949350505050565b6000828201838110156114b657600080fd5b60006114b6670de0b6b3a76400006106606706f05b59d3b2000061151c878763ffffffff61148816565b9063ffffffff6114e016565b60006114b68261066061154282600263ffffffff6114bd16565b61151c876b033b2e3c9fd0803ce800000063ffffffff61148816565b6003546005546006546040517f0621b4f60000000000000000000000000000000000000000000000000000000081526000938493600160a060020a0391821693630621b4f6936115ba93928316928b9216908790600401611c16565b602060405180830381600087803b1580156115d457600080fd5b505af11580156115e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061160c91908101906119e6565b9150611630836116248681348763ffffffff6114e016565b9063ffffffff61146a16565b90506000811115610ea3576006546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600160a060020a0390911690632e1a7d4d90611684908490600401611bd1565b600060405180830381600087803b15801561169e57600080fd5b505af11580156116b2573d6000803e3d6000fd5b5050604051339250839150600081818185875af1925050501515610ea357600080fd5b6009546040517fc4552791000000000000000000000000000000000000000000000000000000008152600091600160a060020a03169063c45527919061171f908690600401611b94565b60206040518083038186803b15801561173757600080fd5b505afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061176f9190810190611a04565b9050600160a060020a038116158061180c575082600160a060020a031681600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156117c857600080fd5b505afa1580156117dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061180091908101906119aa565b600160a060020a031614155b156118af576009546040517ff3701da2000000000000000000000000000000000000000000000000000000008152600160a060020a039091169063f3701da29061185a908690600401611b94565b602060405180830381600087803b15801561187457600080fd5b505af1158015611888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506118ac9190810190611a04565b90505b600480546040517fbaa8529c000000000000000000000000000000000000000000000000000000008152600160a060020a039091169163baa8529c916118f9918691869101611bdf565b600060405180830381600087803b15801561191357600080fd5b505af1158015611927573d6000803e3d6000fd5b50505050505050565b60006114b68235611c62565b60006114b68251611c62565b60006114b68251611c6e565b60006114b68251611c73565b60006114b68251611c76565b60006114b68235611c76565b60006114b68235611c73565b60006020828403121561199657600080fd5b60006119a28484611930565b949350505050565b6000602082840312156119bc57600080fd5b60006119a2848461193c565b6000602082840312156119da57600080fd5b60006119a28484611948565b6000602082840312156119f857600080fd5b60006119a28484611954565b600060208284031215611a1657600080fd5b60006119a28484611960565b600060208284031215611a3457600080fd5b60006119a2848461196c565b600080600060608486031215611a5557600080fd5b6000611a61868661196c565b9350506020611a728682870161196c565b9250506040611a8386828701611978565b9150509250925092565b600060208284031215611a9f57600080fd5b60006119a28484611978565b60008060008060808587031215611ac157600080fd5b6000611acd8787611954565b9450506020611ade87828801611960565b9350506040611aef87828801611954565b9250506060611b0087828801611960565b91505092959194509250565b60008060008060808587031215611b2257600080fd5b6000611b2e8787611978565b9450506020611b3f87828801611978565b9350506040611b5087828801611978565b9250506060611b0087828801611930565b611b6a81611c62565b82525050565b611b6a81611c6e565b611b6a81611c73565b611b6a81611c76565b611b6a81611c81565b60208101611ba28284611b61565b92915050565b60408101611bb68285611b61565b6114b66020830184611b79565b60208101611ba28284611b70565b60208101611ba28284611b79565b60408101611bed8285611b79565b6114b66020830184611b82565b60408101611bb68285611b79565b60208101611ba28284611b82565b60808101611c248287611b82565b611c316020830186611b79565b611c3e6040830185611b82565b611c4b6060830184611b8b565b95945050505050565b60408101611bed8285611b82565b600160a060020a031690565b151590565b90565b6000611ba282611c62565b6000611ba282611c735600a265627a7a723058208235ac8ed14ae35de3e768673b5f9adf3803b2ce1d5d26f44f36e6af12982a8d6c6578706572696d656e74616cf50037

Swarm Source

bzzr://8235ac8ed14ae35de3e768673b5f9adf3803b2ce1d5d26f44f36e6af12982a8d

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  ]
[ 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.