Hot answers tagged

19

A hard cap is defined as the maximum amount a crowdsale will receive. Most projects set a very high cap that is unlikely to happen. Only very famous projects like Status or Brave browser have reached its hard cap. contract crowdsale { uint public maximumEther; uint public totalEther; function () payable { // Do not accept payment if ...


7

I used the CoinMarketCap API to pull down a list of all registered currencies and assets (so not just ERC-20 tokens... ), and fed it into a quick Python script to count the number of occurrences of symbols of different lengths. import urllib, json from collections import Counter url = "https://api.coinmarketcap.com/v1/ticker/" response = urllib.urlopen(url)...


7

Yup, its the same - but if you give 10 developers the same problem you could get 10 different ways of solving it. Its interesting though, if you think about it - Ethereum actually rewards users of more efficient code by charging more for complex solutions.


6

You have to do something like this: Token.sol // This should be an abstract interface without implementation contract Token { function mint(address _to, uint _amount) public returns (bool); // Rest of the code } CrowdsaleToken.sol import "Token.sol"; // This contract contains the implementation of ERC20 methods contract CrowdsaleToken is Token { ...


6

Yes, ethereum smart contract can only accept ether. So if one wants to use Bitcoin to buy ethereum tokens, then you need to do something to let it happen. I have seen different approaches to this problem: Some companies do the conversion for you - they show you a special BTC address where you can transfer your bitcoins to and the company will issue ...


6

OpenZeppelin has a GitHub repo with peer-reviewed open source contracts for tokens and crowdsales. They're a good source to see working ICO contracts. The examples include refundable crowdsales, capped crowdsales, finalizable crowdsales, and different types of ERC20 token contracts. Here's the repo: https://github.com/OpenZeppelin/zeppelin-solidity/tree/...


5

An Ethereum contract cannot directly interact with other blockchains. You have to use a service like BTC Relay, their project on github.


5

Possibly off-topic... all these ICOs tokens offers to finance new startups are under ethereum technology? Not all of them are on Ethereum. Here's a count of the number of tokens - each potentially having had its own ICO - on different parent platforms (according to CoinMarketCap as of 19 Feb 2018): Total token count: 611 ------------------...


4

I can add to your list the Open Zeppelin. It contains some secure contracts with best practices. We will use some of their contracts during our project's called "Jincor" ICO Returning to your question I would like to say that there are no "The Right Way" of doing ICO from technical side. Just because it's very different from business side) There are some ...


4

First your investors will want a clearly defined issuance policy, so they can better know how to value your token. If you can arbitrarily issue tokens then their tokens will be losing value when extra token are created. Each token can define its own issuance policy, for example they can offer initially a percentage for everybody to buy, and you reserve some ...


4

This is only a partial answer to your question. One issue you would face is that deposits by people who buy your tokens with BTC or any other cryptocurrency besides ETH would have to be credited manually since they would not be able to interact directly with a smart contract. SONM's ICO accepted both ETH and BTC and run into quite a lot of challenges with ...


4

I would suggest you using NodeJS and web3js library to interact with ethereum. It would not be really hard to get into NodeJS of you are a web developer. My team and I opened a source code of the dashboard so you can pick it, modify and use. It's already tested in real world and passed security audit. Here is backend. API docs can be found here. Frontend ...


4

You've only ever had three transactions. Two debiting your account and one crediting. 7.06 - 1.001565608 - 0.0004895(gas used from failed transaction) = 6.057944892 Your account balance at the minute is: 6.057944892 To me it doesn't look like you've lost any Ether according to your account data. With the exception of the gas used from failed transaction ...


4

The tokens someone owns is just a balance in your Token smart contract. So, How will my users with ICO tokens pay for dApp transactions fee on Ethereum, should I send them in ether or token ? They can't use these tokens to pay for transaction fees -if you are referring to gas costs when executing a transaction-. If you mean using the token as a ...


4

Following the logic of your code, you add this constraint into your fallback function. Replace balances[fundsWallet] = balances[fundsWallet].sub(tokenAmount); with uint256 newBalance = balances[fundsWallet].sub(tokenAmount); require(newBalance >= reservedTokens); balances[fundsWallet] = newBalance; Number of reserved tokens can be calculated like: ...


4

You are partially correct. You could ether send tokens to an address with an unknown private key, or you could just delete them, if a function like that was implemented when the contract was created. ERC20 tokens sometimes include a .burn() function which literally decreases the number of tokens in circulation by lowering the number of tokens a specific ...


4

So a lot of these companies are separating the ERC 20 token being sold during the ICO process and their actually technology. Think of the ERC 20 token as contract to be exchange for the true currency when it is later developed. Let me respond to the specific examples you have given: EOS. The following is from an article on Bitfinex supporting the token ...


4

Smart contracts are computer programs. You can code almost any business logic you want in them. That includes the business logic for minting new coins. The trust of your ICO contributors is the reason why you should have clear rules regarding when you wouldn't be able to mint new coins. Who would send you money for tokens if you can print an unlimited ...


3

An issuer-backed asset is one in which the asset (digital token) is backed (supported) by the issuing party. With the US gold standard, the US government promised to give the holder of US currency a particular amount of gold for each dollar held. In the case of an issuer-backed asset as described here, the issuer promises to give a widget/USD/some commodity ...


3

The passage you quoted above is referring to the concept of a stable coin. Stable coins are crypto-assets which are tied to, or "pegged," to some other asset as a way to maintain a stable value and mitigate the high volatility found in most existing crypto-assets. Examples of stable coins include Digix's gold-backed asset which attempts to peg their asset ...


3

Let's suppose we have M the maximum amount of tokens to sell, I the initial price of each token and F the final price of each token. Let's call f the function that gives the price of each token, we know that f(0) = I and f(M) = F. If you want a linear price then f(x) = I + (F - I) * x / M. The problem is to determine how many token we will get when we pay ...


3

It really depends on the company and how they make their contracts for token distribution. If some have a minimum investment goal, ideally they would code in their smart contracts to refund all of funds they received if they did not receive their goal by a certain date. If they are transparent about their smart contracts, this will build confidence that they ...


3

The block time in Ethereum is about 15 seconds on average, and that does not change over time very much. Thus, there will always be about 5760 blocks per day.


3

It's possible to treat an ICO as nothing more than a funding mechanism, yes. Filecoin, for example, ran an ICO on the Ethereum blockchain, but will be operating on a separate chain, indicating that there is no hard relationship between the ICO chain and the eventual product. Taken further, there is no technical reason for the product to be blockchain related ...


3

Symbol and Names are not unique. As a matter of fact if you do a search on etherscan you will notice there can be several tokens with the same name or symbol. The only thing that makes them unique or identifiable is the address to which they were deployed. So, technically, you could deploy another token contract with the same name and a different totalSupply ...


3

Usually, the raising of funds through a crowdsale is achieved through a different contract to the one implementing the ERC20 standards - this separation of concerns is a good software development practice. Open Zeppelin is an excellent project, establishing best practices for Smart Contracts, creating secure code and a reputation for their code being used ...


3

Obviously right now you can't accept any other coins than ETH or ERC20 coins natively in a smart contract. What I'd do is: create a struct in your contract to hold other coins, for example: struct ExternalCoin { string symbol; uint amount; } create a global variable that can look like this: mapping (address => Distributor) public externalCoins ...


3

Yes, it shouldn't be a problem and it's pretty common in the Ethereum space to openly share the code. As a matter of fact you will have to make the code available and verify it on Etherscan if you want people to trust that the contract does what you claim it does. And even if you don't share the code for the contract, once deployed if someone really wanted ...


3

BTC or other currencies - Be it fiat or other cryptocurrencies- can not be handled inside an Ethereum smart contract. The ICOs that do have smart contracts in place and that accept currencies other than Ether, what they do is to add a function in the smart contract where the owner can "invest" on behalf of the contributor. So basically what you would do is ...


3

The Pausable contract you're inheriting from just adds pause and unpause, which updates a state variable paused. But that's all it does by itself. You'll need to use the modifiers whenPaused and whenNotPaused in your contract. If you put whenNotPaused on a function, then that function won't be callable when the contract is in the paused state. (For example, ...


Only top voted, non community-wiki answers of a minimum length are eligible