Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 20,111 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Mint | 19796534 | 60 days ago | IN | 0 ETH | 0.00098026 | ||||
Mint | 19796532 | 60 days ago | IN | 0 ETH | 0.00098375 | ||||
Redeem | 19796530 | 60 days ago | IN | 0 ETH | 0.00059615 | ||||
Redeem | 19796150 | 60 days ago | IN | 0 ETH | 0.00082217 | ||||
Redeem | 19795252 | 60 days ago | IN | 0 ETH | 0.00067381 | ||||
Redeem | 19791114 | 61 days ago | IN | 0 ETH | 0.00098922 | ||||
Redeem | 19791112 | 61 days ago | IN | 0 ETH | 0.00118414 | ||||
Redeem | 19791110 | 61 days ago | IN | 0 ETH | 0.00116236 | ||||
Redeem | 19791079 | 61 days ago | IN | 0 ETH | 0.00121749 | ||||
Redeem | 19791040 | 61 days ago | IN | 0 ETH | 0.00108612 | ||||
Redeem | 19789717 | 61 days ago | IN | 0 ETH | 0.00121177 | ||||
Redeem | 19789413 | 61 days ago | IN | 0 ETH | 0.00068986 | ||||
Mint | 19786533 | 61 days ago | IN | 0 ETH | 0.00098541 | ||||
Redeem | 19786079 | 61 days ago | IN | 0 ETH | 0.00057836 | ||||
Redeem | 19785662 | 61 days ago | IN | 0 ETH | 0.00058696 | ||||
Redeem | 19785478 | 61 days ago | IN | 0 ETH | 0.00065087 | ||||
Redeem | 19785081 | 62 days ago | IN | 0 ETH | 0.00071427 | ||||
Redeem | 19785062 | 62 days ago | IN | 0 ETH | 0.00067787 | ||||
Mint | 19783284 | 62 days ago | IN | 0 ETH | 0.00139808 | ||||
Redeem | 19783239 | 62 days ago | IN | 0 ETH | 0.00176447 | ||||
Mint | 19783230 | 62 days ago | IN | 0 ETH | 0.00272936 | ||||
Mint | 19783229 | 62 days ago | IN | 0 ETH | 0.00159361 | ||||
Mint | 19783154 | 62 days ago | IN | 0 ETH | 0.00176477 | ||||
Mint | 19783006 | 62 days ago | IN | 0 ETH | 0.00123635 | ||||
Redeem | 19782999 | 62 days ago | IN | 0 ETH | 0.00128835 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
17964423 | 317 days ago | 0.00655761 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x880c0A99...3d7270F55 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Curve
Compiler Version
v0.5.0+commit.1d4f565a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-06-09 */ // File: @openzeppelin/contracts/GSN/Context.sol pragma solidity ^0.5.0; /* * @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. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/ownership/Ownable.sol pragma solidity ^0.5.0; /** * @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. * * 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(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _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 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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); } // File: @openzeppelin/contracts/math/SafeMath.sol pragma solidity ^0.5.0; /** * @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. * * _Available since v2.4.0._ */ 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. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: contracts/I_Token.sol pragma solidity 0.5.0; /** * @title Interface Token * @notice Allows the Curve contract to interact with the token contract * without importing the entire smart contract. For documentation * please see the token contract: * https://gitlab.com/linumlabs/swarm-token * @dev This is not a full interface of the token, but instead a partial * interface covering only the functions that are needed by the curve. */ interface I_Token { // ------------------------------------------------------------------------- // IERC20 functions // ------------------------------------------------------------------------- function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); // ------------------------------------------------------------------------- // ERC20 functions // ------------------------------------------------------------------------- function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); // ------------------------------------------------------------------------- // ERC20 Detailed // ------------------------------------------------------------------------- function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // ------------------------------------------------------------------------- // Burnable functions // ------------------------------------------------------------------------- function burn(uint256 amount) external; function burnFrom(address account, uint256 amount) external; // ------------------------------------------------------------------------- // Mintable functions // ------------------------------------------------------------------------- function isMinter(address account) external view returns (bool); function addMinter(address account) external; function renounceMinter() external; function mint(address account, uint256 amount) external returns (bool); // ------------------------------------------------------------------------- // Capped functions // ------------------------------------------------------------------------- function cap() external view returns (uint256); } // File: contracts/I_Curve.sol pragma solidity 0.5.0; /** * @title Interface Curve * @notice This contract acts as an interface to the curve contract. For * documentation please see the curve smart contract. */ interface I_Curve { // ------------------------------------------------------------------------- // View functions // ------------------------------------------------------------------------- /** * @notice This function is only callable after the curve contract has been * initialized. * @param _amount The amount of tokens a user wants to buy * @return uint256 The cost to buy the _amount of tokens in the collateral * currency (see collateral token). */ function buyPrice(uint256 _amount) external view returns (uint256 collateralRequired); /** * @notice This function is only callable after the curve contract has been * initialized. * @param _amount The amount of tokens a user wants to sell * @return collateralReward The reward for selling the _amount of tokens in the * collateral currency (see collateral token). */ function sellReward(uint256 _amount) external view returns (uint256 collateralReward); /** * @return If the curve is both active and initialised. */ function isCurveActive() external view returns (bool); /** * @return The address of the collateral token (DAI) */ function collateralToken() external view returns (address); /** * @return The address of the bonded token (BZZ). */ function bondedToken() external view returns (address); /** * @return The required collateral amount (DAI) to initialise the curve. */ function requiredCollateral(uint256 _initialSupply) external view returns (uint256); // ------------------------------------------------------------------------- // State modifying functions // ------------------------------------------------------------------------- /** * @notice This function initializes the curve contract, and ensure the * curve has the required permissions on the token contract needed * to function. */ function init() external; /** * @param _amount The amount of tokens (BZZ) the user wants to buy. * @param _maxCollateralSpend The max amount of collateral (DAI) the user is * willing to spend in order to buy the _amount of tokens. * @return The status of the mint. Note that should the total cost of the * purchase exceed the _maxCollateralSpend the transaction will revert. */ function mint(uint256 _amount, uint256 _maxCollateralSpend) external returns (bool success); /** * @param _amount The amount of tokens (BZZ) the user wants to buy. * @param _maxCollateralSpend The max amount of collateral (DAI) the user is * willing to spend in order to buy the _amount of tokens. * @param _to The address to send the tokens to. * @return The status of the mint. Note that should the total cost of the * purchase exceed the _maxCollateralSpend the transaction will revert. */ function mintTo( uint256 _amount, uint256 _maxCollateralSpend, address _to ) external returns (bool success); /** * @param _amount The amount of tokens (BZZ) the user wants to sell. * @param _minCollateralReward The min amount of collateral (DAI) the user is * willing to receive for their tokens. * @return The status of the burn. Note that should the total reward of the * burn be below the _minCollateralReward the transaction will revert. */ function redeem(uint256 _amount, uint256 _minCollateralReward) external returns (bool success); /** * @notice Shuts down the curve, disabling buying, selling and both price * functions. Can only be called by the owner. Will renounce the * minter role on the bonded token. */ function shutDown() external; } // File: contracts/Curve.sol pragma solidity 0.5.0; contract Curve is Ownable, I_Curve { using SafeMath for uint256; // The instance of the token this curve controls (has mint rights to) I_Token internal bzz_; // The instance of the collateral token that is used to buy and sell tokens IERC20 internal dai_; // Stores if the curve has been initialised bool internal init_; // The active state of the curve (false after emergency shutdown) bool internal active_; // Mutex guard for state modifying functions uint256 private status_; // States for the guard uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; // ------------------------------------------------------------------------- // Events // ------------------------------------------------------------------------- // Emitted when tokens are minted event mintTokens( address indexed buyer, // The address of the buyer uint256 amount, // The amount of bonded tokens to mint uint256 pricePaid, // The price in collateral tokens uint256 maxSpend // The max amount of collateral to spend ); // Emitted when tokens are minted event mintTokensTo( address indexed buyer, // The address of the buyer address indexed receiver, // The address of the receiver of the tokens uint256 amount, // The amount of bonded tokens to mint uint256 pricePaid, // The price in collateral tokens uint256 maxSpend // The max amount of collateral to spend ); // Emitted when tokens are burnt event burnTokens( address indexed seller, // The address of the seller uint256 amount, // The amount of bonded tokens to sell uint256 rewardReceived, // The collateral tokens received uint256 minReward // The min collateral reward for tokens ); // Emitted when the curve is permanently shut down event shutDownOccurred(address indexed owner); // ------------------------------------------------------------------------- // Modifiers // ------------------------------------------------------------------------- /** * @notice Requires the curve to be initialised and active. */ modifier isActive() { require(active_ && init_, "Curve inactive"); _; } /** * @notice Protects against re-entrancy attacks */ modifier mutex() { require(status_ != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail status_ = _ENTERED; // Function executes _; // Status set to not entered status_ = _NOT_ENTERED; } // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- constructor(address _bondedToken, address _collateralToken) public Ownable() { bzz_ = I_Token(_bondedToken); dai_ = IERC20(_collateralToken); status_ = _NOT_ENTERED; } // ------------------------------------------------------------------------- // View functions // ------------------------------------------------------------------------- /** * @notice This function is only callable after the curve contract has been * initialized. * @param _amount The amount of tokens a user wants to buy * @return uint256 The cost to buy the _amount of tokens in the collateral * currency (see collateral token). */ function buyPrice(uint256 _amount) public view isActive() returns (uint256 collateralRequired) { collateralRequired = _mint(_amount, bzz_.totalSupply()); return collateralRequired; } /** * @notice This function is only callable after the curve contract has been * initialized. * @param _amount The amount of tokens a user wants to sell * @return collateralReward The reward for selling the _amount of tokens in the * collateral currency (see collateral token). */ function sellReward(uint256 _amount) public view isActive() returns (uint256 collateralReward) { (collateralReward, ) = _withdraw(_amount, bzz_.totalSupply()); return collateralReward; } /** * @return If the curve is both active and initialised. */ function isCurveActive() public view returns (bool) { if (active_ && init_) { return true; } return false; } /** * @param _initialSupply The expected initial supply the bonded token * will have. * @return The required collateral amount (DAI) to initialise the curve. */ function requiredCollateral(uint256 _initialSupply) public view returns (uint256) { return _initializeCurve(_initialSupply); } /** * @return The address of the bonded token (BZZ). */ function bondedToken() external view returns (address) { return address(bzz_); } /** * @return The address of the collateral token (DAI) */ function collateralToken() external view returns (address) { return address(dai_); } // ------------------------------------------------------------------------- // State modifying functions // ------------------------------------------------------------------------- /** * @notice This function initializes the curve contract, and ensure the * curve has the required permissions on the token contract needed * to function. */ function init() external { // Checks the curve has not already been initialized require(!init_, "Curve is init"); // Checks the curve has the correct permissions on the given token require(bzz_.isMinter(address(this)), "Curve is not minter"); // Gets the total supply of the token uint256 initialSupply = bzz_.totalSupply(); // The curve requires that the initial supply is at least the expected // open market supply require( initialSupply >= _MARKET_OPENING_SUPPLY, "Curve equation requires pre-mint" ); // Gets the price for the current supply uint256 price = _initializeCurve(initialSupply); // Requires the transfer for the collateral needed to back fill for the // minted supply require( dai_.transferFrom(msg.sender, address(this), price), "Failed to collateralized the curve" ); // Sets the Curve to being active and initialised active_ = true; init_ = true; } /** * @param _amount The amount of tokens (BZZ) the user wants to buy. * @param _maxCollateralSpend The max amount of collateral (DAI) the user is * willing to spend in order to buy the _amount of tokens. * @return The status of the mint. Note that should the total cost of the * purchase exceed the _maxCollateralSpend the transaction will revert. */ function mint( uint256 _amount, uint256 _maxCollateralSpend ) external isActive() mutex() returns (bool success) { // Gets the price for the amount of tokens uint256 price = _commonMint(_amount, _maxCollateralSpend, msg.sender); // Emitting event with all important info emit mintTokens( msg.sender, _amount, price, _maxCollateralSpend ); // Returning that the mint executed successfully return true; } /** * @param _amount The amount of tokens (BZZ) the user wants to buy. * @param _maxCollateralSpend The max amount of collateral (DAI) the user is * willing to spend in order to buy the _amount of tokens. * @param _to The address to send the tokens to. * @return The status of the mint. Note that should the total cost of the * purchase exceed the _maxCollateralSpend the transaction will revert. */ function mintTo( uint256 _amount, uint256 _maxCollateralSpend, address _to ) external isActive() mutex() returns (bool success) { // Gets the price for the amount of tokens uint256 price = _commonMint(_amount, _maxCollateralSpend, _to); // Emitting event with all important info emit mintTokensTo( msg.sender, _to, _amount, price, _maxCollateralSpend ); // Returning that the mint executed successfully return true; } /** * @param _amount The amount of tokens (BZZ) the user wants to sell. * @param _minCollateralReward The min amount of collateral (DAI) the user is * willing to receive for their tokens. * @return The status of the burn. Note that should the total reward of the * burn be below the _minCollateralReward the transaction will revert. */ function redeem(uint256 _amount, uint256 _minCollateralReward) external isActive() mutex() returns (bool success) { // Gets the reward for the amount of tokens uint256 reward = sellReward(_amount); // Checks the reward has not slipped below the min amount the user // wishes to receive. require(reward >= _minCollateralReward, "Reward under min sell"); // Burns the number of tokens (fails - no bool return) bzz_.burnFrom(msg.sender, _amount); // Transfers the reward from the curve to the collateral token require( dai_.transfer(msg.sender, reward), "Transferring collateral failed" ); // Emitting event with all important info emit burnTokens( msg.sender, _amount, reward, _minCollateralReward ); // Returning that the burn executed successfully return true; } /** * @notice Shuts down the curve, disabling buying, selling and both price * functions. Can only be called by the owner. Will renounce the * minter role on the bonded token. */ function shutDown() external onlyOwner() { // Removes the curve as a minter on the token bzz_.renounceMinter(); // Irreversibly shuts down the curve active_ = false; // Emitting address of owner who shut down curve permanently emit shutDownOccurred(msg.sender); } // ------------------------------------------------------------------------- // Internal functions // ------------------------------------------------------------------------- /** * @param _amount The amount of tokens (BZZ) the user wants to buy. * @param _maxCollateralSpend The max amount of collateral (DAI) the user is * willing to spend in order to buy the _amount of tokens. * @param _to The address to send the tokens to. * @return uint256 The price the user has paid for buying the _amount of * BUZZ tokens. */ function _commonMint( uint256 _amount, uint256 _maxCollateralSpend, address _to ) internal returns(uint256) { // Gets the price for the amount of tokens uint256 price = buyPrice(_amount); // Checks the price has not risen above the max amount the user wishes // to spend. require(price <= _maxCollateralSpend, "Price exceeds max spend"); // Transfers the price of tokens in the collateral token to the curve require( dai_.transferFrom(msg.sender, address(this), price), "Transferring collateral failed" ); // Mints the user their tokens require(bzz_.mint(_to, _amount), "Minting tokens failed"); // Returns the price the user will pay for buy return price; } // ------------------------------------------------------------------------- // Curve mathematical functions uint256 internal constant _BZZ_SCALE = 1e16; uint256 internal constant _N = 5; uint256 internal constant _MARKET_OPENING_SUPPLY = 62500000 * _BZZ_SCALE; // Equation for curve: /** * @param x The supply to calculate at. * @return x^32/_MARKET_OPENING_SUPPLY^5 * @dev Calculates the 32 power of `x` (`x` squared 5 times) times a * constant. Each time it squares the function it divides by the * `_MARKET_OPENING_SUPPLY` so when `x` = `_MARKET_OPENING_SUPPLY` * it doesn't change `x`. * * `c*x^32` | `c` is chosen in such a way that * `_MARKET_OPENING_SUPPLY` is the fixed point of the helper * function. * * The division by `_MARKET_OPENING_SUPPLY` also helps avoid an * overflow. * * The `_helper` function is separate to the `_primitiveFunction` * as we modify `x`. */ function _helper(uint256 x) internal view returns (uint256) { for (uint256 index = 1; index <= _N; index++) { x = (x.mul(x)).div(_MARKET_OPENING_SUPPLY); } return x; } /** * @param s The supply point being calculated for. * @return The amount of DAI required for the requested amount of BZZ (s). * @dev `s` is being added because it is the linear term in the * polynomial (this ensures no free BUZZ tokens). * * primitive function equation: s + c*s^32. * * See the helper function for the definition of `c`. * * Converts from something measured in BZZ (1e16) to dai atomic * units 1e18. */ function _primitiveFunction(uint256 s) internal view returns (uint256) { return s.add(_helper(s)); } /** * @param _supply The number of tokens that exist. * @return uint256 The price for the next token up the curve. */ function _spotPrice(uint256 _supply) internal view returns (uint256) { return (_primitiveFunction(_supply.add(1)).sub(_primitiveFunction(_supply))); } /** * @param _amount The amount of tokens to be minted * @param _currentSupply The current supply of tokens * @return uint256 The cost for the tokens * @return uint256 The price being paid per token */ function _mint(uint256 _amount, uint256 _currentSupply) internal view returns (uint256) { uint256 deltaR = _primitiveFunction(_currentSupply.add(_amount)).sub( _primitiveFunction(_currentSupply)); return deltaR; } /** * @param _amount The amount of tokens to be sold * @param _currentSupply The current supply of tokens * @return uint256 The reward for the tokens * @return uint256 The price being received per token */ function _withdraw(uint256 _amount, uint256 _currentSupply) internal view returns (uint256, uint256) { assert(_currentSupply - _amount > 0); uint256 deltaR = _primitiveFunction(_currentSupply).sub( _primitiveFunction(_currentSupply.sub(_amount))); uint256 realized_price = deltaR.div(_amount); return (deltaR, realized_price); } /** * @param _initial_supply The supply the curve is going to start with. * @return initial_reserve How much collateral is needed to collateralized * the bonding curve. * @return price The price being paid per token (averaged). */ function _initializeCurve(uint256 _initial_supply) internal view returns (uint256 price) { price = _mint(_initial_supply, 0); return price; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"isCurveActive","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"shutDown","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_maxCollateralSpend","type":"uint256"}],"name":"mint","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_maxCollateralSpend","type":"uint256"},{"name":"_to","type":"address"}],"name":"mintTo","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_minCollateralReward","type":"uint256"}],"name":"redeem","outputs":[{"name":"success","type":"bool"}],"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":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_initialSupply","type":"uint256"}],"name":"requiredCollateral","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collateralToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_amount","type":"uint256"}],"name":"buyPrice","outputs":[{"name":"collateralRequired","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_amount","type":"uint256"}],"name":"sellReward","outputs":[{"name":"collateralReward","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bondedToken","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"},{"inputs":[{"name":"_bondedToken","type":"address"},{"name":"_collateralToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"pricePaid","type":"uint256"},{"indexed":false,"name":"maxSpend","type":"uint256"}],"name":"mintTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"pricePaid","type":"uint256"},{"indexed":false,"name":"maxSpend","type":"uint256"}],"name":"mintTokensTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"rewardReceived","type":"uint256"},{"indexed":false,"name":"minReward","type":"uint256"}],"name":"burnTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"}],"name":"shutDownOccurred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Deployed Bytecode
0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305a27c9d81146100df57806310b9e583146101085780631b2ef1ca1461011f5780636190e3a81461014f578063715018a61461018e5780637cbc2373146101a35780638da5cb5b146101d35780638f32d59b14610204578063abb7bc4a14610219578063b2016bd414610255578063c4dbf6221461026a578063c9f1dba814610294578063e1c7392a146102be578063e36a4ec7146102d3578063f2fde38b146102e8575b600080fd5b3480156100eb57600080fd5b506100f461031b565b604080519115158252519081900360200190f35b34801561011457600080fd5b5061011d610377565b005b34801561012b57600080fd5b506100f46004803603604081101561014257600080fd5b50803590602001356104a5565b34801561015b57600080fd5b506100f46004803603606081101561017257600080fd5b5080359060208101359060400135600160a060020a0316610605565b34801561019a57600080fd5b5061011d610772565b3480156101af57600080fd5b506100f4600480360360408110156101c657600080fd5b5080359060200135610827565b3480156101df57600080fd5b506101e8610b50565b60408051600160a060020a039092168252519081900360200190f35b34801561021057600080fd5b506100f4610b5f565b34801561022557600080fd5b506102436004803603602081101561023c57600080fd5b5035610b83565b60408051918252519081900360200190f35b34801561026157600080fd5b506101e8610b94565b34801561027657600080fd5b506102436004803603602081101561028d57600080fd5b5035610ba3565b3480156102a057600080fd5b50610243600480360360208110156102b757600080fd5b5035610ce0565b3480156102ca57600080fd5b5061011d610e24565b3480156102df57600080fd5b506101e8611200565b3480156102f457600080fd5b5061011d6004803603602081101561030b57600080fd5b5035600160a060020a031661120f565b6002546000907501000000000000000000000000000000000000000000900460ff168015610363575060025474010000000000000000000000000000000000000000900460ff165b1561037057506001610374565b5060005b90565b61037f610b5f565b15156103d5576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316600160a060020a031663986502756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561044157600080fd5b505af1158015610455573d6000803e3d6000fd5b50506002805475ff00000000000000000000000000000000000000000019169055505060405133907f85d30af066e5af845a9622672f06b85f9fac16623c3ae27bc82f59e9443b70dc90600090a2565b6002546000907501000000000000000000000000000000000000000000900460ff1680156104ed575060025474010000000000000000000000000000000000000000900460ff165b1515610543576040805160e560020a62461bcd02815260206004820152600e60248201527f437572766520696e616374697665000000000000000000000000000000000000604482015290519081900360640190fd5b6003546002141561059e576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260035560006105b0848433611279565b6040805186815260208101839052808201869052905191925033917f8bb50bbad61a171c6fa349b88297f9622b09984d0cb849541900b414bb74a3849181900360600190a26001915050600160035592915050565b6002546000907501000000000000000000000000000000000000000000900460ff16801561064d575060025474010000000000000000000000000000000000000000900460ff165b15156106a3576040805160e560020a62461bcd02815260206004820152600e60248201527f437572766520696e616374697665000000000000000000000000000000000000604482015290519081900360640190fd5b600354600214156106fe576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026003556000610710858585611279565b60408051878152602081018390528082018790529051919250600160a060020a0385169133917f61e2242687b56628bc0e14d72fc3cb62ddc508c2096a2b86e36ca745e1164af7919081900360600190a3600191505060016003559392505050565b61077a610b5f565b15156107d0576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6002546000907501000000000000000000000000000000000000000000900460ff16801561086f575060025474010000000000000000000000000000000000000000900460ff165b15156108c5576040805160e560020a62461bcd02815260206004820152600e60248201527f437572766520696e616374697665000000000000000000000000000000000000604482015290519081900360640190fd5b60035460021415610920576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600061093084610ce0565b90508281101561098a576040805160e560020a62461bcd02815260206004820152601560248201527f52657761726420756e646572206d696e2073656c6c0000000000000000000000604482015290519081900360640190fd5b600154604080517f79cc6790000000000000000000000000000000000000000000000000000000008152336004820152602481018790529051600160a060020a03909216916379cc67909160448082019260009290919082900301818387803b1580156109f657600080fd5b505af1158015610a0a573d6000803e3d6000fd5b5050600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a03909216935063a9059cbb92506044808201926020929091908290030181600087803b158015610a7b57600080fd5b505af1158015610a8f573d6000803e3d6000fd5b505050506040513d6020811015610aa557600080fd5b50511515610afd576040805160e560020a62461bcd02815260206004820152601e60248201527f5472616e7366657272696e6720636f6c6c61746572616c206661696c65640000604482015290519081900360640190fd5b6040805185815260208101839052808201859052905133917f9ed992203b5a631f0a9d0b8341fde3c68a998a2ac413d72a34213bd77d4b1814919081900360600190a26001915050600160035592915050565b600054600160a060020a031690565b60008054600160a060020a0316610b746114cd565b600160a060020a031614905090565b6000610b8e826114d1565b92915050565b600254600160a060020a031690565b6002546000907501000000000000000000000000000000000000000000900460ff168015610beb575060025474010000000000000000000000000000000000000000900460ff165b1515610c41576040805160e560020a62461bcd02815260206004820152600e60248201527f437572766520696e616374697665000000000000000000000000000000000000604482015290519081900360640190fd5b610b8e82600160009054906101000a9004600160a060020a0316600160a060020a03166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015610caf57600080fd5b505afa158015610cc3573d6000803e3d6000fd5b505050506040513d6020811015610cd957600080fd5b50516114da565b6002546000907501000000000000000000000000000000000000000000900460ff168015610d28575060025474010000000000000000000000000000000000000000900460ff165b1515610d7e576040805160e560020a62461bcd02815260206004820152600e60248201527f437572766520696e616374697665000000000000000000000000000000000000604482015290519081900360640190fd5b610e1d82600160009054906101000a9004600160a060020a0316600160a060020a03166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015610dec57600080fd5b505afa158015610e00573d6000803e3d6000fd5b505050506040513d6020811015610e1657600080fd5b505161150d565b5092915050565b60025474010000000000000000000000000000000000000000900460ff1615610e97576040805160e560020a62461bcd02815260206004820152600d60248201527f437572766520697320696e697400000000000000000000000000000000000000604482015290519081900360640190fd5b600154604080517faa271e1a0000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a039092169163aa271e1a91602480820192602092909190829003018186803b158015610efb57600080fd5b505afa158015610f0f573d6000803e3d6000fd5b505050506040513d6020811015610f2557600080fd5b50511515610f7d576040805160e560020a62461bcd02815260206004820152601360248201527f4375727665206973206e6f74206d696e74657200000000000000000000000000604482015290519081900360640190fd5b600154604080517f18160ddd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a0316916318160ddd916004808301926020929190829003018186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d602081101561100557600080fd5b505190506984595161401484a0000081101561106b576040805160e560020a62461bcd02815260206004820181905260248201527f4375727665206571756174696f6e207265717569726573207072652d6d696e74604482015290519081900360640190fd5b6000611076826114d1565b600254604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490529051929350600160a060020a03909116916323b872dd916064808201926020929091908290030181600087803b1580156110ec57600080fd5b505af1158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b50511515611194576040805160e560020a62461bcd02815260206004820152602260248201527f4661696c656420746f20636f6c6c61746572616c697a6564207468652063757260448201527f7665000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50506002805474ff00000000000000000000000000000000000000001975ff000000000000000000000000000000000000000000199091167501000000000000000000000000000000000000000000171674010000000000000000000000000000000000000000179055565b600154600160a060020a031690565b611217610b5f565b151561126d576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6112768161155d565b50565b60008061128585610ba3565b9050838111156112df576040805160e560020a62461bcd02815260206004820152601760248201527f50726963652065786365656473206d6178207370656e64000000000000000000604482015290519081900360640190fd5b600254604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b15801561135257600080fd5b505af1158015611366573d6000803e3d6000fd5b505050506040513d602081101561137c57600080fd5b505115156113d4576040805160e560020a62461bcd02815260206004820152601e60248201527f5472616e7366657272696e6720636f6c6c61746572616c206661696c65640000604482015290519081900360640190fd5b600154604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015260248201899052915191909216916340c10f199160448083019260209291908290030181600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b505050506040513d602081101561146d57600080fd5b505115156114c5576040805160e560020a62461bcd02815260206004820152601560248201527f4d696e74696e6720746f6b656e73206661696c65640000000000000000000000604482015290519081900360640190fd5b949350505050565b3390565b6000610b8e8260005b6000806114c56114e98461164b565b6115016114fc868863ffffffff61166616565b61164b565b9063ffffffff6116ca16565b600080838303811061151b57fe5b600061153c6115336114fc868863ffffffff6116ca16565b6115018661164b565b90506000611550828763ffffffff61170c16565b9196919550909350505050565b600160a060020a03811615156115e3576040805160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000610b8e6116598361174e565b839063ffffffff61166616565b6000828201838110156116c3576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006116c383836040805190810160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611796565b60006116c383836040805190810160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611830565b600060015b6005811161178f576117856984595161401484a00000611779858063ffffffff61189d16565b9063ffffffff61170c16565b9250600101611753565b5090919050565b600081848411156118285760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117ed5781810151838201526020016117d5565b50505050905090810190601f16801561181a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000818184116118855760405160e560020a62461bcd028152600401808060200182810382528381815181526020019150805190602001908083836000838110156117ed5781810151838201526020016117d5565b506000838581151561189357fe5b0495945050505050565b60008215156118ae57506000610b8e565b8282028284828115156118bd57fe5b04146116c3576040805160e560020a62461bcd02815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f7700000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fdfea165627a7a72305820cea6b2e1b8db0e1ab285ebef092b70fa1105d106515a75b8909e7194cdbaae740029
Deployed Bytecode Sourcemap
19664:16719:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24378:153;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24378:153:0;;;;;;;;;;;;;;;;;;;;;;30577:322;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30577:322:0;;;;;;27208:590;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27208:590:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;27208:590:0;;;;;;;;28279:629;;8:9:-1;5:2;;;30:1;27;20:12;5:2;28279:629:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;28279:629:0;;;;;;;;;;;-1:-1:-1;;;;;28279:629:0;;;2963:140;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2963:140:0;;;;29317:1024;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29317:1024:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29317:1024:0;;;;;;;;2152:79;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2152:79:0;;;;;;;;-1:-1:-1;;;;;2152:79:0;;;;;;;;;;;;;;2518:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2518:94:0;;;;24742:172;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24742:172:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24742:172:0;;;;;;;;;;;;;;;;;;;25177:98;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25177:98:0;;;;23446:246;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23446:246:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23446:246:0;;;24039:250;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24039:250:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24039:250:0;;;25687:1096;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25687:1096:0;;;;24997:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24997:94:0;;;;3258:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3258:109:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3258:109:0;-1:-1:-1;;;;;3258:109:0;;;24378:153;24445:7;;24424:4;;24445:7;;;;;:16;;;;-1:-1:-1;24456:5:0;;;;;;;24445:16;24441:60;;;-1:-1:-1;24485:4:0;24478:11;;24441:60;-1:-1:-1;24518:5:0;24378:153;;:::o;30577:322::-;2364:9;:7;:9::i;:::-;2356:54;;;;;;;-1:-1:-1;;;;;2356:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30684:4;;;;;;;;;-1:-1:-1;;;;;30684:4:0;-1:-1:-1;;;;;30684:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30684:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;30762:7:0;:15;;-1:-1:-1;;30762:15:0;;;-1:-1:-1;;30863:28:0;;30880:10;;30863:28;;30772:5;;30863:28;30577:322::o;27208:590::-;22092:7;;27367:12;;22092:7;;;;;:16;;;;-1:-1:-1;22103:5:0;;;;;;;22092:16;22084:43;;;;;;;-1:-1:-1;;;;;22084:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22264:7;;20318:1;22264:19;;22256:63;;;;;-1:-1:-1;;;;;22256:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20318:1;22395:7;:18;27449:13;27465:53;27477:7;27486:19;27507:10;27465:11;:53::i;:::-;27585:125;;;;;;;;;;;;;;;;;;;;27449:69;;-1:-1:-1;27610:10:0;;27585:125;;;;;;;;;27786:4;27779:11;;;20274:1;22504:7;:22;27208:590;;-1:-1:-1;;27208:590:0:o;28279:629::-;22092:7;;28463:12;;22092:7;;;;;:16;;;;-1:-1:-1;22103:5:0;;;;;;;22092:16;22084:43;;;;;;;-1:-1:-1;;;;;22084:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22264:7;;20318:1;22264:19;;22256:63;;;;;-1:-1:-1;;;;;22256:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20318:1;22395:7;:18;28545:13;28562:46;28574:7;28583:19;28604:3;28562:11;:46::i;:::-;28675:145;;;;;;;;;;;;;;;;;;;;28545:63;;-1:-1:-1;;;;;;28675:145:0;;;28702:10;;28675:145;;;;;;;;;;28896:4;28889:11;;;20274:1;22504:7;:22;28279:629;;-1:-1:-1;;;28279:629:0:o;2963:140::-;2364:9;:7;:9::i;:::-;2356:54;;;;;;;-1:-1:-1;;;;;2356:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3062:1;3046:6;;3025:40;;-1:-1:-1;;;;;3046:6:0;;;;3025:40;;3062:1;;3025:40;3093:1;3076:19;;-1:-1:-1;;3076:19:0;;;2963:140::o;29317:1024::-;22092:7;;29453:12;;22092:7;;;;;:16;;;;-1:-1:-1;22103:5:0;;;;;;;22092:16;22084:43;;;;;;;-1:-1:-1;;;;;22084:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22264:7;;20318:1;22264:19;;22256:63;;;;;-1:-1:-1;;;;;22256:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20318:1;22395:7;:18;29536:14;29553:19;29564:7;29553:10;:19::i;:::-;29536:36;-1:-1:-1;29698:30:0;;;;29690:64;;;;;-1:-1:-1;;;;;29690:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;29829:4;;:34;;;;;;29843:10;29829:34;;;;;;;;;;;;-1:-1:-1;;;;;29829:4:0;;;;:13;;:34;;;;;:4;;:34;;;;;;;;:4;;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;29829:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;29968:4:0;;:33;;;;;;29982:10;29968:33;;;;;;;;;;;;-1:-1:-1;;;;;29968:4:0;;;;-1:-1:-1;29968:13:0;;-1:-1:-1;29968:33:0;;;;;;;;;;;;;;;:4;;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;29968:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29968:33:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29968:33:0;29946:113;;;;;;;-1:-1:-1;;;;;29946:113:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;30126:127;;;;;;;;;;;;;;;;;;;;30151:10;;30126:127;;;;;;;;;;30329:4;30322:11;;;20274:1;22504:7;:22;29317:1024;;-1:-1:-1;;29317:1024:0:o;2152:79::-;2190:7;2217:6;-1:-1:-1;;;;;2217:6:0;2152:79;:::o;2518:94::-;2558:4;2598:6;;-1:-1:-1;;;;;2598:6:0;2582:12;:10;:12::i;:::-;-1:-1:-1;;;;;2582:22:0;;2575:29;;2518:94;:::o;24742:172::-;24842:7;24874:32;24891:14;24874:16;:32::i;:::-;24867:39;24742:172;-1:-1:-1;;24742:172:0:o;25177:98::-;25262:4;;-1:-1:-1;;;;;25262:4:0;25177:98;:::o;23446:246::-;22092:7;;23549:26;;22092:7;;;;;:16;;;;-1:-1:-1;22103:5:0;;;;;;;22092:16;22084:43;;;;;;;-1:-1:-1;;;;;22084:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;23614:34;23620:7;23629:4;;;;;;;;;-1:-1:-1;;;;;23629:4:0;-1:-1:-1;;;;;23629:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23629:18:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23629:18:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23629:18:0;23614:5;:34::i;24039:250::-;22092:7;;24144:24;;22092:7;;;;;:16;;;;-1:-1:-1;22103:5:0;;;;;;;22092:16;22084:43;;;;;;;-1:-1:-1;;;;;22084:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;24209:38;24219:7;24228:4;;;;;;;;;-1:-1:-1;;;;;24228:4:0;-1:-1:-1;;;;;24228:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24228:18:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24228:18:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24228:18:0;24209:9;:38::i;:::-;-1:-1:-1;24186:61:0;24039:250;-1:-1:-1;;24039:250:0:o;25687:1096::-;25794:5;;;;;;;25793:6;25785:32;;;;;-1:-1:-1;;;;;25785:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;25912:4;;:28;;;;;;25934:4;25912:28;;;;;;-1:-1:-1;;;;;25912:4:0;;;;:13;;:28;;;;;;;;;;;;;;;:4;:28;;;5:2:-1;;;;30:1;27;20:12;5:2;25912:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25912:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25912:28:0;25904:60;;;;;;;-1:-1:-1;;;;;25904:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;26046:4;;:18;;;;;;;;26022:21;;-1:-1:-1;;;;;26046:4:0;;:16;;:18;;;;;;;;;;;;;;:4;:18;;;5:2:-1;;;;30:1;27;20:12;5:2;26046:18:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26046:18:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26046:18:0;;-1:-1:-1;32639:21:0;26208:39;;;26186:121;;;;;-1:-1:-1;;;;;26186:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26368:13;26384:31;26401:13;26384:16;:31::i;:::-;26555:4;;:51;;;;;;26573:10;26555:51;;;;26593:4;26555:51;;;;;;;;;;;;26368:47;;-1:-1:-1;;;;;;26555:4:0;;;;:17;;:51;;;;;;;;;;;;;;;:4;;:51;;;5:2:-1;;;;30:1;27;20:12;5:2;26555:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26555:51:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26555:51:0;26533:135;;;;;;;-1:-1:-1;;;;;26533:135:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;26738:7:0;:14;;-1:-1:-1;;;;26738:14:0;;;;;26763:12;;;;;25687:1096::o;24997:94::-;25078:4;;-1:-1:-1;;;;;25078:4:0;24997:94;:::o;3258:109::-;2364:9;:7;:9::i;:::-;2356:54;;;;;;;-1:-1:-1;;;;;2356:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3331:28;3350:8;3331:18;:28::i;:::-;3258:109;:::o;31518:852::-;31667:7;31744:13;31760:17;31769:7;31760:8;:17::i;:::-;31744:33;-1:-1:-1;31898:28:0;;;;31890:64;;;;;-1:-1:-1;;;;;31890:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;32066:4;;:51;;;;;;32084:10;32066:51;;;;32104:4;32066:51;;;;;;;;;;;;-1:-1:-1;;;;;32066:4:0;;;;:17;;:51;;;;;;;;;;;;;;;:4;;:51;;;5:2:-1;;;;30:1;27;20:12;5:2;32066:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32066:51:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;32066:51:0;32044:131;;;;;;;-1:-1:-1;;;;;32044:131:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;32234:4;;:23;;;;;;-1:-1:-1;;;;;32234:23:0;;;;;;;;;;;;;;;:4;;;;;:9;;:23;;;;;;;;;;;;;;:4;;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;32234:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32234:23:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;32234:23:0;32226:57;;;;;;;-1:-1:-1;;;;;32226:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;32357:5;31518:852;-1:-1:-1;;;;31518:852:0:o;858:98::-;938:10;858:98;:::o;36184:196::-;36285:13;36324:25;36330:15;36347:1;34955:281;35061:7;35086:14;35103:101;35169:34;35188:14;35169:18;:34::i;:::-;35103:47;35122:27;:14;35141:7;35122:27;:18;:27;:::i;:::-;35103:18;:47::i;:::-;:51;:101;:51;:101;:::i;35487:414::-;35597:7;;35638:24;;;:28;-1:-1:-1;35631:36:0;;;;35678:14;35695:101;35748:47;35767:27;:14;35786:7;35767:27;:18;:27;:::i;35748:47::-;35695:34;35714:14;35695:18;:34::i;:101::-;35678:118;-1:-1:-1;35807:22:0;35832:19;35678:118;35843:7;35832:19;:10;:19;:::i;:::-;35870:6;;;;-1:-1:-1;35487:414:0;;-1:-1:-1;;;;35487:414:0:o;3473:229::-;-1:-1:-1;;;;;3547:22:0;;;;3539:73;;;;;-1:-1:-1;;;;;3539:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3649:6;;;3628:38;;-1:-1:-1;;;;;3628:38:0;;;;3649:6;;;3628:38;;;3677:6;:17;;-1:-1:-1;;3677:17:0;-1:-1:-1;;;;;3677:17:0;;;;;;;;;;3473:229::o;34280:114::-;34342:7;34369:17;34375:10;34383:1;34375:7;:10::i;:::-;34369:1;;:17;:5;:17;:::i;7502:181::-;7560:7;7592:5;;;7616:6;;;;7608:46;;;;;-1:-1:-1;;;;;7608:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7674:1;7502:181;-1:-1:-1;;;7502:181:0:o;7958:136::-;8016:7;8043:43;8047:1;8050;8043:43;;;;;;;;;;;;;;;;;;:3;:43::i;9813:132::-;9871:7;9898:39;9902:1;9905;9898:39;;;;;;;;;;;;;;;;;;:3;:39::i;33504:212::-;33555:7;33596:1;33575:115;32580:1;33599:11;;33575:115;;33640:38;32639:21;33641:8;33647:1;;33641:8;:5;:8;:::i;:::-;33640:14;:38;:14;:38;:::i;:::-;33636:42;-1:-1:-1;33612:7:0;;33575:115;;;-1:-1:-1;33707:1:0;;33504:212;-1:-1:-1;33504:212:0:o;8431:192::-;8517:7;8553:12;8545:6;;;;8537:29;;;;-1:-1:-1;;;;;8537:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;8537:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8589:5:0;;;8431:192::o;10475:345::-;10561:7;10663:12;10656:5;;;10648:28;;;;-1:-1:-1;;;;;10648:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;10648:28:0;;10687:9;10703:1;10699;:5;;;;;;;;;10475:345;-1:-1:-1;;;;;10475:345:0:o;8874:471::-;8932:7;9177:6;;9173:47;;;-1:-1:-1;9207:1:0;9200:8;;9173:47;9244:5;;;9248:1;9244;:5;9268;;;;;;;;:10;9260:56;;;;;-1:-1:-1;;;;;9260:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
bzzr://cea6b2e1b8db0e1ab285ebef092b70fa1105d106515a75b8909e7194cdbaae74
Loading...
Loading
Loading...
Loading
OVERVIEW
The swarm bonding curve allows anyone to buy bzz for eth/dai and redeem eth/dai for bzz.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.