Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Dynamic are all the SCs that embed various rules allowing them to perform different actions according to these rules. Examples of such SCs are  functions that monitor certain conditions and trigger according actions. This can happen i.e. when a SC is utilized to monitor the electricity consumption and temperature logged on the BC of an energy smart building. The SC includes thresholds for different heating and consumption measurements in order to adjust the temperature in an eco-friendly way, avoiding excessive electricity consumption and costs. The following pseudocode can be part of the smart contract’s definition showing the logic behind monitoring and execution

if room_temperature < 18 Celcius {

  if electricity_consumption < 25 Watt

then turn_on air_condition

  else send_message: "The dailydaily electricity consumption threshold has been reached. Would you like to turn on the A/C?"

    if user_answer == ‘YES’ then

            turn_on air_condition

 else do_nothing

}

if room_temperature > 25 Celcius {

  if electricity_consumption < 25 Watt

 then turn_on heating_unit

  else send_message: "The daily electricity

consumption threshold has been reached. Would you like to turn on the heating_unit?"

     if user_answer == ‘YES’ then

       turn_on heating_unit

  else do_nothing

}

This SC although deterministic, follows a non-static conditioned flow, which shows how a dynamic SC might be formed and how it can act. The aforementioned code is very simplistic but computer functions can be long and very complex. Additionally it involves human interaction, which in certain occasions could hinder or cancel the dynamic action feature of SCs. In our perspective the human input is considered dynamic to the terms of non-standard, condition driven final action. There are also other occasions where the dynamic nature of SCs is controlled by machine-to-machine M2M actions. This M2M interactions can have unpredictable outcomes when the developer’s design and implementation of the SC is erroneous, incomplete, or non-deterministic.

...