Be a crypto hero in the market by logging in

Don't you have an account? Sign in

Token price

  • BTC

    9,754,638.8KRW

    -1.4%

  • ETH

    214,393.2KRW

    -2.4%

  • XRP

    342.6KRW

    -1.5%

  • USDT

    1,194.8KRW

    0.3%

  • BCH

    266,020.9KRW

    -0.6%

  • LTC

    65,842.7KRW

    -1.6%

  • BNB

    21,919.6KRW

    0.0%

  • EOS

    3,531.9KRW

    -4.9%

  • BSV

    109,057.4KRW

    6.6%

  • XLM

    76.1KRW

    -1.0%

  • TRX

    18.7KRW

    -5.4%

  • ADA

    47.0KRW

    -4.1%

  • XMR

    63,757.0KRW

    1.2%

  • HT

    4,188.4KRW

    -2.9%

  • DASH

    84,780.6KRW

    -0.7%

  • XTZ

    1,078.5KRW

    -2.3%

  • ETC

    5,552.7KRW

    -0.5%

  • NEO

    8,769.8KRW

    -2.0%

  • MKR

    588,426.4KRW

    -2.0%

  • USDC

    1,194.4KRW

    0.4%

  • ONT

    761.9KRW

    0.5%

  • XEM

    44.8KRW

    -3.2%

  • DOGE

    3.0KRW

    -0.3%

  • BAT

    253.3KRW

    -3.6%

  • ZEC

    43,950.2KRW

    0.3%

  • PAX

    1,194.2KRW

    0.4%

  • INB

    769.7KRW

    1.9%

  • VET

    4.1KRW

    -3.2%

  • TUSD

    1,194.0KRW

    0.4%

  • ZRX

    362.4KRW

    -5.6%

  • QTUM

    2,079.4KRW

    -2.6%

  • DCR

    17,963.4KRW

    -4.7%

  • RVN

    39.5KRW

    -4.8%

  • LINK

    485.1KRW

    2.0%

  • BTG

    9,645.4KRW

    0.7%

  • OMG

    954.0KRW

    -1.9%

  • NANO

    998.0KRW

    7.2%

  • DGB

    9.8KRW

    -4.7%

  • KCS

    1,317.8KRW

    -1.4%

  • LSK

    947.9KRW

    -2.2%

  • BCD

    589.9KRW

    3.3%

  • REP

    9,799.1KRW

    0.2%

  • SC

    2.5KRW

    -5.3%

  • WAVES

    1,010.1KRW

    -2.9%

  • DAI

    1,195.0KRW

    0.4%

  • ICX

    200.3KRW

    -3.3%

  • XIN

    211,021.1KRW

    0.4%

  • XIN

    211,021.1KRW

    0.4%

  • THETA

    107.0KRW

    -5.4%

  • BCN

    0.5KRW

    -2.3%

  • MONA

    1,326.3KRW

    -2.4%

  • BTS

    30.4KRW

    -4.6%

  • KMD

    699.4KRW

    -1.3%

  • QNT

    6,441.4KRW

    -3.8%

  • HC

    1,746.4KRW

    0.4%

  • MAID

    167.8KRW

    1.4%

  • BTM

    68.4KRW

    0.0%

  • BTM

    68.4KRW

    0.0%

  • XVG

    4.3KRW

    -6.1%

  • MCO

    4,270.0KRW

    -0.8%

  • AE

    232.6KRW

    2.4%

  • IOST

    5.5KRW

    -5.2%

  • NEXO

    113.7KRW

    1.8%

  • ARDR

    63.5KRW

    -2.1%

  • AOA

    9.5KRW

    1.4%

  • GNT

    59.9KRW

    -2.4%

  • ZIL

    6.5KRW

    -3.6%

  • ENJ

    72.0KRW

    -3.7%

  • STEEM

    159.9KRW

    -0.7%

  • NPXS

    0.2KRW

    -3.5%

  • SNT

    15.0KRW

    -2.3%

  • XZC

    5,984.2KRW

    -6.4%

  • ELF

    95.2KRW

    -1.4%

  • ETN

    4.5KRW

    4.1%

  • STRAT

    422.9KRW

    -3.5%

  • FCT

    4,242.3KRW

    -3.8%

  • WTC

    903.1KRW

    0.3%

  • ELA

    2,227.3KRW

    -0.3%

  • ODE

    150.7KRW

    21.4%

  • LRC

    37.9KRW

    0.6%

  • RDD

    1.2KRW

    -5.1%

  • PPT

    576.7KRW

    -4.5%

  • PAI

    20.6KRW

    -2.9%

  • PAI

    20.6KRW

    -2.9%

  • ANT

    987.6KRW

    -7.5%

  • R

    59.9KRW

    -2.8%

  • AION

    81.0KRW

    -2.5%

  • ARK

    242.2KRW

    -3.3%

  • LOOM

    27.6KRW

    -6.1%

  • WAX

    30.3KRW

    -1.8%

  • BNT

    402.4KRW

    -3.2%

  • POWR

    57.2KRW

    1.1%

  • FNB

    40.3KRW

    -13.9%

  • DENT

    0.3KRW

    -2.3%

  • CNX

    307.0KRW

    3.3%

  • PIVX

    298.7KRW

    -4.0%

  • MOAC

    268.0KRW

    2.8%

  • TTC

    44.4KRW

    -1.9%

  • PAY

    113.0KRW

    -6.5%

  • POLY

    31.8KRW

    -1.2%

  • GUSD

    1,186.2KRW

    0.9%

  • BORA

    10.7KRW

    -3.1%

  • REPO

    76.2KRW

    -7.1%

  • HUM

    16.9KRW

    1.5%

  • LKY

    143.5KRW

    1.4%

  • MBL

    1.9KRW

    -1.3%

  • CPT

    2.2KRW

    -2.1%

  • AERGO

    54.4KRW

    -1.0%

  • COSM

    8.1KRW

    -0.2%

  • APIS

    0.5KRW

    3.2%

  • UPP

    11.6KRW

    -2.7%

  • BAAS

    0.7KRW

    -6.6%

  • MVL

    0.4KRW

    -3.8%

  • TEMCO

    0.9KRW

    -4.9%

  • MEETONE

    1.4KRW

    -5.1%

  • DCC

    0.9KRW

    0.3%

  • eDEL

    2.4KRW

    -0.7%

  • ABL

    9.1KRW

    -11.3%

  • CLB

    4.2KRW

    -32.9%

  • AMON

    4.4KRW

    10.0%

  • PTON

    0.1KRW

    -0.1%

  • AKRO

    2.6KRW

    14.1%

  • HORUS

    1.4KRW

    -11.2%

  • PXL

    20.5KRW

    -4.2%

  • XRA

    10.3KRW

    -0.0%

  • AID

    4.9KRW

    10.5%

  • WET

    5.8KRW

    -3.8%

  • VRA

    0.4KRW

    -4.3%

  • NEWS

    2.9KRW

    4.5%

  • KARMA

    0.1KRW

    -15.2%

  • RBG

    1.6KRW

    8.3%

  • RBTC

    9,738,386.1KRW

    -1.5%

  • SEAL

    0.9KRW

    0.3%

  • PUB

    0.2KRW

    -2.6%

  • NPER

    3.5KRW

    0.3%

  • CCH

    0.1KRW

    80.0%

  • PUT

    3.0KRW

    25.8%

  • KNT

    0.0KRW

    -8.0%

  • IQ

    4.9KRW

    -1.9%

  • BLACK

    0.8KRW

    -1.8%

  • CET

    28.1KRW

    -0.9%

  • RCD

    3.0KRW

    --%

  • MCC

    1.7KRW

    0.3%

  • INC

    1.9KRW

    -3.4%

  • BZKY

    0.1KRW

    -1.1%

  • CRE

    2.0KRW

    -1.6%

Community

What is CounterFactual?

Ontology Gas | 07.12| 77

When people see something happening in real life, they tend to create possible alternatives that are contrary to what actually occurred. This tendency is named “Counterfactual thinking” by Daniel Kahneman, a Nobel laureate in Economics. You might wonder what CounterFactual has to do with blockchain?

In this article, the author would like to share some of his thoughts on blockchain CounterFactual and what it can do for us.

What is CounterFactual?

CounterFactual (CF) thinking is, as it states: “counter to the facts”. These thoughts consist of the “What if?” and the “If I had only…” that occur when thinking of how things could have turned out differently. CounterFactual thoughts include things that–in the present–now could never happen in reality because they solely pertain to events that have occurred in the past.

From the perspective of blockchain, CounterFactual means: the transaction result could be obtained on-chain, but in reality, the execution result is not obtained on-chain.

In the off-chain scaling technology of blockchain, CF refers to CounterFactual Instantiation, which is derived from a state channel-based off-chain scaling technology proposed by L4Lab. It is widely studied and promoted as a type of blockchain scaling design in the field of blockchain research.

CounterFactual Instantiation means that smart contracts can be deployed on the off-chain CF state channel, instead of being counterfactually instantiated on the blockchain. As long as all participants of smart contracts follow the methods defined in the CF state channel protocol, the execution results of the operations in the state channel are fully equivalent to those executed on the blockchain.

Simply put, off-chain CF state channels can achieve the same results as the blockchain, which include not only the state data of smart contracts but also the trustless feature of the blockchain (traceability and irreversibility at its core). Since the results are the same, why not move most smart contract operations off of the chain, considering the limited blockchain performance and the cost-effectiveness of the off-chain solution.

CounterFactual State Channel

In the L4 Paper, the CF state channel protocol is defined as below:

Roughly speaking, for any on-chain operation X that can be channelized, we use counterfactual X to talk about the case where

1. X could happen on-chain, but doesn’t;

2. The enforcement mechanism allows any participant to unilaterally make X happen;

3. Participants can act as though X has happened.

A Closer Look

As a coder, when I see an application protocol, the first reaction is to verify the completeness of the protocol, analyze its feasibility, create its application boundary, and then think about how to implement it.

Let’s now take a closer look at the 3 criteria in the definition of CF state channel:

1. First, CF state channel and blockchain execution environment are equivalent. Any operations in the state channel must be fully equivalent to those in the blockchain execution environment. Therefore, which execution environment users choose is irrelevant to the protocols;

2. Based on the first criterion, the second criterion defines the fairness and trustless feature of CF state channel, or simply “being secure”. State channels are fair to all participants. State modification caused by each operation must be viewable and verifiable to all participants. Based on the first criterion, anyone can directly synchronize the state modification on-chain. Therefore, for state channel participants, CF state channels are as secure as blockchain;

3. The third criterion defines the consistency and finality of CF state channel. Operations and channelized state within the channel must be consistent to all participants and must be instantly finalized. This can ensure the traceability and irreversibility of the state channel for all participants.

Afterword

From the above, we can see that CF state channels fully possess the existing blockchain properties, such as consistency, irreversibility, security, and finality. Using CF state channels as an off-chain scaling technique will not compromise the security of blockchain applications.

In the next articles, we will dive into the CF state channel protocol and take a look at its application boundary.

Are you a developer? Make sure you have joined our tech community on Discord. Also, take a look at the Developer Center on our website, there you can find developer tools, documentation, and more.

Find Ontology elsewhere

Ontology website / Ontology GitHub / ONTO website / OWallet (GitHub)

Telegram (English)Discord

Twitter / Reddit / FacebookLinkedIn


What is CounterFactual? was originally published in OntologyNetwork on Medium, where people are continuing the conversation by highlighting and responding to this story.

Comment 0

delete

Are you sure you want to delete this post?