Common use of Simple Case Clause in Contracts

Simple Case. Simple cases are quite popular in practice. For example, when a customer pays an amount x for a video to an online store who keeps amount y to itself and transfers amount z to the video producer as requested by copyright agreement, where x = y + z. In such a case, the three parties form a group, and the money transfer from the customer to the store as well as the one from the store to the video producer must be considered together to guarantee the atomicity of the transaction. Formally speaking, a simple case involves a transaction TX, a group of users U affected by TX, and input x, where the on-chain states of all users are not locked. Each user Ui computes a temporary state Si with input x, then creates a commitment ci. Let d = (d1, d2, . . . , d|U|) be the deposits of the users in U. Note that di can be either positive or negative, which indicates earning or spending money. Besides, throughout the life of a transaction. Deposits are applied to “un-do” the transaction in case a revocation occurs. Suppose a commitment ci gets revoked, the owner of it, i.e., Ui, pays di if to temporary states balance(1) and balance(1), respectively, di ≥ 0 or gets −di as compensation if di < 0. In the following and the transaction TXA→C updates ▇▇▇▇▇’s temporary state balance(1) and ▇▇▇▇▇’s on-chain state balance(0) to temporary we employ a two-user example to illustrate our latency-first smart contract model for the sample case. states balance(2) and balance(1), respectively, as the com- mitments for the transaction TXB→A have not been proved before the ones for TXA→C are received. Our example also shows a transaction between ▇▇▇▇ and Eve TXD→E, which

Appears in 2 contracts

Sources: Latency First Smart Contract, Latency First Smart Contract