пятница, 4 августа 2017 г.

Ethereum Gas and Transaction Fees Explained!

Ethereum Gas and Transaction Fees Explained!

It is recommended you read the following materials before diving into the rest of the post in order to better understand the terminology we’ll be mentioning.


Basic knowledge of programming terms (variables, loops) might also come in handy.


When sending a Bitcoin transaction, its fee is proportionate to its size. The more inputs and outputs, the more expensive it is. Add to that the factor of pending transactions, and transaction fees can skyrocket based on those two factors alone.


With Ethereum, given that we’re talking about a programming language within the protocol, it’s possible to be very computationally demanding with very little text or code (something which would be very cheap in the BTC-verse). Let’s look at this loop for example:


while (i++ < 1000) {     j = j + i; } 

This loop means "for as long as i is smaller than 1000, increase it by 1 and then sum up i and j and write the result into j, then do it all again." This loop will execute 1000 times if i is 0 or more if it's a negative number.


To pay for this computational cost in a fair way - since it has to be executed on all miners' machines at once and they spend their resources and time on it - the concept of gas was introduced. Gas is used to pay for the execution of these so called smart contracts (Ethereum programs) inside the EVM. For example, i + j above is a summation operation which costs 3 gas every time it's executed, so 3000 gas if executed 1000 times.


To explain gas properly, let's first cover the EVM.


EVM


EVM stands for Ethereum Virtual Machine. But what is a virtual machine anyway?


A virtual machine is software running on a specific computer which contains another operating system completely encapsulated inside the main one. A virtual machine allows you to, for example, run Windows inside of Linux, Linux inside of Windows, Windows on OS X like in the image below, or any other combination.


We use virtual machines to separate the environment in which we do our everyday computer use from the environment we work or program in. This lets us keep viruses at bay (they have no way of breaching the virtual machine and getting to the main operating system), helps prevent infinite loops from crashing our main operating system, and holds hard-drive corruptions like the infamous WannaCry ransomware at bay. Additionally, VMs let us use Windows games on Linux, for example, or allow us to program in different versions of the same programming language's environment easily, without mixing them up.


The Ethereum Virtual Machine is built into the software running on the Ethereum protocol. It executes smart contracts - Ethereum programs written in the Solidity language. The EVM is contained in the full nodes of the Ethereum network, inside of which it executes these Ethereum-user-written programs.


Any miner of Ethereum simultaneously executes smart contract code. What this means is that Ethereum programs (dapps - decentralized apps) are executed on everyone's computer at the same time (decentralized).


Execution of these programs isn't free, however. Miners spend their own electricity, time, and hardware to do this. To pay them for their effort of executing computer instructions (like "store the value 5 into the variable X"), the concept of gas was introduced.


Gas, Ether, and GWei


Gas is a unit of cost for a particular operation a computer needs to execute, and it executes this instruction when we broadcast a transaction which contains an Ethereum program in order to run a dapp. For example, summing two numbers costs 3 gas. Multiplying them costs 5 gas. Storing a 256bit word into the blockchain costs 20000 gas, which means storing 1kb of data costs 640000 gas.


Just like the USD has cents, so too does ether have its own basic unit: wei. If we take wei as the basic unit of ether, we get the following table of definitions:


unitwei
wei1
kwei / ada / femtotether1.000
mwei / babbage / picoether1.000.000
gwei / shannon / nanoether / nano1.000.000.000
szabo / microether / micro1.000.000.000.000
finney / milliether / milli1.000.000.000.000.000
ether1.000.000.000.000.000.000

According to this informative site, the current average price of gas is 10 GWei (10 gigawei). Seeing as 1 GWei is one billionth of an ether, the aforementioned cost of storing a 1kb word is 640000 * 10, which is 6.4 million GWei. That amounts to 0.0064 eth which, at a price of $450 per ether, amounts to around $2.88.


The text from the beginning of the above table all the way to >>this specific marker<< is around 1kb. So storing this little bit of text into the blockchain actually costs $2.88. However, that's just the storage cost! Our smart contract could also have some logic, like summing or multiplying and then storing numbers, or triggers that activate on a specific mined block etc. Obviously, storing data into the blockchain itself is incredibly expensive. Storage is better off in BigchainDB or IPFS, while blockchain is a better solution for global processing and verification of that data.


Why pay costs in gas and not ether directly?


All the gas prices of all the possible operations the EVM can perform are hard-coded in the Ethereum protocol and in the clients (programs) we connect to it, like Geth, Eth, Parity, etc. If the code listed them in ether, then we'd have to update the code every time ether's value fluctuated to keep the price of computing efforts in a normal range and keep the system usable, which is obviously unsustainable.


By adding this gas layer on top of the costs, and paying for gas with GWei, we are given the option to alter the amount of gas to use in a transaction and the amount of money to pay for it. It's fully under our control, without throwing the system off balance.


This leads us to our last section.


Gas limit is the maximum amount of gas we're willing to spend on a transaction. Most software we use to broadcast Ethereum transactions has the ability to auto-estimate the amount of gas that'll be necessary to execute a function. It'll usually suggest a figure right off the bat. For example, simple monetary A->B transactions usually need only 21000 gas. More complex ones which call specific smart contract functions might run into hundreds of thousands or even millions of gas. The spent amount of gas is called gas cost.


We, as a user, can modify the amount of gas we want to spend on a transaction and reduce it, but if the transaction runs out of gas during execution, we lose the gas we sent in. It's been spent and the transaction is rejected. On the other hand, if we provide more gas than is needed, the rest is refunded to us. Hence, it's always better to send more gas than you might need to execute a transaction.


Gas cost is the GWei price per unit of gas.


Thus, the total cost of an Ethereum transaction is actually the amount of necessary gas multiplied by the price in GWei per gas unit. This is the maximum transaction fee we'll pay - any extra gas is refunded, so fees are often vastly overestimated.


Let's look at an example.


In the above image, we're executing a transaction which, due to its complexity, estimates it'll need 135963 gas. With a 25 GWei price, the maximum transaction fee we'll pay is $1.57, which is trivial when looking at the total amount we're sending (0.38 eth = $178). If we raise the price of gas to 250 GWei, the transaction becomes proportionately more expensive:


A higher tx fee effectively encourages miners to process our transaction before others in the queue, thereby speeding up execution. If we're not in a rush, we can leave the price of gas at its starting value and the transaction's confirmation shouldn't take more than 10 minutes. But if we're in a rush and want it done in seconds (if, for example, we're dealing with an auction), it's easy to increase the price of gas and sacrifice some money for a guarantee of success.


Conclusion


Gas is the unit of work expended per computational operation in the Ethereum Virtual Machine. It's paid for in ether, the token of the Ethereum protocol, and each computational operation has a different gas cost. The gas price (in GWei or 1 billionth of an ether) varies according to the network congestion and the user's preference for a speedy confirmation.


For a smart contract which we want to deploy on the Ethereum network, two terms are important: gas limit, and gas price. Gas limit is the maximum amount of gas we're willing to spend on executing the transaction. The amount of gas actually required (known only once the transaction has been executed) is called gas cost. Gas price is the price per unit of gas, expressed in GWei (or billionths of ether). The total cost of a transaction will be the product of gas cost and gas price, while the maximum transaction fee will be the product of gas limit and gas price. The difference is refunded to the transaction's sender to keep the system fair and usable.


Original article and pictures take bitfalls.com site

среда, 2 августа 2017 г.

Ethereum explained…(infographic)

Ethereum explained…(infographic)

Ethereum explained…(infographic)



We can do amazing infographics for you go to http://metadesign.io


Get 10 usd bonus in btc when you buy 100 usd of Ether:


Coinbase - Buy and Sell Bitcoin and Ethereum

The easiest place to buy, use, and accept bitcoin and ethereum. Using digital currency has never been so safe and easy.www.coinbase.com


Hallo! Now in german! (danke to Sarah & Lena of Zukunftsinstitut)


French? Oui bien sûr (mercì to Simon @simonpolrot )


Em português também? Claro, por que não? (obrigado @renanpiva )





Want to republish in your own language?


Send me a google doc via twitter and will send the png back ��


Feel free to share on twitter, reddit, crypto forums!


(or give it to your mom: click here to download the printable PDF Version)


New story: how to get Ether if you are late to the party.


Update 06–27–2015:


I’m so thankful for the great response this infographic is getting!


It was also posted on the ethereum sub-reddit by @mids106


It was tweeted by @ethercasts, @ethereumita and so many other kind people.


But THIS… is the best thing I could hope for (thanks Andrew, thank you @smartcontract!):




My mom holding 2nd iteration of the infographic

The story behind this infographic (Short version)


When I saw this infographic https://blog.ethereum.org/2015/06/21/ethereum-messaging-masses-including-fathers-via-infographic/ by @diiorioanthony , I couldn’t resist.


I thought I could do things differently and felt I HAD to take action, fast.


Goal of the infographic was to explain Ethereum to the masses.

I went extreme, and tried to explain ethereum to my mom!


UPDATE 08/03 Why my mom? Because:


my mom > technical than my dad


My dad would never understand or want to understand.


On the other hand my mom knows tech a little better and best of all, is more open minded.


This can be considered a “redesign” of that infographic if you agree with me that


“design is not just what it looks like, it is how it works” — Steve jobs

  • first iteration was titled “what the f***k is ethereum” but I went deep into blockchain, and blocks (too complex)… and apparently my mom doesn’t like curse words :-9
  • So I presented her a much simpler version, thinking about how could I make the infographic more understandable, just for her
  • I tested the second iteration with… yep, my mom. Her questions and reasoning contributed to make the infographic even simpler. The result is the third and final iteration that you can see here.

The story behind the ethereum mom infographic (Long version)


aka see how my mind works.


Testing a product / service / tutorial / infographic with your target market is more important that the thing you create itself.

I sharply defined who my audience is.


My audience is my mom.


My mom and tech: owns an old iphone 3gs

What she knows about tech : windows, microsoft office, iphone apps, her company has servers (but who knows where they are…)

What she knows about money: bank account, a little buy & hold investing, Debit card


Let me use these info to design the infographic

I decided to not use “will” or “in the future”. It’s made on purpose, I wanted my mom to feel like: “this is a real thing and works already”.

I assume that faking it, made it easier to undestand. I didn’t loose her attention.


Otherwise… CONFUSION.


One example is Mist.


“You install this special program on your computer and you connect to the Ethereum network”


Easy, uh?


I never mentioned bitcoin. It’s not my goal here


The infographic after testing with my mom

I can say: mission accomplished.


I didn’t tell her how Ethereum exactly works, because the goal was to make her “grasp” ethereum.

It’s like when you explain things to a baby… you create an easier and partial explanation for them, they get the big picture, they are educated at a basic level, but they can go deep if they want.


I used messages as a metaphor to let her understand.


I wrote whatsapp servers instead of facebook servers just because 90 % of the users doesn’t know or remember they sold to facebook.


And it can be confusing, so…


Wrapping up


Ether is like bitcoin but with a clear purpose: it let Dapps work


Ether is not designed to be spent like bitcoin in your grocery store.


We don’t need people like my mom to start adopting ether and using it everyday.


Ultimately the focus of Ethereum should be educating normal people like my mom on why they should prefer an app with a decentralized elements; thus creating demand and bringing developers into Ethereum.


While bitcoin needs millions of normal people to work, for ethereum to succeed a few thousands of developers are enough.


It’s the same with computers (including the ones we have in our pockets): the vast majority of the world population is a consumer, not a creator.


And consumers don’t know how apps work behind the scenes, but they know exactly why they use them.


P.S.


I’m open to suggestions (message me on twitter), and the result will be a 4th iteration of the infographic. Keep in mind that this is for moms, dads and your grandparents if you wish…not full-stack developers.


Thanks!


Upcoming: Etherex explained… to my mom!


Original article and pictures take cdn-images-1.medium.com site

вторник, 1 августа 2017 г.

Ethereum Exclusive Unicorn Design T-Shirt

Ethereum Exclusive Unicorn Design T-Shirt
Ethereum Exclusive Unicorn Design T-Shirt
Independent artist’s content may not match model depicted; RealView™ technology illustrates fit and usage only.

Original article and pictures take www.zazzle.com site

Ethereum exceeds $ 1,000

Ethereum exceeds $ 1,000
New maximum for Ethereum break the barrier of $ 400

Another record in the cryptocurrency market. Ethereum has managed to exceed $ 1,000 this Friday , after several days marked by a pattern of growth that have led it to increase its value by 45% from a week ago.


The digital currency began on the last Friday of 2017 for $ 737, according to data from the CoinMarketCap portal . Until Monday, January 1, it remained in the 700 range, to increase close to 140 dollars in the early hours of the same Tuesday morning. Since then, the ethereum has been cooking at a constant temperature, exceeding $ 1,000 at noon on Thursday and reaching a peak of $ 1,075 a few hours later , early in the morning this Friday.


With these figures, the market volume that moves the cryptocurrency is around 100.119 million dollars ; an amount well above the 83.519 million on Tuesday morning. It remains, however, below Ripple, who also lived a spectacular lift this week, currently totaling 125,766 million dollars.


The price of the latter, despite its growth, is very far from that of ethereum or the first in the market, bitcoin. Ripple is currently at $ 3.84 , a very far from the 1,024 that the ethereum is now moving or the 16,500 that has managed to recover bitcoin. However, the least valued of the three has grown 156% in the last week, although it drops in the early hours of Friday.


The one of the cryptocurrencies is one of the markets that more changes have experienced throughout 2017. Led by the spectacular ascent of the bitcoin, that starting off of 997 dollars arrived to touch the 20,000 throughout the year, this type of currencies is considered one of the technologies to be taken into account for this 2018.


Original article and pictures take digitalbodha.com site

понедельник, 31 июля 2017 г.

Ethereum Ether ETH Shot Glass Crypto Cryptocurrency Bitcoin Blockchain Shooter Shotglass bar barware gifts

Ethereum Ether ETH Shot Glass Crypto Cryptocurrency Bitcoin Blockchain Shooter Shotglass bar barware gifts

Ethereum Ether ETH Shot Glass Crypto Cryptocurrency Bitcoin Blockchain Shooter Shotglass bar barware gifts


MADE IN THE USA!


Custom-etched 1.4 Oz shooter glasses. Take a shot for every $1,000 you made on the cryptocurrency market today!


Available in the following designs:

1. Bitcoin

2. Augur

3. Ripple

4. Monero

5. Ethereum

6. Litecoin

7. PIVX

8. Dash

9. Digibyte

10. Z-Cash


SHIPPING & HANDLING Options:

-USPS First class (1-5 business days)

-USPS Priority (1-3 business days)


**You can save a lot of $ on shipping if you purchase more than one item.**


Visit our store to check out more of our products!


Original article and pictures take www.etsy.com site

пятница, 28 июля 2017 г.

Ethereum Ether ETH Shot Glass Crypto Cryptocurrency Bitcoin Blockchain Shooter Shotglass bar barware gifts 1.5 oz

Ethereum Ether ETH Shot Glass Crypto Cryptocurrency Bitcoin Blockchain Shooter Shotglass bar barware gifts 1.5 oz

Ethereum Ether ETH Shot Glass Crypto Cryptocurrency Bitcoin Blockchain Shooter Shotglass bar barware gifts


MADE IN THE USA!


Custom-etched 1.5 Oz shooter glasses. Take a shot for every $1,000 you made on the cryptocurrency market today!


Available in the following designs:

1. Bitcoin BTC

2. Augur REP

3. Ripple XRP

4. Monero XMR

5. Ethereum ETH

6. Litecoin LTC

7. PIVX PVX

8. Dash DSH

9. Digibyte DGB

10. Z-Cash ZCH


SHIPPING & HANDLING Options:

-USPS First class (1-5 business days)

-USPS Priority (1-3 business days)


**You can save a lot of $ on shipping if you purchase more than one item.**


Visit our store to check out more of our products!


Original article and pictures take www.etsy.com site