Smart Contracts and Crypto Currencies

We have seen that Smart Contracts are simply a way to execute program code distributed over a network. This achieves the data integrity guaranteed by the respective blockchain platform. But how does this fit in with the hype in the IoT area (e.g. the automatic cold chain monitoring with fines mentioned in the introduction)? In such cases, the Smart Contracts consistently manage monetary clearing units (crypto currencies).

For example, a Smart Contract could be set up for a refrigerated container that is to be transported from Singapore to Amsterdam. This implements the monitoring of the maximum permitted temperature fluctuation range (which the logistics company guarantees) and at the same time an automatic penalty payment in the event of a deviation.

The really interesting and new thing about blockchains in the Bitcoin news

The Bitcoin news contract could be designed in such a way that an IoT sensor reports the temperature to the Smart Contract every hour during the entire transport and a deviation from the agreed temperature range immediately provides for a further blockchain transaction to transfer a settlement currency as a penalty payment. This is further explained by onlinebetrug.

Blockchain networks, which automatically handle decentralized electricity deliveries, are also similar combinations of IoT sensors with Smart Contracts in the background. (Basically, the term “Smart Contract” is based on such concrete advance agreements that do not require manual or even judicial follow-up and are implemented in a purely technically automated manner.

The really interesting and new thing about blockchains is that they allow the creation of completely decentralized structures. Network participants no longer have to agree on a central, trustworthy location, but only on the content of the Smart Contracts. These then run decentrally in the blockchain network. Not only for the logistics sector, but for all market areas, there is hope that market participants will be able to implement digitization processes without restricting their autonomy by choosing a central processing organ (possibly from a pool of competitors from the same industry).

And I personally find that extremely exciting

Ingo Rammer is a speaker at the Blockchain Technology Conference from 19-21 November in Berlin. There you can gain practical experience with international experts. There will also be live demos and case studies of real implementations, individual interaction with experts and networking opportunities with people from various industries. You can also expect a variety of sessions, workshops and short presentations from international speakers.

Exclusive discount code for our readers: Simply enter blockchain-btc-15 and secure 15 percent discount. Tickets are available here.

Ingo RammerIngo Rammer is one of the founders and managing directors of Thinktecture AG and has been supporting developers in the use of new technologies for almost twenty years. His focus is the hype-free use of blockchain technologies in the B2B environment, especially in private networks based on Hyperledger Fabric or Parity.

Bitcoin (BTC) – Price analysis – Breathing in a sideways trend

After testing the 8,000 euro mark, the price moved in a sideways trend. A slight uptrend or a triangle pattern was passed, but this uptrend was broken in the night of April 30th. The price could rebound at the support described by the plateau from April 20 to 23 and is currently struggling with the EMA50.

The news spy price fell slightly this week

After an attempt to break the upward trend that had been pursued since mid-April, the price bounced off it and onlinebetrug tested the scam exponential moving average EMA50. Overall, the news spy price is rather bearish. The most important support and possible stop loss is 7,359.50 euros, the first interesting resistance and thus the first target 7,620.99 euros.

Yesterday’s rather mixed assessment is confirmed: The Bitcoin price fell by 5 percent on April 30. For the average Hodler this disappears in the noise. In any case it is certain that the plateau of the last days, which was 7,620.99 euros, was broken through. In the short term, the price even dropped below the exponential moving average EMA50, but bounced off the support described by the April 27 minimum. This minimum is at the same level as the former resistance of the triangle pattern mentioned last week.

The MACD (second panel from above) is still positive, but strongly falling and is about to test the zero line. Accordingly, the MACD line (blue) is below the signal (orange). The RSI is at 43 and therefore bearish.

Overall, the impression is bearish according to the price, trend and indicators

Support and Resistance
The first support is 7.359,50 Euro and is described by the minima of April 27th and May 1st. These are at the level of the resistance of the triangle pattern discussed last week or the plateau passed from April 20 to April 22. Another support is described by the EMA 100 at currently 7.192,17 Euro.

The first resistance is at 7,620.99 Euro and thus at the level of the broken upward trend. If the price should overcome this level, a further Resistance would be described by the monthly maximum of April with 7.995,00 euro.

Entry Points, Stop Losses and Targets
The latest bounce of course invites you to a long position. Stop loss would then be at the level of support at 7,359.50 euros, first target at 7,620.99 euros and second target at 7,995 euros. Of course, the stop loss has to be trailed when the first target is reached again.

If the price falls below the stop loss, one has to look out for a possible re-entry point. Should the price at the support bounce at the level of the EMA100 at 7,192.17 Euro, this would again be a good moment for a re-entry. The mentioned support would then be a good stop loss, targets would be at 7.359,50 Euro, 7.620,99 Euro and 7.995,00 Euro.

Disclaimer: The price estimates presented on this page do not represent recommendations to buy or sell. They are merely an assessment of the analyst.

Solidity: How to program Smart Contracts?

Since Vitalik Buterin developed Ethereum, smart contracts have become an integral part of the blockchain ecosystem. But what is behind these “smart contracts”? In five parts, Ingo Rammer explores the implications of the technology for us. Today: Why is a Smart Contract secure?

Why exactly is the whole thing safe?

So far, so good. But what about the security of this approach? What would happen if one of the participants simply exchanged the smart contract on the blockchain node he controlled and used a variant that was advantageous for him? (Depending on the blockchain, the attacker would have to dive relatively far into the internals of the implementation of the blockchain platform – but it is still a valid attack vector that has to be considered at least on a theoretical level).

What would an attacker have to do?

In our example, an attacker could try to take control of all phone numbers by changing the check conditions in his version of the smart contract. But this would lead to the World State being changed only on the attacker’s node: Only for him it looks as if he controls all telephone numbers.

All other participants would continue to execute the correct version of the contract. If, due to the consensus mechanism chosen between the participants, the attacker is selected by the network itself to generate new blocks, these would immediately be rejected by the other participants.

The attacker would lose the status of the block generator again, since depending on the configuration of the block chain, half or two thirds of all participants must agree with the result of a transaction before it is considered correct network-wide. An attack attempt therefore only harms the attacker himself.

One can therefore compare this attack with a bank customer crossing out the status on his printed account statement and overwriting an increased credit balance. From his point of view, he now has much more money than before. But as soon as he tries to access this money, he is very quickly brought back to the bottom of the facts: his own view remains a wish and will at best be acknowledged by his counterpart with a smile.

How is a Smart Contract called up?
Having seen so far how a Smart Contract is technically defined, and knowing that it can trigger events that external (non-blockchain) systems can process, one last piece of the puzzle is still missing: How is the Smart Contract actually called?

Most blockchain platforms have corresponding SDKs in JavaScript, .NET and/or Java for this purpose. These SDKs allow the creation, signing and transmission of transactions to own or externally operated nodes of the blockchain network.

For Ethereum derivatives, a Smart Contract is called as follows: First, the method name and the method arguments are converted into a defined binary format. For this, auxiliary methods are provided by the SDK that can process the interface description (ABI – Application Binary Interface) of the Smart Contract and generate the corresponding binary data. A transaction is then created that uses as the destination address the address that was created during the instantiation of the Smart Contract described above.

This entire operation can either be performed explicitly in individual steps by the client code, or – as shown in Listing 5 – it can also look like a normal function call using automatically generated methods. In the listing we see the relevant part of the call of the above mentioned contract method requestTransfer, which uses web3.js [4], the JavaScript SDK for Ethereum.