2

I ask this because I want to create a crowdfunding smart contract for a platform much like Kickstarter. At this point, the only crypto asset I want the contract to raise is Ether with the possibility of integrating other ERC20 tokens in the future. The issue I am trying to overcome right now is price volatility. For example, if a client wants to raise £10,000 worth of ETH during the 30 day period of crowdfunding and on the day of listing the project, the value of Ether is £100 each, then 100 ETH is needed for the contract to be successful. However, if toward the end of the crowdfunding duration, the price of Ether drops by 20%, then the client would only get £8,000 worth of Ether. Another issue is if the price goes up dramatically before the end of the project, potentially setting the milestone too high and sabotaging the project.

I would like a way for the contract to be updated every 5 minutes or so based on the current price of Ether to tackle the problem of volatility. So for example, if the price goes up by 20%, then each ETH will be worth £120 and that multiplied by 100 is £12,000 which may be too much. When this occurs, it would be ideal if the contract could somehow be updated and adjust the target goal based on some simple calculations (target goal in GBP / 1 ETH to GBP = target goal in ETH). I want to implement such a feature in order to add some stability to the target goal in ETH in relation to GBP (or other fiat currencies).

I have seen similar implementations that can update contracts based on the value of other crypto assets, such as: Oracilize, which is capable of checking the price of Kraken, but nothing that does so with fiat currency.

2

You can probably do that using an oracle (see e.g. www.oraclize.it , but others exist) to get ether price in the blockchain.

Note that it seems that you will have your client beeing paid in ether while the crowdfunders will pay in pounds. You want to fix the price in pound, but the volatility of ether could do that you client will either get too much ether (if ether price rises during the crowdfunding) or ot enough.

The only way to avoid that is converting back your client's ether to pounds immediately after getting it, but then there was no point converting pounds to ether in the first place.

1

If you want to link your contract to a price change in ether to the dollar, you would need to use a dApp that would update a value in your contract on a regular frequency that you choose, or an ether to dollar change amount.

  • Wouldn't that dApp also have to store the unencrypted private key to sign the transaction of the function call? Wouldn't that be a security issue? – Zenos Pavlakou Aug 3 '17 at 1:15
  • I would assume you would host that dApp and make the transaction from your server. The contract would be coded to only allow the "owner" of the contract to update the price. Otherwise, anyone would be able to update the price to anything they wanted. – Ian Pilipski Aug 4 '17 at 2:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.