Digital Asset Modeling

The introduction of flexible data models and consent-based execution for digital assets on blockchain systems addresses regulatory compliance and fraud issues, facilitating institutional investor participation.

JP7532586B2Active Publication Date: 2024-08-13DIGITAL ASSET SWITZERLAND GMBH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023045800
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2016-06-13
Filing Date
2023-03-22
Publication Date
2024-08-13
Estimated Expiration
2037-04-28

AI Technical Summary

Technical Problem

Existing digital asset platforms on blockchain-like systems lack flexibility and fail to meet regulatory requirements for financial institutions, leading to hesitancy among institutional investors and the need for duplicate processes and potential fraud.

Method used

A mechanism is introduced for modeling digital assets with flexible data models and functionality, allowing for consent-based execution of functions and using an annotation-only ledger to store results, enabling secure and transparent transactions.

Benefits of technology

Enhances transaction flexibility and compliance with regulatory standards, reducing fraud risks and enabling institutional investors to participate in digital asset markets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007532586000001
    Figure 0007532586000001
  • Figure 0007532586000002
    Figure 0007532586000002
  • Figure 0007532586000003
    Figure 0007532586000003
Patent Text Reader

Abstract

To provide a system and method for modeling and interpreting a modeled digital asset and its evolution with respect to the rights of a plurality of parties.SOLUTION: The method comprises: executing an await function instance no more than once using at least one of choices defined therein for disposition of the digital asset with respect to the rights of at least one of the plurality of parties, said await function instance incorporated upon the consent of the affected parties to fulfil a configured function instance associated with the at least one choice; executing an agree function instance that requires the consent of at least one of the plurality of parties to execute; and storing the results of the executed function instances in an append-only ledger.SELECTED DRAWING: Figure 46
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] cross reference This application claims priority under 35 U.S.C. § 119 to U.S. Provisional Patent Application No. 62 / 329,888, entitled Digital Asset Modelling Language Simulator, filed in the United States Patent and Trademark Office (USPTO) on April 29, 2016 (Attorney Docket No. 16-30013-US-PV, Customer Docket No. DAH-2016011P), the entire contents of which are incorporated herein by reference.

[0002] The present disclosure relates to a digital asset modeling system and method for modeling, tracking and settling digital assets, obligations and transactions. [Background technology]

[0003] Existing private, centrally managed ledgers used to settle assets, liabilities, and transactions are considered opaque and error-prone. This complicates audits, requires multiple overlapping processes and ledgers, and allows for the possibility of fraud. The first and currently largest alternative to existing ledger structures is represented by a distributed digital ledger called Bitcoin, which uses a blockchain data structure. The basic principle of Bitcoin's operation is that the system is set up as a peer-to-peer transaction mechanism using public-private key cryptography, with no intermediate or central repository, allowing all participants in the network to maintain and verify the integrity of a complete copy of the ledger in real time. The Bitcoin blockchain was designed to create a trustless native asset, Bitcoin, that can be exchanged with pseudonymous parties around the world.

[0004] Current platforms built to support digital assets on Bitcoin-like or blockchain-like systems are generally not structured to provide comprehensive protections to financial institutions that may be required by law for many existing trading businesses. These platforms generally do not take into account the regulatory regimes for financial institutions and financial transactions. As a result, institutional investors have been hesitant to enter the digital asset market and have avoided using distributed ledgers for existing commercial transactions. Summary of the Invention [Means for solving the problem]

[0005] Throughout this specification the word "comprise" or variations such as "comprises" or "comprising" will be understood as implying the inclusion of a stated element, integer or step, or group of elements, integers or steps, but not the exclusion of any other element, integer or step, or group of elements, integers or steps.

[0006] Throughout this specification the word "comprise" or variations such as "comprises" or "comprising" will be understood as implying the inclusion of a stated element, integer or step, or group of elements, integers or steps, but not the exclusion of any other element, integer or step, or group of elements, integers or steps.

[0007] The embodiments disclosed herein provide mechanisms for adding flexibility to computer-implemented transactions of digital assets. The embodiments provide new data models and functions to enable computer systems performing the transactions to operate in new and advantageous ways. An exemplary embodiment method for modeling digital assets and the deployment of digital assets with respect to rights of multiple parties is provided, the method including the steps of providing an await function instance that is executed only once using one of at least one option defined in an await function instance for the transfer of a digital asset with respect to the rights of at least one of the multiple parties, the await function instance being incorporated with the consent of the affected party to execute a configured function instance associated with the at least one option, providing an agree function instance that requires the consent of at least one of the multiple parties to execute, and providing an annotated private ledger for storing the results of the executed function instance.

[0008] An exemplary embodiment method is provided for modeling and / or recording digital assets and deployment of digital assets including associated rights of multiple parties, the method comprising: determining an await function including at least one option defined in the await function for transfer of the digital asset, the at least one option having an associated configured function and a respective selection step condition. The method further comprises: executing the await function instance once, where upon receiving an indication of party consent required by the at least one option, and receiving a valid option selection from the at least one option, the method further comprises executing an associated configured function instance of the at least one option, the await function terminating with a determination that the selection step condition of the valid option selection is satisfied; and determining an agree function to create an agreement record associated with the digital asset, the method further comprises executing the agree function instance based on receiving the indication of party consent required for the agreement. The method further comprises sending a result of the executed function instance to an annotated dedicated ledger for storage.

[0009] A method for modeling and / or recording digital assets and deployment of digital assets as described above may be provided, where at least one of the multiple parties whose respective rights are outstanding is the same as at least one of the multiple parties whose consent is required. A method may be provided further comprising providing a delete function that requires the consent of the affected parties to disable the agree function or to neutralize the await function that is not executed, where the annotated-only ledger stores the results of the executed await function, the agree function, and the delete function. A method may be provided in which the digital asset comprises at least one of cash and / or mark-to-market payments, fungibles, equity, bonds, commodities, futures, rights, or goods. A method may be provided in which the selection of at least one of the await functions is made by a representative of at least one of the multiple parties. A method may be provided in which the annotated-only ledger comprises a blockchain. A method may be provided in which the annotated-only ledger may be queried for the status of the digital asset based on pattern matching. A method may be provided where the annotation-only ledger may be queried for the status of digital assets of all models in the ledger using queries based on the top-level definition. The method may further include providing a delete function for deactivating an active model so that it is no longer available for future transactions.

[0010] An exemplary embodiment method for interpreting a modeled digital asset and the deployment of the digital asset with respect to rights of multiple parties is provided, the method including the steps of: executing an await function instance once using one of at least one option defined in an await function instance for the transfer of the digital asset with respect to rights of at least one of the multiple parties, the await function instance being incorporated with the consent of the affected parties to fulfill a configured function instance associated with the at least one option; executing an agree function instance, the execution of which requires the consent of at least one of the multiple parties; and storing the results of the executed function instance in an annotated-only ledger.

[0011] An exemplary embodiment method of interpreting a modeled digital asset and deployment of the digital asset including associated rights of multiple parties is provided, the method comprising: executing an await function instance once, the await function instance comprising at least one option defined in the await function instance for transfer of the digital asset, the at least one option having an associated configured function and a respective selection step condition, the method further comprising executing an associated configured function instance of the at least one option upon receiving an indication of party consent required by the at least one option, and receiving a selection of a valid option from the at least one option, the method further comprising executing an associated configured function instance of the at least one option, the await function terminating with a determination that the selection step condition of the selection of the valid option is satisfied. The method further comprises executing an agree function instance to create an agreement record associated with the digital asset upon receiving an indication of party consent required for the agreement. The method further comprises sending a result of the executed function instance to an annotation-only ledger.

[0012] The method described above for interpreting a modeled digital asset and deployment of the digital asset may be provided, where at least one of the multiple parties whose respective rights are outstanding is the same as at least one of the multiple parties whose consent is required. The method may further include executing a delete function that requires the consent of the affected parties to disable the agree function or to disable the await function that is not executed, and storing the results of the executed await function, agree function, and delete function in an annotated dedicated ledger. The method may be provided, where the digital asset comprises at least one of cash and / or mark-to-market payments, fungibles, equity, bonds, commodities, futures, rights, or goods. The method may be provided, where the selection of at least one of the await functions is made by a representative of at least one of the multiple parties. The method may be provided, where the selection of at least one of the await functions is made by a respective representative of at least two of the multiple parties. The method may be provided, where the annotated dedicated ledger comprises a blockchain. The method may be provided, where the annotated dedicated ledger may be queried for the status of the digital asset based on pattern matching. A method can be provided where the annotation-only ledger can be queried for the status of the digital assets of all models in the ledger using queries based on the top-level definition. The method can be provided further comprising executing a delete function to render an active model inactive so that it is no longer available for future transactions.

[0013] An exemplary embodiment digital system configured to interpret a modeled digital asset and deployment of the digital asset with respect to associated rights of multiple parties is provided, the system comprising at least one processor configured to execute an await function instance only once using one of at least one option defined in the await function instance for the transfer of the digital asset with respect to rights of at least one of the multiple parties, the await function instance being incorporated with the consent of the affected parties to fulfill a configured function instance associated with the at least one option, the await function instance being configured to execute an agree function instance in the at least one option requiring the consent of at least one of the multiple parties, and at least one storage device configured to store the interpreted results of the executed function instances in an annotated dedicated ledger.

[0014] An exemplary embodiment of a digital system configured to interpret a modeled digital asset and a deployment of the digital asset including associated rights of multiple parties is provided, the system comprising at least one processor configured to execute an await function instance once, the await function instance including at least one option defined in the await function instance for the transfer of the digital asset, the at least one option having an associated configured function and a respective selection step condition, the at least one processor is further configured to execute an associated configured function instance of the at least one option upon receiving an indication of party consent required by the at least one option, and receiving a selection of a valid option from the at least one option, the at least one processor is further configured to execute an agreement function instance of the at least one option upon receiving an indication of party consent required for the agreement to create an agreement record associated with the digital asset. The system further comprises at least one storage device configured to store the interpreted result of the executed function instance in an annotated dedicated ledger.

[0015] A system as described above may be provided, in which at least one of the multiple parties whose respective rights are outstanding is the same as at least one of the multiple parties whose consent is required. A system may be provided with a processor further configured to execute a delete function that requires the consent of the affected parties to disable the agree function or to disable the await function that is not executed, and store the execution results of the await function, the agree function, and the delete function in an annotated dedicated ledger. A system may be provided, in which the digital assets comprise at least one of cash and / or mark-to-market payments, fungibles, equity, bonds, commodities, futures, rights, or goods. A system may be provided, in which the selection of at least one of the await functions is made by a representative of at least one of the multiple parties. A system may be provided, in which the selection of at least one of the await functions is made by a respective representative of at least two of the multiple parties. A system may be provided, in which the annotated dedicated ledger comprises a blockchain. A system may be provided, in which the annotated dedicated ledger may be queried for the status of the digital assets based on pattern matching. A system can be provided in which the annotation-only ledger can be queried for the status of digital assets of all models in the ledger using queries based on the top-level definition. A system can be provided with a processor further configured to execute a delete function to render an active model inactive, such that it is no longer available for future transactions.

[0016] The embodiments disclosed herein can provide mechanisms for adding flexibility to computer-implemented trading of digital assets. The embodiments can provide new data models and functions that enable computer systems executing the transactions to operate in new and advantageous ways.

[0017] Illustrative, non-limiting, exemplary embodiments can be more clearly understood from the following detailed description, especially when taken in conjunction with the accompanying drawings, in which: [Brief description of the drawings]

[0018] [Figure 1] 1 is a flow chart illustrating a language recognizer for the Digital Asset Modeling Language (DAML™), according to an example embodiment of the present disclosure. [Diagram 2] FIG. 1 is a hybrid analogical diagram illustrating state changes in response to actions, according to an exemplary embodiment of the present disclosure. [Diagram 3] FIG. 3 is a hybrid analogy diagram illustrating digitized states for the state changes of FIG. 2 in accordance with an exemplary embodiment of the present disclosure. [Figure 4] FIG. 4 is a hybrid analogy diagram illustrating recording the states of FIG. 3 in a ledger, according to an exemplary embodiment of the present disclosure. [Diagram 5] FIG. 5 is a hybrid analogy diagram illustrating state changes, security, and authorization for the ledger of FIG. 4 in accordance with an exemplary embodiment of the present invention. [Figure 6] FIG. 6 is a hybrid analogy diagram illustrating a copy of the mutable, secure, and permissioned ledger of FIG. 5 , in accordance with an example embodiment of the present disclosure. [Figure 7] FIG. 7 is a hybrid analogy diagram illustrating distributed consensus on the replicated ledger of FIG. 6, in accordance with an example embodiment of the present disclosure. [Figure 8] FIG. 8 is a hybrid analogy illustrating the unnoticed spread of invalid or inconsistent states within the distributed ledger of FIG. 7 in contrast to certain example embodiments of the present disclosure. [Figure 9] FIG. 9 is a hybrid analogy diagram illustrating the perceived prevalence of invalid or inconsistent states within the distributed ledger of FIG. 8 versus certain example embodiments of the present disclosure. [Figure 10]FIG. 10 is a hybrid analogy diagram illustrating validation of entries and prevention of invalid or inconsistent states in the ledgers of FIGS. 8 and 9 in accordance with an exemplary embodiment of the present invention. [Figure 11] FIG. 11 is a hybrid analogy diagram illustrating dynamic enforcement and extension of the validation process for the ledger of FIG. 10 in accordance with an exemplary embodiment of the present invention. [Figure 12] FIG. 2 is a hybrid diagram illustrating DAML™ code using an Await function with a defined action on a single participant, according to an exemplary embodiment of the present invention. [Figure 13] FIG. 1 is a hybrid diagram illustrating DAML™ code with defined actions for a real-world agreement between multiple parties within a conditional statement, according to an example embodiment of the present disclosure. [Figure 14] FIG. 1 is a hybrid diagram illustrating DAML™ code operating on native fungible digital assets, according to an example embodiment of the present disclosure. [Figure 15] FIG. 13 is a hybrid diagram illustrating DAML™ code with alternating actions according to the two party logic and the single party logic of FIG. 12 in accordance with an exemplary embodiment of the present disclosure. [Figure 16] FIG. 2 is a hybrid diagram illustrating DAML™ code combining multiple steps, according to an exemplary embodiment of the present disclosure. [Figure 17] FIG. 2 is a hybrid diagram illustrating DAML™ code for an exchange of assets between two parties, according to an example embodiment of the present disclosure. [Figure 18] FIG. 2 is a hybrid diagram illustrating DAML™ code options, according to an example embodiment of the present disclosure. [Figure 19] FIG. 2 is a hybrid diagram illustrating the composition of DAML™ code, according to an exemplary embodiment of the present disclosure. [Figure 20] FIG. 2 is a hybrid diagram illustrating DAML™ ordered ledger entries according to an exemplary embodiment of the present invention. [Figure 21]FIG. 1 is a hybrid diagram illustrating a DAML-based ledger with ordered ledger entries according to an example embodiment of the present disclosure. [Figure 22] FIG. 1 is a hybrid diagram illustrating a DAML-based ledger with ordered and time-stamped ledger entries according to an example embodiment of the present disclosure. [Figure 23] FIG. 1 is a hybrid diagram illustrating two exemplary DAML™ storage and deployment of ledger logic across multiple parties, according to an exemplary embodiment of the present disclosure. [Figure 24] FIG. 2 is a hybrid diagram illustrating a DAML™ transaction with ledger entries according to an example embodiment of the present invention. [Diagram 25] FIG. 1 is a hybrid diagram illustrating a DAML™ transaction with ledger entries and confidentiality according to an exemplary embodiment of the present invention. [Figure 26] FIG. 1 is a hybrid diagram illustrating a DAML-based ledger including multi-party authorization of transaction commitments for new ledger entries in accordance with an exemplary embodiment of the present invention. [Figure 27] FIG. 1 is a hybrid diagram illustrating a DAML-based two-tier ledger with hash pair entries and details according to an exemplary embodiment of the present invention. [Figure 28] FIG. 1 is a hybrid diagram illustrating a DAML-based hash-centric public ledger layer or public log, according to an exemplary embodiment of the present invention. [Figure 29] FIG. 1 is a hybrid diagram illustrating a DAML-based private and shareable private ledger in accordance with an example embodiment of the present invention. [Diagram 30] FIG. 1 is a hybrid diagram illustrating a two-tier DAML™ ledger with identification of related ledger entries and tracking of ledger entry activity in accordance with an example embodiment of the present disclosure. [Diagram 31] FIG. 1 is a hybrid diagram illustrating a two-tier DAML™ ledger with block-oriented logic, identification of related ledger entries, and block-centric activity tracking, in accordance with an example embodiment of the present disclosure. [Diagram 32] FIG. 1 illustrates a hybrid diagram illustrating the sharing of certificates or provable properties of properties of private ledger entries among parties, according to an example embodiment of the present disclosure. [Diagram 33] FIG. 1 is a hybrid diagram illustrating hosted and non-hosted copies of a distributed ledger, according to an example embodiment of the present disclosure. [Diagram 34] FIG. 1 is a hybrid diagram illustrating DAML™ ledger entry types for Agree, Await, and Delete commands, according to an example embodiment of the present disclosure. [Diagram 35] FIG. 2 is a hybrid diagram illustrating the use of the DAML™ Agree command, according to an example embodiment of the present disclosure. [Diagram 36] FIG. 1 is a hybrid diagram illustrating ledger entries being instantiated according to an example embodiment of the present disclosure. [Figure 37] FIG. 2 is a hybrid diagram illustrating DAML™ code of an agreement for external notification in an equity model, according to an example embodiment of the present disclosure. [Figure 38] FIG. 2 is a hybrid diagram illustrating DAML™ code using Await commands in a cube model, according to an exemplary embodiment of the present disclosure. [Figure 39] FIG. 2 is a hybrid diagram illustrating a DAML™ ledger with a delete command, according to an exemplary embodiment of the present invention. [Diagram 40] FIG. 1 is a hybrid diagram illustrating a ledger algorithm with role-centric flow, according to an example embodiment of the present disclosure. [Diagram 41] FIG. 1 is a hybrid diagram illustrating a ledger algorithm with role-centric flow and comments according to an exemplary embodiment of the present invention. [Diagram 42] FIG. 1 is a hybrid diagram illustrating a participant-centric ledger algorithm flow, according to an exemplary embodiment of the present invention. [Diagram 43]FIG. 1 is a hybrid diagram illustrating a ledger-centric ledger algorithm, according to an example embodiment of the present disclosure. [Diagram 44] FIG. 13 is a hybrid diagram illustrating a function for initiating a ledger transaction according to an example embodiment of the present disclosure. [Diagram 45] 1 is a schematic diagram of a digital system for modeling and / or recording digital assets, according to an example. [Diagram 46] 1 is a flowchart of a computer-implemented method for manipulating data structures to model and / or record digital assets and their evolution. [Figure 47] 1 is a flowchart of another computer-implemented method for manipulating data structures to model and / or record digital assets and their evolution. [Figure 48] 48 is a flow chart of additional steps to the method described in FIGS. 46 and 47. FIG. [Figure 49] FIG. 2 is a schematic diagram representing a contract template. [Figure 50] FIG. 2 is a schematic diagram of an active contract interaction. [Figure 51] This is a diagram representing an await function instance. [Figure 52] FIG. 2 is a schematic diagram of an inactive contract and a new contract. [Diagram 53] FIG. 2 is a diagram of an example of a processing device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] The inventive concept will be more fully described with reference to the accompanying drawings, in which exemplary embodiments are shown. However, the inventive concept may be embodied in many different forms and should not be considered limited to the embodiments described herein. Like reference numbers may refer to like elements throughout this specification. In this specification, the term "model" is defined as at least one bundle of agreements or potential transactions, which may or may not have the potential to represent a digitally represented agreement or legally binding contract under certain applicable rules, such as those that may be provided by a Master Contract.

[0020] As shown in FIG. 1, a language recognizer for the Digital Asset Modeling Language™ (DAML™) is generally indicated by reference number 100. A language recognizer is a routine that executes under the control of a computer processor. DAML™ includes predefined statements that may be stored as a computer-readable data structure. The language recognizer includes a start block 110 that passes control to an input block 112 that receives computer-executable source code, such as from a memory or a communication channel, and passes control to a function block 116. Block 116 performs both lexical and syntactic analysis on the received source code with the help of a unary parser combinator block defined for the DAML™ language, and passes control to an end block 120 upon successful production of an abstract syntax tree 118 of the parsed DAML™ language. The abstract syntax tree 118 is stored as a data structure. A current exemplary embodiment of the DAML™ processing logic is based on a data structure for each DAML™ ledger entry that accepts a DAML™ abstract syntax tree structure, converts it into a new DAML™ abstract syntax tree, and stores the serialized DAML™ abstract syntax tree structure as a data structure. Alternative embodiments of the DAML™ processing logic may use alternative parser techniques for converting DAML™ source code into DAML™ abstract syntax trees, such as, for example, recursive descent. Alternative embodiments of the DAML™ ledger entry may store a data-centric representation of the DAML™ language representation, such as, for example, by compiling the DAML™ abstract syntax tree with further aid of type inference and de-functionalization steps to replace higher order functional structures of the DAML™ language with first order structures.

[0021] In operation, the DAML™ recognizer, under the control of a computer processor, interprets functions and syntax suitable for modeling digital assets. The DAML™ recognizer of an exemplary embodiment implements all of the DAML™ core language features. DAML™ comments are supported using Haskell style as follows: --This is a comment line {- This is a multi-line comment. Comments can be nested. -}

[0022] Primitive types include: Bool, the two boolean values ​​True and False. Text, a sequence of Unicode characters. Integer, a signed integer of any size. Decimal, a decimal floating point number. Party, a unique identifier for a legal entity. Time, a point in absolute time with implementation dependent precision. RelTime, the time delta between points (which inherit the same precision). ContractId, an identifier for an instance of a tangible contract (the digital equivalent to the physical certificate - the paper on which the tangible contract is printed).

[0023] There are composite types for function types, which are constructed using the operator -> as in Haskell, for example "Integer->Text" for a function that accepts a single argument of type Integer and returns a Text value.

[0024] DAML™ additionally supports the following special types: Record is a record of labeled values ​​whose access is verified at runtime. Choice is an option given to a participant. In an example embodiment, each choice is made by the participant. In an alternative embodiment, the model contract may incorporate the input of the participant representative and / or an authorization scheme such as a Public Key Infrastructure (PKI) to allow the participant representative to make such choices. Agreement is an agreement about off-ledger events that must occur. Contract covers the conditions of a model or potential contract. Update is a description of a ledger update that creates and deactivates active models in the ledger. Scenario is a description of the interaction of multiple participants with respect to a contract, which DAML™ embodiments may use for unit testing. Assertion is an assertion that some Boolean condition evaluates to True. PureValue is a value wrapped so that it can be used as a side-effect-free step in both ledger-update or scenario.

[0025] The following words are keywords in the language: await, at, named, if, chooses, then, else, such, that, exercises, agree, agrees, with, on, let, in, create, commit, commits, scenario, and update.

[0026] Expressions over primitive types are constructed from literals, built-in functions, function applications, and lambda abstractions. The two Boolean literals are True and False. Text literals are written using double quotes and use the same escaping rules as Haskell String literals (see section 2.6 of the Haskell Report 2010). An example text literal is "Hello world" for the string "Hello world". Integer literals are written as decimal numbers and may be preceded by - for negative numbers. Examples are 1024 and -1. Decimal literals represent decimal floating point numbers. They are distinguished from integer literals by having a decimal point. Examples are 1234.56789, 0.5, or 1.0. The general form of a decimal literal is given by the regular expression [0-9]+\.[0-9]+. Note that DAML™ ignores trailing zeros in Decimal literals. For example, 1.5 == 1.50 == 1.5000. Party literals are written as a string of alphanumeric characters between single quotes. Examples are "CITI GROUP" and "DA". In an exemplary embodiment, it is assumed that alphanumeric characters are sufficient to form a unique identifier for a legal entity. In an alternative embodiment, a specific standard (e.g., the LEI) may be used to reference the legal entity.

[0027] Time literals are always interpreted as Coordinated Universal Time, written as literals according to ISO-8061, and are constrained to the subset accepted by the following regular expression: [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(:[0-9]{2}(\.[0-9]+)?)?Z. For example, 2007-04-05T14:30Z, 2007-04-05T14:30:00Z, and 2007-04-05T14:30:00.0Z all represent 14:30 UTC on April 5, 2007. Time literals may have any sub-second precision; however, how much of that precision can actually be represented is implementation-dependent. A RelTime literal represents the nominal difference between two absolute points in time. The nominal difference between two points in time is always the same, regardless of whether there has been or has been a leap second. RelTime is expressed as a fraction of a second, e.g., toRelTime(24.0*60.0*60.0) represents the amount of seconds that make up a day (see below for an explanation of toRelTime). RelTime literals can specify any fraction of a second, but it is implementation-dependent how much of that precision can actually be represented. However, all implementations guarantee that RelTime and Time have the same precision. In alternative embodiments, alternative literals such as "1d" may be used to represent relative times between the start and end of a single day to the full precision of the implementation.

[0028] There is no fixed way to write a literal of type ContractId, since the shape of ContractId depends on the execution model. Records are written using curly brackets as in JavaScript. For example, {"x":1, "y":2} is a Record with two fields labeled x and y whose values ​​are 1::Integer and 2::Integer. DAML™ implementations currently do not track which fields are present in a type. Furthermore, only literal strings can be used for labels. DAML™ implementations use {} for empty records.

[0029] DAML™ embodiments support the standard Haskell operators ||, &&, not for Boolean conjunction, intersection, and negation (see Chapter 9 of the Haskell Report 2010). DAML™ embodiments support the standard arithmetic operators +, -, *, / , ^ for addition, subtraction, multiplication, integer division, and integer powers, in the usual precedence order. To use them in prefix notation, as in Haskell, they can be written within parentheses. For example, (+)1 2 is another way of writing 1 + 2. In contrast to Haskell, DAML™ embodiments require that infix operators be surrounded by spaces. This makes 2 - -2 unambiguous and means 2 - (-2). See below for overloaded versions of - and + when used with absolute and relative times.

[0030] DAML™ embodiments define the set of Decimals to be all rational numbers d for integers n and k such that d == n / 10^k. That is, Decimals, when written in decimal form, are a small subset of decimals that includes finite, infinite, repeating, and non-repeating rational and irrational numbers. Decimals (with capital "D") contain only the finite subset of decimals. The following describes how DAML™ supports working with Decimals. DAML™ embodiments overload the arithmetic operators +, -, * to perform Decimal addition, subtraction, and multiplication. None of these operators perform rounding, because the set of Decimals is closed under addition, subtraction, and multiplication.

[0031] DAML™ implementations support rounding of Decimals to a given precision using the function round::Integer -> Decimal -> Decimal, where round prec d rounds Decimal d to the nearest Decimal of the form n / 10^prec, with fractional 0.5 (ties) resolved by rounding the Decimal to an even number n, also known as banker's rounding mode. For example, round 0 2.5 == 2.0 round 0 (-2.5) == -2.0 round 0 3.5 == 4.0 round 0 (-3.5) == -4.0 round 0 3.2 == 3.0 round 0 (-3.2) == -3.0 round 0 3.8 == 4.0 round 0 (-3.8) == -4.0 It is.

[0032] There is no "correct" rounding mode: DAML™ implementations may add further rounding modes as needed.

[0033] Note that the set of Decimals is not closed under division, e.g., dividing two Decimals does not necessarily produce a Decimal. For example, 1.0 / 3.0 == 0.3333... is a rational number, but not a (finite fractional) Decimal. Therefore, DAML™ embodiments provide the function divD :: Integer -> Decimal -> Decimal -> Decimal to compute the result of a rational division of two decimals rounded to a given Integer precision. The rounding mode is the same as the one of rounding. DAML™ embodiments provide access to the remainder of this division with the function remD :: Integer -> Decimal -> Decimal -> Decimal. The relationship between divD and remD is such that 1) for all prec xy, y * divD prec xy + remD prec xy == x, 2) for all prec xy, abs (remD prec xy) < abs y, and 3) for all prec xy, sign (remD prec xy) = sign y* sign x.

[0034] DAML™ embodiments support conversion from Decimal to Integer and from Integer to Decimal with the functions fromInteger::Integer -> Decimal and toInteger::Decimal -> Integer, where toInteger d rounds the result of d. DAML™ embodiments assume that all execution models internally represent RelTime as Decimal with a fixed but implementation-specific precision. Thus, DAML™ embodiments support conversion from Decimal to RelTime and from RelTime to Decimal with the functions fromRelTime::RelTime -> Decimal and toRelTime::Decimal -> RelTime, where fromRelTime gives the number of Decimal seconds corresponding to RelTime and toRelTime d rounds the given number of seconds d to the implementation-specific precision of RelTime. Note that this implies that toRelTime (fromRelTime dt) == dt for all dt.

[0035] DAML™ embodiments support total ordering on all primitive types as follows: Bool: False < True. Text: Implementation defined. Integer: A total ordering on integers. Decimal: A total ordering on decimals. Party: Implementation defined. Time: Absolute times are ordered along a linear time axis. More formally, ∀ t1, t2 ⇔ Time, t1 < t2 = (t1 - t2) < toRelTime 0 1. RelTime: Relative times are ordered according to their Decimal representation. ContractId: Implementation defined.

[0036] DAML™ embodiments support equality for all primitive types such that a == b ⇔ not (a < b ∨ b < a). DAML™ embodiments use the same infix operators as Haskell, e.g., DAML™ embodiments use ==, / =, <=, >=, <, and > to represent equal, not equal, less than or equal to, greater than or equal to, less than, and greater than, respectively (see Chapter 9 of the Haskell Report 2010). Additionally, DAML™ embodiments support the operator (~):: ContractId -> Contract -> Bool, where coid~co means that coid is a contract-id that refers to an active contract in the ledger, and that this active contract is an instance of co.

[0037] DAML™ embodiments support concatenation of Text values ​​using the (<>):: Text -> Text -> Text operator. DAML™ embodiments support an overloaded operation, toText, which converts any value of a primitive type to a text value in an implementation-defined manner. DAML™ embodiments also support a show operation, which converts any value of any type to a text value in an implementation-defined manner. This is used for debugging during development of a scenario.

[0038] An embodiment of DAML™ overloads the + and - operators such that (+) :: Time -> RelTime -> Time represents shifting a point in time by a relative time, and (-) :: Time -> Time -> RelTime represents computing the time difference between the first and second arguments. The relationship between these operators is such that for all t1, t2 :: Time, t1 + (t2 - t1) == t2.

[0039] Access to Records is written using brackets as in JavaScript. For example, the expression r["x"] attempts to access the field labeled "x" in the record r. Record values ​​are constructed using curly brackets and literal strings as in JavaScript. For example, {"x":1, "y":2} is a record with two fields "x" and "y".

[0040] DAML™ embodiments use lambda abstractions as in Haskell, but are always annotated with types, e.g., \(a :: Integer) (b :: Integer) (c :: Text) -> toText (a + b) <> c. Function application is written using juxtaposition as in Haskell; it is left-associative and binds stronger than all infix operators.

[0041] DAML™ embodiments use non-recursive let bindings, like Haskell, but multiple bindings must be separated by semicolons, e.g., let x = 4; y = 5; in x + y. The formal syntax is given in expressions by let var1 = expr1; var2 = expr2; ... varN = exprN. Recursive let bindings are not allowed.

[0042] DAML™ embodiments use Haskell-like lazily evaluated if-then-else branching expressions. The formal syntax is if condition then expression1 else expression2. For example, if owner == 'ACME' then "sell" else "buy".

[0043] DAML™ is based on the assumption that the primary purpose of the model is to describe which agreements are in effect, when, and under what constraints. These agreements form the model's connections in the ledger with their real-world effects. The meaning of the agreements can be determined by human interpretation, as is done in written contracts, and optionally in the context of an applicable legal system.

[0044] An introductory DAML™ embodiment includes agreements, options, and models. Formal syntax and semantics for options, ledger updates, and models are given. Alternative DAML™ embodiments provide further examples to help deepen understanding of the modeling language.

[0045] In one example embodiment, a DAML™ embodiment specifies an agreement using the keyword agree, whose syntax is: party 1, ..., partyN agree textOfAgreement. For example, 'UBS', 'Alice' agree "'UBS' deposits 100 CHF on account 'CH42 1234 5' is intended to represent an agreement between 'UBS' and 'Alice' that 'UBS' shall deposit 100 Swiss Francs (CHF) into account 'CH42 1234 5' at the time this agreement becomes effective.

[0046] DAML™ embodiments use lambda abstractions to transform such agreements into agreement templates. For example, the definition deposit = \(obligor :: Party) (owner :: Party) (amount :: Integer) (account :: Text) -> obligor, owner agree toText obligor <> "deposits" <> toText amount <> "CHF on"' <> account <> "'."; allows the above agreement to be written as deposit 'UBS' 'Alice' 100 "CH42 1234 5".

[0047] It is up to the person writing the model to ensure that the textual description of the agreements is accurate within the context of the legal system in which the model is to be interpreted. From a modeling language perspective, embodiments of DAML™ do not interpret the legal text of agreements, but rather consider each and every agreement between parties as an obligation of those parties.

[0048] DAML™ embodiments model the permissions of participants by giving them choices. For example, the choice 'Alice' chooses account :: Text then deposit 'UBS' 'Alice' 100 account means that 'Alice' can choose the account in which 'UBS' must deposit 100 CHF. A model is a group of choices available to (possibly multiple) participants at the same time. For example, iouSellSettle = \(obligor :: Party) (owner :: Party) (amount :: Integer) -> await {"settle": owner chooses account :: Text then deposit obligor owner amount account, "sell": owner chooses newOwner :: Party then iouSellSettle obligor newOwner amount}; is a template for an I-owe-you model (IOU) in CHF that can be liquidated or sold. The model iou 'Alice' 'UBS' 100 represents a specific IOU modeling where 'UBS' owes 'Alice' 100CHF.

[0049] The iouSellSettle example above gives an intuition for how models are specified. In what follows, DAML™ embodiments give precise definitions for both the syntax and semantics of options and models. These definitions are non-trivial to explain because they are mutually recursive via a third concept, which DAML™ embodiments call ledger updates. Intuitively, these three concepts are related as follows: 1. A model is a mutually exclusive group of options. 2. An option is a permission given to a particular party to perform a particular type of ledger update at a particular time. 3. A ledger update is a description of how to update the ledger by creating new agreements and models, performing options on existing models, deleting existing models, or asserting statements about the state of the ledger at a particular time.

[0050] In the following, DAML™ embodiments are first described by giving syntax for models, choices, and ledger updates. Then, DAML™ embodiments describe how ledger states are represented and how DAML™ embodiments transition between states using ledger updates. DAML™ embodiments specify a model using the following syntax .await, specified as ContractIdBinder named contractNameExpr {"choiceNamel":choice1, ... ,"choiceNameN":choiceN}. Such a representation specifies a model that gives N choices, labeled choiceName1 through choiceNameN, to the party that has control over these choices. The variable contractIdBinder is of type ContractId and can be used in the definition of choices 1 through N, as well as in the contractNameExpr representation, to reference the identity of a concrete model instance. ThecontractIdBinder is useful for associating multiple choices by providing them with a unique contract-id as an argument. The variable contractName is of type Text and is an arbitrary name for the model to facilitate debugging. The named contractName and identified as contractIdBinder parts may be omitted if not required.

[0051] An embodiment of DAML™ specifies choices using the following syntax: controllingPartyExpr chooses valueBinder1 :: Type1, ..., valueBinderL :: TypeL at choiceTimeBinder such that booleanChoiceCondExpr then updateExpr. Such a choice expression specifies that the party represented by controllingPartyExpr is given the choice to select values ​​of the required type at some time in the future, and if these values ​​and the time at which they are selected satisfy the booleanChoiceCondExpr, then a ledger update represented by updateExpr is executed. The choice succeeds if and only if execution of this ledger update is successful.

[0052] Ledger updates reflect transactions, are stored as data structures, and are constructed using one of the following built-in functions or using update blocks: create :: ContractOrAgreement -> Update. delete :: ContractId -> Contract -> Update. exercises :: Party -> Label -> Any -> .... -> Any -> ContractId -> Update. assert :: Bool -> Update. pure :: Any -> Update. Intuitively, a DAML™ embodiment would use create to create a model or agreement, delete to deactivate an active model, exercises to force the parties to exercise choices on the active model, assert to assert statements about the current state of the ledger, and pure to construct ledger updates that only return values ​​and do not modify the ledger.

[0053] Update blocks allow multiple successive ledger updates to be executed as one atomic ledger update. Update blocks are specified using the following syntax: update [updateStatement1 ~> binder1 , ..., updateStatementN ~> binderN, lastUpdateStatement]. DAML™ embodiments use a curved arrow ~> to name the results of the execution of individual update statements. These names can then be used in subsequent update statements to refer to these results.

[0054] As shown in the previous iouSellSettle example, models can be recursive. The way to specify such recursion is through the use of named top-level definitions, as described later in the section "DAML™ Programs." DAML™ embodiments use syntactic sugar to reduce the syntactic overloading of model specifications. DAML™ embodiments allow models and agreements to be used as updates, and DAML™ embodiments allow records of updates to be used as updates.

[0055] When a model c is used as an update, the effect is the same as the effect of create c. DAML™ embodiments add this feature because creating a model is the most common update action. When a record {"11":upd1, ..., "IN":updN} is used as an update, the effect is the same as the effect of update [upd1 ~> v1, ..., updN ~> vN, pure {"l1":v1, ..., "lN":vN}]. DAML™ embodiments add this feature because it is often necessary to return the results of many intermediate update actions.

[0056] DAML™ embodiments describe the semantics of models, options, and ledger updates as a transition system. The state of this transition system is the ledger, which is an associative array from ContractId to valid models and a log of agreements. The transitions are given by interpretations of the ledger updates. Note that DAML™ embodiments specify for each interpretation both how the ledger is modified and what result values ​​are returned by the ledger update. DAML™ embodiments require these results when interpreting update blocks, and later ledger updates can reference the results of earlier ledger updates.

[0057] An embodiment of DAML™ interprets the expression create agreementExpr by evaluating agreementExpr, verifying that it is indeed an agreement of the form party1, ..., partyN agree legalText, and then recording that this agreement is now valid. The result of this ledger update is the agreement itself.

[0058] A DAML™ embodiment interprets the expression create contractExpr by evaluating contractExpr. If this evaluation is successful for the model co, then the DAML™ embodiment stores this model co under a newly assigned contract-id coid. The result of this ledger update is contract-id coid.

[0059] DAML™ embodiments interpret the expression delete contractIdExpr contractExpr by first evaluating both contractIdExpr and contractExpr. If this evaluation succeeds for the literal contract-id coid and model co, DAML™ embodiments then verify that coid identifies an active model that is equal to model co. If so, DAML™ embodiments remove coid from the ledger. Note that DAML™ embodiments require that the model co be specified as part of the delete to allow static analysis of which parties are affected by this delete.

[0060] DAML™ embodiments interpret a ledger update of the form partyExpr exercises "choiceLabel" with choiceValue1, ... choiceValueN on coid as follows: DAML™ embodiments first evaluate partyExpr. If this results in a literal party name actor, DAML™ embodiments look for an active model associated with coid. If coid identifies an active model co, DAML™ embodiments mark it as inactive. DAML™ embodiments then look for the choice identified by "choiceLabel" in co. If actor equals the choice's controller, DAML™ embodiments execute this choice. For example, DAML™ embodiments first instantiate both the choice's condition and its follow-up ledger update with the given choiceValues ​​and the current time. DAML™ embodiments then check the choice's condition and if it succeeds, then interpret the choice's follow-up. The result of the ledger update constructed using exercises is the result of the choice's follow-up. Note that this interpretation is potentially recursive, but is guaranteed to terminate.

[0061] An embodiment of DAML™ interprets the expression assert booleanExpr by evaluating booleanExpr, then checking if the result is True. If it is True, the interpretation succeeds. If it is not, the interpretation fails. The result of assert ledger-update is an empty record{}.

[0062] DAML™ embodiments interpret the expression pure x by evaluating x and returning it as the result of this ledger update. Thus, DAML™ embodiments can use pure to construct side-effect-free ledger updates that return a particular result.

[0063] DAML™ embodiments interpret an update block update [updateStatement1 ~> binder1 , ..., updateStatementN ~> binderN , lastUpdateStatement] by interpreting updateStatements one after the other after substituting the result of the previous updateStatement for the binder. The result of the update block is the result of lastUpdateStatement. An interpretation of an update block fails if any of its statements fails, and all of its effects on the ledger are applied only if the update block succeeds. Update blocks thus make it possible to build atomic, composed ledger updates.

[0064] It is also possible to define model templates that combine other model templates. For example, the definition option = \(controller :: Party)(tlb :: Time)(tub :: Time)(next :: Contract) -> await{"exercise": controller chooses at t such that tlb <= t && t <= tub then next}; gives a combinator called option that allows a party to enter the model during a certain time interval.

[0065] In all the above examples, the choices only lead to the creation of zero to many new models. The following example of an IOU that can be split or merged shows how to use update blocks in the "merge" choice to atomically delete (deactivate) the models that were merged in and create a larger amount of new IOU models. iouChf = \(obligor :: Party)(owner :: Party)(amount :: Integer) -> await{"settle": owner chooses account :: Text then deposit obligor owner amount account , "sell": owner chooses newOwner :: Party then iouChf obligor newOwner amount , "split": owner chooses newAmount :: Integer such that 0 < newAmount && newAmount < amount then {"iou1": iouChf obligor owner newAmount , "iou2": iouChf obligor owner (amount - newAmount)}, "merge": owner chooses otherIou :: ContractId, otherAmount :: Integer then update [delete otherIou (iouChf obligor owner otherAmount), iouChf obligor owner (amount + otherAmount)]};.

[0066] DAML™ embodiments can also use models to coordinate changes to other models by using options that require a particular party to make a decision. For example, the following template can be used to request a payer to transfer ownership of a payment by a certain time: --Template for breach of contract cases that must be negotiated between two parties before a Swiss court contractBreachedBy = \(defendant :: Party)(plaintiff :: Party) -> defendant, plaintiff agree toText defendant <> "has breached the contract, and"<> toText defendant <> "can sue" <> toText defendant <> "in any court of Switzerland according to Swiss law." ; --A template for a model that requires payment within a certain time period via transfer of ownership of an IOU as defined above. mustPayIouUntil = \(payer :: Party) (payee :: Party) (payment :: Contract) (maxPayTime :: Time) -> await {"pay": payer chooses paymentId :: ContractId such that --Ensure that 'paymentId' refers to an active 'payment' model paymentId~payment then payer exercises "sell" with payee on paymentId -- Penalty terms / options become available to the payee after the time given to the payer for payment. ,"breach": Payee chooses at tbreached such that maxPayTime <= tbreached then contractBreachedBy payer payee } ; Then, a combinator that uses iouChf payments can be defined as follows: payInChfUntil = \(payer :: Party) (payee :: Party) (obligor :: Party) (amount :: Integer) (maxPayTime :: Time) -> mustPayIouUntil payer payee (iouChf obligor payer amount) maxPayTime;

[0067] DAML™ embodiments refer to a group of top-level definitions as a DAML™ program. DAML™ embodiments currently use semicolons to separate these definitions due to a local parsing ambiguity where a = bc = d would be parsed as a = bc and the subsequent parsing for =d would fail. Therefore, DAML™ embodiments use a trailing semicolon for each top-level definition, such as a = b; c = d, to alleviate the need for semicolons.

[0068] A scenario is a description of how multiple parties interact through one or more models stored in the ledger. DAML™ embodiments include a special notation for scenarios in the language, as they serve as essential documentation and test cases for model templates. This is an example scenario for the IOU definition in the previous section. days = \(x :: Integer) -> toRelTime (fromInteger (x * 24 * 60 * 60)); createAndSettleIou = scenario [commit (iouSellSettle 'UBS' 'UBS' 100) ~> ubsIou ,'UBS' commits 'UBS' exercises "sell" with 'Alice' on ubsIou ~> aliceIou ,assert (aliceIou ~ iouSellSettle 'UBS' 'Alice' 100) ,pass (days 10) ~> now ,'Alice' commits 'Alice' exercises "settle" with "CH42 1234 5" on aliceIou ~> settled ,assert (settled == ( 'UBS', 'Alice' agree "'UBS' deposits 100 CHF on 'CH42 1234 5'.")) ];

[0069] For update blocks, DAML™ embodiments use curved arrows to constrain the outcome of a scenario action, with the outcome of the scenario being the outcome of its last step. The types of the constrained variables in the above example are ubsIou :: ContractId; aliceIou :: Record; now :: Time; settled :: Record;. Note that the shape of the aliceIou record is {"iou": ContractId}, and one of the records that is being settled is {"settle": agreement}. This is determined from the labeling of the follow-ups in the "sell" and "settle" options in the iou definition above.

[0070] DAML™ embodiments can pattern match on the result records of a scenario step, for example: 'Alice' exercises "settle" with "CH42 1234 5" on aliceIou["iou"] ~> {"settle" : agreement}, which binds the "settle" entry of the result record of this step to the variable name agreement. DAML™ embodiments can pattern match on records to any depth, for example, this is a valid pattern: {"foo" : {"bar" : {"baz" : varName}}}.

[0071] The pattern does not have to be complete; that is, labels present in the result record may be omitted in the pattern. A pattern match against a label that does not exist in the result record will cause an error (e.g., a runtime error if interpreted). Shadowing of variable names is determined by the order of their label keys. In the previous example, the label key of the variable varName is ["foo", "bar", "baz"]. This variable shadows the variable name with a label key of ["foo", "bar"]. In the example {"a" : varName, "b" : varName}, varName binds to the entry accessed by ["b"], because key ["b"] comes after key ["a"].

[0072] The default interpretation of a scenario is as follows: Starting with an empty ledger, the steps of the scenario are executed in order.

[0073] Commit a ledger update. An expression of the form party1, ..., partyN commit updateExpr expresses that the parties party1, ..., partyN jointly agree that they wish to commit a ledger update, denoted by updateExpr. This succeeds if updateExpr can be successfully interpreted as a state transition on the current ledger. DAML™ embodiments require an explicit specification of the parties that agree to commit, since those are the only parties allowed to assume obligations in the interpreted ledger update. Alternative embodiments may define the notion of participants that can assume obligations.

[0074] Controls time. The step pass relTimeExpr ~> newTimeBinder advances the current scenario time by relTimeExpr and binds the new scenario time to newTimeBinder. You can use this function to determine the initial time of a scenario, like this: pass(toRelTime 1.0) ~> now.

[0075] Expresses an expectation. An assert booleanExpr step evaluates a Boolean expression and fails the scenario if the expression is false; otherwise it has no effect. The keyword mustFail can qualify a scenario step to indicate that the step is meant to fail. Such a step fails if no inner step fails, and does not fail if an inner step fails. For example, it makes sense to state that a model cannot be liquidated twice. mustFailExample = scenario ['UBS' commits (iouSellSettle 'UBS' 'Alice' 100) ~> iouId ,'Alice' commits 'Alice' exercises "settle" with "CH12 345 6" on iouId ,mustFail ('Alice' exercises "settle" with "CH12 345 6"on iouId) ] ;

[0076] Debugging. The trace textExpr step evaluates a Text expression and creates a scenario step that does not modify the ledger in any way but contains the text that evaluates to the step description, so this can be used to debug scenarios and look up values ​​using the toText function. Example: trace ("gergely's trace" <> toText (42 + 123))

[0077] You can annotate any expression with a textual expression using descriptive annotations. These are written using the syntax {@DESC textExpr @} someOtherExpression andItsArguments. Descriptive annotations are attached as far to the right as possible, and parentheses must be used if you only want to annotate the function itself. For example, \(f :: Integer -> Integer) (arg :: Integer) -> ({@ DESC "the function's description" @} f) ({@ DESC "the argument's description" @} arg)

[0078] DAML™ embodiments use this approach because it requires fewer parentheses in the common case of annotating an entire model or choice. Note that in the case of multiple annotations for the same expression, the innermost annotation is kept and the others are ignored. Specifically, DAML™ embodiments use descriptive annotations to abbreviate the model using non-binding human-readable text for GUI purposes. For example, DAML™ embodiments can introduce a named iou model as follows: iou = \(obligor :: Party) (owner :: Party) (amount :: Integer) -> {@DESC toText obligor <> " --(" <> toText amount <> ")--> " <> toText owner @} await {"sell": owner chooses newOwner :: Party then {"iou": iou obligor newOwner amount} ,"settle": owner chooses account :: Text then deposit obligor owner amount account } ; traceExample = scenario ['Bank' commits (iou 'Bank' 'Alice' 1 ) ~> alice ,'Bank' commits (iou 'Bank' 'Bob' 2) ~> bob ,trace ("Bob's contract: " <> toText bob) ] ;

[0079] Descriptive annotations on the await keyword are remembered by the interpreter and used when printing the final ledger. For example, a DAML™ embodiment might have this output when completing a scenario: Final ledger: [contract 0c created at 1970-01-01T00:00:00Z 'Bank' --(1)--> 'Alice' ["sell": 'Alice' chooses newOwner5 :: Party then {"iou": iou newOwner5 'Bank' 1} ] ,contract 1c created at 1970-01-01T00:00:00Z 'Bank' --(2)--> 'Bob' ["sell": 'Bob' chooses newOwner6 :: Party then {"iou": iou newOwner6 'Bank' 2} ] ]

[0080] Here, an embodiment of DAML™ can understand a short description of an IOU indicating that the Bank owes Alice $1 and Bob $2.

[0081] Many models require choices by multiple participants, but are indifferent to the order in which these choices are made. Such models can be specified using the language features described so far. However, the size of these specifications grows exponentially with the number of participants that must make choices, because DAML™ embodiments must enumerate all possible selection orders. To avoid such exponential growth, DAML™ embodiments explicitly support parallel choices by multiple participants.

[0082] DAML™ embodiments describe support for parallel selection as follows: DAML™ embodiments first provide an introductory example. DAML™ embodiments then specify a formal syntax for both parallel selection and reasoning on individual parallel selections. Finally, DAML™ embodiments describe the semantics of parallel selection.

[0083] The following example contract models an offer for an option to exchange two available-for-sale contracts between two parties. optionalSwap = \(alice :: Party) (aliceGood :: Contract) (bob :: Party) (bobGood :: Contract) -> await {"swap": {|"alice": alice chooses ca :: ContractId such that ca ~ aliceGood ,"bob": bob chooses cb :: ContractId such that cb ~ bobGood | then {"bob's": alice exercises "sell" with bob on ca ,alice's": bob exercises "sell" with alice on cb } ,"alice cancels" : alice chooses then {} ,"bob cancels" : bob chooses then {} };

[0084] In contrast to the previous example, the follow-up of the await choice is guarded by two parallel choice steps. The first step models Alice's choice to pre-commit her goods, and the second step models Bob's choice to pre-commit his goods. These two steps are only pre-commit because both Alice and Bob can still exercise choices about their own individual goods, as long as the other does not offer them. Since this is only an option for the exchange, DAML™ embodiments give both Alice and Bob the option to cancel the exchange. Both of these choices remain available as long as Alice or Bob have only exercised their own part of the "exchange" choice. Note that the actual exchange of goods occurs atomically once the other makes their pre-commit choice. The formal syntax of the options for a parallel selection step is: {|"choiceStep1": controllingPartyExpr1 chooses valueBinder1_1 :: Type1_1, ..., valueBinder1_L :: Type1_L at choiceStepTimeBinder1 such that booleanChoiceStepCondExpr1 then followUpResultBinder1 <- followUpExpr1 , ... ,"choiceStepN": controllingPartyExprN chooses valueBinderN_1 :: TypeN_1, ..., valueBinderN_M :: TypeN_M at choiceStepTimeBinderN such that booleanChoiceStepCondExprN then followUpResultBinderN <- followUpExprN | such that booleanChoiceCondExpr then followUpExpr

[0085] The scope of the value binder is such that the bounded values ​​for each choice step can be referenced in the Boolean condition for the corresponding choice step, and all bounded values ​​can be referenced in the Boolean conditions of the alternatives and in the follow-ups of all alternatives. Note that a group of choice steps must not be empty, and all steps must be labeled differently. DAML™ embodiments choose to use a different kind of brackets, a variant of {|and|}, to ensure that records and parallel alternatives are clearly distinguishable. This allows DAML™ embodiments to keep the syntax without the burden of later generalizing records.

[0086] DAML™ embodiments extend the formal syntax of decisions to not only be able to reference choice labels but also choice step labels. This makes it possible to specify a party's decision to exercise one of the choice steps. The specific syntax is: partyExpr exercises "choiceLabel" "choiceStepLabel" with choiceStepValue1, ..., choiceStepValueN on contractIdExpr. For example, the following scenario creates an optionalSwap for iou and exercises it: optionalSwapTest = scenario ['UBS' commits (iouSellSettle 'UBS' 'Alice' 100) ~> aliceIou1 ,'CS' commits (iouSellSettle 'CS' 'Bob' 160) ~> bobIou1 ,commit (optionalSwap 'Alice' (iouSellSettle 'UBS' 'Alice' 100) 'Bob' (iouSellSettle 'CS' 'Bob' 160) ) ~> optSwapId1 ,'Bob' commits 'Bob' exercises "swap" "bob" with bobIou1 on optSwapId1 ~> optSwapId2 ,'Alice' commits 'Alice' exercises "swap" "alice" with aliceIou1 on optSwapId2 ~> {"alice's": aliceIou2 ,"bob's": bobIou2 } ,assert (aliceIou2 ~ iouSellSettle 'CS' 'Alice' 160) ,assert (bobIou2 ~ iouSellSettle 'UBS' 'Bob' 100) ];

[0087] The semantics of performing parallel choices are as follows: a choice c guarded by a single choice step behaves like an ordinary choice whose conditions are a combination of the conditions of the choice step and the conditions of c. For a choice guarded by more than one choice step, at "step_i" of a choice c guarded by N choice steps, execute the decision actor exercises "choice Label" "step_i" with v1, ..., vN at time now. {|"step_1": step_1, ,... ,"step_i": ctrl chooses x1 :: type1, ..., xN :: typeN at t such that choiceStepCond ,... ,"step_N": step_N | such that choiceCond then followUps

[0088] This works as follows: first, a DAML™ embodiment checks whether the actor has control of step_i, then the DAML™ embodiment checks that the types of the values ​​v1, ..., vN match the expected types, and finally, the DAML™ embodiment checks whether the choice step condition for step_i is satisfied. If all of these checks are successful, the DAML™ embodiment deletes the current model and creates a new model, which records the decision for choice step step_i.

[0089] More specifically, let us assume that model c is the model pointed to by optSwapId1 in optionalSwapTestscenario above. Then the step 'Bob' exercises "swap" "bob" with bobIou1 on optSwapId1 ~> optSwapId2 executed at time t marks optSwapId1 as inactive and introduces a new contract-id optSwapId2 pointing to c after [exercising "swap" "bob" at t with bobIou1], where after is a special keyword that marks the list of outstanding decisions that have to be applied to the model.

[0090] Alternative DAML™ embodiments allow for the specification of unresolved decisions in the DAML input syntax. These features are fully specified and implemented in the semantics of the standard. However, they are not necessarily supported in all execution models. Therefore, DAML™ embodiments state for each feature in which execution models it is supported.

[0091] For example, HyperLedger with stakeholder ratification does not currently support the DAML™ features Point-Wise Observables or Tabular Contract Query Language. Financial contracts often depend on external public values, such as closing stock prices or dividend payment announcements. DAML™ embodiments call such external public values ​​observable data. There are many models for formalizing observable data. DAML™ embodiments explore some of those models in the daml-design-considerations.md document. Here, in this section, DAML™ embodiments describe support for a simple model where 1. each party can publish a data feed with unique names for immutable, time-stamped data values, and 2. models can depend on pointwise observations of these data feeds.

[0092] DAML™ embodiments do not mandate that these data values ​​be published on the ledger. Instead, DAML™ embodiments assume that there is some means that allows participants to communicate the values ​​of a data feed and to prove that the data feed captured a certain value at a certain time. Conceptually, the state of a data feed corresponds to a partially defined piecewise constant function at any time. As the state of a data feed evolves, the corresponding function becomes more defined, but never changes the values ​​at a time that is already defined. More formally, DAML™ embodiments may represent the state of a data feed for values ​​of type a as a non-empty list of type Feed a = [(Time, a)], where the times are strictly monotonic. Let feed = [(t_0, v_0), (t_1, v_1), (t_n, v_n)] be a non-empty list of type Feed. Then the corresponding partially defined piecewise constant function is the function that maps a time t to 1. If there exists a pair of consecutive values ​​(t_i, v_i) and (t_(i+1), v_(i+1)) at some time such that t_i <= t < t_(i+1), then v_i 2. If t_n == t, then v_n 3. If neither of the above two conditions is met, it is undefined.

[0093] Note that this definition suggests that only the value (t_n, v_n) at the last time in the feed defines the value of the corresponding function for t == t_n. For all t > t_n, the corresponding function is not defined.

[0094] As previously mentioned, embodiments of DAML™ do not negotiate a publication scheme for data feeds to be used in a distributed ledger setting. However, one of the reasons for choosing the above definition is that it allows for a simple publication scheme. That is, a publishing party can publish a new value to a data feed by signing the new value together with a hash-based link to the previous publication. For example, the following definition illustrates publishing a data feed at two successive time points t0 and t1 > t0: hash_0 = hash(t_0, v_0); feed_0 = sign('PublisherPk', ("feedName", hash_0)) hash_1 = hash(hash_0, (t_1, v_1)); feed_1 = sign('PublisherPk', ("feedName", hash_1)) ...

[0095] This example assumes that byte strings corresponding to hashes hash_0 and hash_1 are either embedded in the published message or distributed via a content-addressable file system like IPFS. Clearly there are many ways to improve the efficiency of such publication schemes (e.g., building blocks of point-in-time values, or using authenticated stream-broadcast protocols like TESLA, etc.). DAML™ embodiments expect that most of these efficiency improvements will be consistent with assumptions about the definability and immutability of data feeds. Thus, DAML™ embodiments do not pursue the details of these publication schemes for data feeds further in this document.

[0096] In a standard implementation of the modeling language, an embodiment of DAML™ provides two functions to manage the querying of data feeds and the publication of new point-in-time values ​​to participant-specific data feeds: observeFeedAt :: Text -> Time -> Any publishToFeed :: Party -> Text -> Any -> Scenario Unit

[0097] An embodiment of DAML™ uses the expression observeFeedAt publisher feedName t to query what value a data feed published by a publisher, feedName, has at time t. Evaluation of this expression fails if the value of the feed is not defined at t. This is the case when t is before the first published data point of feed feedName or after the last published data point.

[0098] DAML™ embodiments use the expression publishToFeed publisher feedName expr to denote a scenario step that publishes the value of expr to a publisher feed feedName. The timestamp of this published value is the current scenario time, which implies that data cannot be published into the future.

[0099] The following example shows the interaction between observeFeedAt and publishToFeed. seconds = \(t :: Integer) -> toRelTime (fromInteger t); observeSixSmi = observeFeedAt 'SIX' "SMI"; publishToSixSmi = \(value :: Integer) -> scenario [pass (seconds 0) ~> now ,publishToFeed 'SIX' "SMI" value ,pure now ]; publicationAndObservationTest = scenario [publishToSixSmi 7000 ~> tO ,assert (observeSixSmi tO == 7000) ,mustFail (assert (observeSixSmi(tO - seconds 1) == 7000)) --^Before 't0', the "SMI" field of 'SIX' is not defined, so it fails. ,mustFail (assert (observeSixSmi(tO + seconds 1) == 7000)) --^Fails because the "SMI" field in 'SIX' is not defined after the current scenario time, which is now equal to 't0' ,pass (seconds 1) ~> tl ,mustFail (assert (observeSixSmi (tO + seconds 1) == 7000)) --^Fails because the last published value in the "SIM" feed of 'SIX' is at timestamp 't0' ,publishToSixSmi 8000 ,assert (observeSixSmi tl == 8000) This succeeds because --here, the value of the "SMI" feed of 'SIX' has been fixed at the current scenario time. DAML™ embodiments require this explicit fixing because without it, the observed value at any particular time point can vary non-deterministically. In the current solution, DAML™ embodiments avoid this non-determinism because undefined values ​​cannot be observed in the model selection. ];

[0100] The constraint that every single feed must be explicitly published at every single time is recalled from the perspective of distributed ledgers, where every single extension of a signed hash chain must be explicitly published. However, with the above primitives, this can become a bit cumbersome in test scenarios. Therefore, DAML™ embodiments anticipate that alternative DAML™ embodiments could introduce a function fixAllFeeds::ScenarioUnit that publishes the last values ​​of all feeds as timestamped with the current scenario time, if such a function is needed.

[0101] Model templates can be parameterized over data feeds. Support for data feeds as described above is minimal. Nevertheless, DAML™ embodiments expect it to provide a high expressivity for formalizing model templates with options that depend on these external data feeds. The main idea for formalizing such model templates is to express time-dependent rates as functions of type Time -> Decimal and time-dependent conditions as functions of type Time -> Bool. Callers of such templates can then use the given time values ​​to look up the data feeds.

[0102] Note that this decision means that functions in the language are not completely pure: functions depend on the state of the ledger (due to the ~ function) and on the state of the data feed (due to the observeFeedAt function). This is acceptable because DAML™ embodiments have strict validation semantics, which ensures that it is always clear when a DAML™ embodiment evaluates an expression. Evaluation semantics for alternative DAML™ embodiments might eagerly evaluate applications and arguments, and stop when a non-saturating application, await, or alternative is encountered.

[0103] The Tabular Contract Query Language supports querying a contract-based ledger. The queries are based on syntactic pattern matching of data structures, and DAML™ embodiments consider this querying to be central to reading from a contract-based ledger. The language features described in this section serve as the basis for how pattern matching behaves in context. This understanding can be used in developing GUIs and contract-specific automation for option execution.

[0104] An execution environment embodied on a computer system stores models defined in DAML™ in a ledger. An embodiment of DAML™ would like to provide means to query such a database for active contracts in the ledger and their parameters. For example, an embodiment of DAML™ might query the ledger for how many active "IOU" contracts it currently contains. Or, it might query how many "IOU" contracts there are with an obligor named 'UBS'. A GUI might like to present the results of a query for all active "IOUs" in the ledger in a tabular format, such as: ContractId CreatedAt Amount Obligor Owner 0xffeeafa 2007-04-05T14:30Z 23 UBS Bob 0xa123001 2016-03-02T12:00Z 1000 CS Alice

[0105] Such a table cannot be provided by the ledger's underlying database implementation because contracts are not stored using a fixed data scheme, but rather as a data structure representing an Abstract Syntax Tree (AST). DAML™ embodiments provide the ability to query the ledger for active models with given parameters by syntactic pattern matching of the AST representation of the active models in the ledger. This concept is perhaps best understood by looking at an example. testQuery = scenario ['Bank1' commits (iouSellSettle 'Bank1' 'Alice' 100) ~> iou1 ,'Bank1' commits (IouSellSettle 'Bank1 "Bob' 20) ~> iou2 ,'Bank2' commits (iouSellSettle 'Bank2' 'Bob' 40) ~> iou3 ,traceMatchingContracts (iouSellSettle ?obligor ?owner ?amount) --This will output the following trace: <ioun>refers to the value of the variable 'iouN' -- Found 3 matching contracts: -- 1. contract <iou1>with -- {"obligor":'Bank1' -- ,"owner":Alice -- ,"amount":100 --} -- 2. contract <iou2>with -- {"obligor":'Bank1' -- ,"owner":Bob -- ,"amount":20 --} -- 3. contract <iou3>with -- {"obligor":'Bank2' -- ,"owner":Bob -- ,"amount":40 --} --DAML™ implementations can also filter by equality by fixing some values. ,traceMatchingContracts (iouSellSettle ?obligor 'Alice' ?amount) -- This will output the following trace: -- Found 1 matching contracts: -- 1. contract <iou1>with -- {"obligor":'Bank1' -- ,"owner":Alice -- ,"amount":100 --} ];

[0106] An embodiment of DAML™ provides the function traceMatchingContracts with the syntax traceMatchingContracts contractPatternExpr to query the interpreter ledger for a scenario. contractPatternExpr is an expression that stores pattern variables. Pattern variables are distinguished from ordinary variables by a leading '?' character. A simple example of a pattern is ?a + 2. This pattern syntactically matches 3 + 2 for ?a = 3, but this pattern does not match 3 + 9. The following table provides further examples. Pattern Expression Match (?a + ?b) (1 + 2) {"a": 1,"b": 2} (?a + ?a) (1 + 2) {} (?a + days ?b) (1 + days 2) {"a": 1,"b": 2} (\a -> a + ?b) (\x -> x + 2) {"b": 2} (\a -> a + ?a) (\x -> x + 2) {"a": 2}

[0107] A DAML™ embodiment can create a pattern by calling a function with pattern variable arguments, for example iouSellSettle ?obligor ?owner ?amount is a pattern that matches a model created using the iouSellSettle model template.

[0108] As the above example shows, traceMatchingContracts accepts an expression of type Contract with a pattern variable. The resulting contract pattern is then matched against all active models and the results are reported as part of the interpretation. DAML™ embodiments do not yet expose the results in the Scenario results because they cannot yet express lists of results.

[0109] The two pattern variables ?ContractId, ?ChoiceTime are reserved pattern variable names and cannot be used in model patterns. They match the contractIdBinder of the model and the choiceTimeBinder in the choice, respectively. If a model is parameterized by either of these two variables, their values ​​will be reported by the interpreter in the same way as ordinary pattern variables.

[0110] Can we pattern match all the models in a ledger? Given a concrete ledger, one might ask whether it is possible to retrieve all of the active models of that ledger using a pattern matching query. This is certainly possible, since it is always possible to query each model itself using the model's AST, without involving any variables as a query. Thus, the question can be reformulated as follows: Given a concrete DAML™ file that defines templates for all models that a company is interested in trading, can we pattern match all models that affect this company using a query based on the top-level definition from this DAML™ file? This is not generally the case, since there can be nested await statements that result in active models that do not have a corresponding top-level definition. However, if an embodiment of DAML™ requires that all awaits occur only in top-level definitions constructed as follows, then all of the resulting models can be matched. contractTemplateDef = \(paraml :: tyl) ... (paramN :: tyN) -> let abbrevl = bodyl; ... abbrevM = bodyM; in await { .... }

[0111] This constraint does not limit expressivity; therefore, alternative DAML™ embodiments may explore automatically converting nested awaits to this form. If a DAML™ embodiment had this conversion, it could always use pattern matching to switch between a per-contract template table representation of the model and a native AST-based representation.

[0112] Suggested Language Extensions for Alternative Embodiments The following sections contain fully specified extensions that are not currently implemented in the exemplary execution model.

[0113] An example of a must-choose obligation is parsed and executed. Many models require participants to make a choice within a certain time limit. DAML™ embodiments can express such obligations using the modeling language described so far, by using penalty terms such as those shown in the "mustPayIouWithin" example above. However, adding all these penalty terms can get rather cumbersome, which is why DAML™ embodiments explicitly support must-choose obligations, both syntactically and semantically.

[0114] DAML™ embodiments explain support for optional mandatory obligations in three steps. First, DAML™ embodiments provide an introductory example. Then, DAML™ embodiments specify the formal syntax of optional mandatory obligations. Finally, DAML™ embodiments present their semantics. The following contract model models an obligation to exercise a "sell" option on another model up to some maximum time. mustPayUntil = \(seller :: Party) (buyer :: Party) (good :: Contract) (maxSellTime :: Time) -> await {"pay": seller must choose cid :: ContractId until maxSellTime such that cid ~ good then {"payment": seller exercises "sell" with buyer on cid } --DAML(TM) embodiments allow the purchaser to forfeit its right to receive payment, as shown in a later example, where a broken "mandatory" obligation leads to the freezing of the entire contract. ,"forfeit": buyer chooses then {} } ;

[0115] These language elements are optional mandatory obligations and time deadlines for the fulfillment of these obligations. The following scenario illustrates the use of the mustPayUntil contract template. testSuccessfulSale = let iouFor =\(owner :: Party) -> iouSellSettle 'Bank' owner 100; aliceMustPayBobUntil = mustPayUntil 'Alice' 'Bob' (iouFor 'Alice'); in scenario [-- Create an IOU and payment obligation to 'Alice' pass (days 0) ~> tO ,'Bank' commits create (iouFor 'Alice') ~> aliceIou ,'Alice' commits create (aliceMustPayBobUntil (tO + days 2)) ~> mustPay --Alice has no obligation because she can choose to contract. However, the only kind of contract she can choose is one in which she becomes obligated. This effectively makes her obligated. --Indicate successful fulfillment of payment obligation after 1 day ,pass (days 1) ,'Alice' commits 'Alice' exercises "pay" with aliceIou on mustPay ~> {"payment": bobIou} ,assert (bobIou ~ iouFor 'Bob') ] ;

[0116] The formal syntax for a choice step that supports both optional choices and mandatory obligations is as follows: controllingPartyExpr1 [chooses | must choose] valueBinder1_1 :: Type1_1, ..., valueBinder1_L :: Type1_L at choiceStepTimeBinder1 after tO until t1 such that booleanChoiceStepCondExpr1 Here t0 and t1 are expressions of type Time without any reference to limit values ​​of the choices, and [chooses | must choose] means that one of the two keywords on either side of the | must be used. For optional choices, both constraints after 0 and until t1 are optional. For mandatory obligations, only the after 0 constraint is optional.

[0117] An embodiment of DAML™ describes the semantics of an extended choice step in two parts: the after 0 and until t1 time constraints are evaluated. The embodiment then defines when the "choice-must" obligation is violated and what the consequences of such a violation are.

[0118] Any option or mandatory choice with the constraint after tMin can only be chosen at time t >= tMin. Any option or mandatory choice ch with the constraint until tMax can only be chosen at t < tMax. An embodiment of DAML (trademark) refers to tMax as the horizon of ch. An embodiment of DAML (trademark) has decided to interpret after tMin until tMax as a time interval of the form {t | tmin <= t < tMax}, such that the intervals associated with two constraints of the form after 0 until t1 and after t1 until t2 are guaranteed to be separated. Thereby, an embodiment of DAML (trademark) simplifies the avoidance of corner cases where two options are simultaneously available. An embodiment of DAML (trademark) has decided to close the interval for a minimum amount of time to ensure that an option ch constrained by after 0 has the same behavior as an option ch without the after 0 constraint.

[0119] A mandatory choice ch is violated at time t only if the time t is above the horizon of ch. A model instance containing a mandatory choice is violated at time t only if one of its mandatory choices is violated at time t. An embodiment of DAML (trademark) freezes a violated model by invalidating all options for all stakeholders.

[0120] The motivation for completely freezing a broken model is as follows: DAML™ embodiments designed the optional-mandatory obligation to be used in models where there is no default behavior for resolving the violation. If there is a default behavior, DAML™ embodiments can and will encode the default behavior by giving the other party an optional option to handle the violation. DAML™ embodiments expect that a violation of the optional-mandatory obligation in model c will be resolved by proposing a resolution model that seeks approval from all stakeholders of model c and then deletes model c while creating other models to compensate for the damage caused by the violation. The following example illustrates a violation of such an optional-mandatory obligation and its resolution. testMustChooseObligationBreachResolution = let iouFor = \(owner :: Party) -> iouSellSettle 'Bank' owner 100; aliceMustPayBobUntil = mustPayUntil 'Alice' 'Bob' (iouFor 'Alice'); in scenario [--Create an IOU and payment obligation to 'Alice' pass (days 0) ~> tO ,'Bank' commits create (iouFor 'Alice') ~> aliceIouId ,'Alice' commits create (aliceMustPayBobUntil (tO + days 2)) ~> mustPayId --Specify that the contract will be frozen as soon as one of the "optional" obligations is violated. ,pass (days 2) --'Alice' paid too late. ,mustFail ('Alice' exercises "pay" with aliceIouId on mustPayId) -- Contracts in which the "mandatory choice" obligation is violated will be frozen. ,mustFail ('Bob' exercises "forfeit" on mustPayId) --Specify the solution to a broken contract -- --Let's assume that 'Alice' and 'Bob' agree off-ledger that 'Alice' can resolve the broken mustPayId contract by paying 100% of the original payment plus a penalty --within two days of 'Bob' accepting the compensation offer. ,'Alice' commits create ( await {"accept": 'Bob' chooses at t then {"deleted": delete mustPayId (aliceMustPayBobUntil (tO + days 2)) ,"payment1": aliceMustPayBobUntil (t + days 2) ,"payment2": aliceMustPayBobUntil (t + days 2) } ,"bob rejects": 'Bob' chooses then {} } ) ~> proposedResolution ,'Bob' commits 'Bob' exercises "accept" on proposedResolution ~> { "payment1": payment1, "payment2": payment2} --Alice makes the first payment immediately. ,'Alice' commits 'Alice' exercises "pay" with aliceIouId on payment1 ] ;

[0121] Alternative DAML™ embodiments include modeling language extensions that DAML™ embodiments may wish to add in alternative execution environments. They may include descriptive literals for relative times, such as '1d' to represent one day in relative time, as well as for other common units of measuring relative time. Mustache templates for legal agreements: Explicit syntax for writing legal documents is quite verbose. A lightweight alternative, in the form of Mustache templates, is proposed. For example, a DAML™ embodiment may use an agreement as follows: Seller, buyer agree "{{seller} has mown the lawn of {{buyer}} between {{tbought}} and {{tbought + 1d}}, and if this was not the case, then {{buyer}} can sue {{seller}} according to the Swiss OR."

[0122] Public Choices describes several partyMakingChoiceBinders in the choiceTimeBinder prefix for Choices. DAML™ embodiments allow the definition of newtypes using a lightweight syntax that defines explicit transformation functions, and introduces lifted versions of all functions in the representation. These newtypes are intended to reduce the number of opportunities for confusion in the positional calling conventions. newtype Amount = Integer fromAmount :: Amount -> Integer toAmount :: Integer -> Amount newtype Account = Text fromAccount :: Account -> Text toAccount :: Text -> Account

[0123] Type + Operator Extensions includes a group of extensions that DAML™ embodiments hope to find useful, all of which can be written as a set of additional types and functions using those types. DAML™ embodiments currently hope to: Banking Calendar Support, since banking models may depend heavily on trading location specific calendar conventions. DAML™ embodiments may wish to provide custom implementers with well-defined semantics to capture these conventions. Times are usually in the local trading time zone. Many options / futures expire at 08:30, etc., on the 3rd Friday of the month. Special handling is needed during holidays, where the date moves before the holiday. Thus, it may be useful to use an observable like businessDayOrBefore(t,"Europe / Zurich")

[0124] Simple Observables are useful because many models need access to market data and other observables of physical reality, where there is an objective definition of how they are measured. When models are run between participants who share a common definition of observables, operators of the form obs::Text -> Time -> Integer are useful and suffice to look up the value of an observable at a particular time. Note that for times in the future, this lookup will fail. If participants in a model wish to entrust the release of observables to a third party, embodiments of DAML™ can use cryptographic receipts, as described in the next section.

[0125] Cryptographic Receipts can be used to support binding the evolution of models with off-ledger cryptographic statements, for example for certified market data. Simple Key-based Receipts use signatures directly in the option terms. Policy-based Receipts are based on Proof-Carrying Authorization and allow elaborate policies to be used to validate receipts provided in the option terms.

[0126] Turning to FIG. 2, a rotatable 2x2x2 multi-sided puzzle cube is generally indicated by reference number 200. For ease of explanation, this cube is given as an example with some similarity to the smart model to represent the possible states of the model. The states of the cube are defined as the ordered colors of the four blocks appearing on each of the three visible faces. In the initial state, all four sections of each face of each of the six faces of the cube are one of six colors, such as red (R), white (W), blue (B), yellow (Y), green (G), and black (B). The first transaction transitions the cube through a 90 degree clockwise rotation up. The second transaction transitions the cube through a 90 degree clockwise rotation right.

[0127] Turning now to Figure 3, an example representation of the states to be recorded for the cube of Figure 2 is indicated generally by the reference numeral 300. The initial state is {B,B,B,B,R,R,R,R,Y,Y,Y,Y,...}, the state after a 90 degree clockwise rotation up is {R,R,B,B,G,G,R,R,Y,Y,Y,Y,...} and the state after a 90 degree clockwise rotation to the right is {R,W,B,W,R,G,R,G,Y,B,Y,R,...}.

[0128] As shown in Figure 4, the states of the cube to be recorded in the annotation ledger in chronological order are generally indicated by reference numeral 400, where the initial state {B,B,B,B,R,R,R,R,Y,Y,Y,Y,...} is annotated first, the second state {R,R,B,B,G,G,R,R,Y,Y,Y,Y,...} is annotated next, and the third state {R,W,B,W,R,G,R,G,Y,B,Y,R,...} is annotated last.

[0129] Turning to FIG. 5, change semantics, security and authentication, measures for an annotation-only ledger are indicated generally by the reference numeral 500. Such measures may include marking previously recorded states of the smart model as being replaced, creating cryptographic hashes and / or signatures associated with each new state of the smart model, and using Merkle trees or blockchains to ensure that each entry committed to the ledger is constructed from provable provenance of references to previous ledger entries, follows verifiable commitments to previously defined validation rules, allows for later sharing of hidden provable properties, and is tamper-proof.

[0130] Turning now to Figure 6, a replicated copy of the ledger is indicated generally by the reference numeral 600. The replicated copies may be used to make the ledger robust to localized failures.

[0131] As shown in Figure 7, a ledger with distributed approval and consensus among replicated copies of ledger 600 is generally indicated by reference numeral 700. Consensus facilitates the maintenance of a single version of the distributed ledger.

[0132] Turning to Figure 8, ledger 700 with its latest approved entries is generally indicated by reference numeral 800. As shown, ledger 800 contains an apparent unnoticed error to the front of the cube. This is not an acceptable state, but it will not be removed without additional algorithms that validate the semantic correctness of the ledger entries. The circumstances in which such an error or inconsistent state is included in the ledger are not present in the current exemplary embodiment of the DAML™ ledger storage.

[0133] Turning now to Figure 9, an erroneous ledger is generally indicated by reference numeral 900. Here, the same erroneous state, apparently noticed and committed, has become the distributed consensus on all nodes. This is not an acceptable state, but it is not eliminated without additional algorithms that verify the semantic correctness of the ledger entries. The situation in which such an erroneous or inconsistent state is included in the ledger is not in the current exemplary embodiment of the DAML™ ledger storage.

[0134] As shown in FIG. 10, a ledger with validation of semantic correctness of ledger entries to avoid entry of inaccurate ledger entries is generally indicated by reference numeral 1000. Here, validation against higher order rules or a master model produces an invalid conclusion, and one or more parties block the ledger entry from entering the ledger due to this validation failure. In the case of a correct validation, the ledger entry may be committed with "validation logic" included within the ledger log. In the current exemplary embodiment of DAML™ storage and ledger logic, one or more parties reject proposed ledger entry transactions that are erroneous or semantically incorrect. In the current exemplary embodiment of DAML™ storage and ledger logic, the parties maintain the underlying logic of the hash tree in the form of a blockchain that allows the complete history of validation of each ledger transaction to be reviewed and reconfirmed for audit purposes.

[0135] Turning to FIG. 11, a ledger in which validation algorithms are defined to enhance and extend the capabilities of ledger entry validation is generally indicated by reference numeral 1100. Here, the validation algorithms applied to each instance of the distributed ledger may depend on algorithms defined in previous ledger entries, and the resulting actions and validations are applied. This makes validation more powerful and extensible. A current exemplary embodiment of DAML™ storage uses DAML™ formal properties to validate later executions of DAML™ functions, and uses previously stored DAML™ digital asset-based ledger entries as a basis for validating DAML™ execution logic and validating inclusion of new DAML-based ledger entries.

[0136] Turning now to Figure 12, an instance of DAML™ code is indicated generally by reference numeral 1200. This DAML™ code defines a variable of type color (which defines the type on which an exemplary participant is defined) for each of the four sections of each of the six faces (24 in total), which indicates one of six colors for each section. This code also includes a DAML™ "await" function, which waits for a participant's choice, for example, to rotate either the top or the right side. Here, each choice produces a new "cube" consuming the old one, and the definition of cube2 includes its validation rules.

[0137] As shown in Figure 13, an instance of DAML™ code is generally indicated by reference numeral 1300. This code includes a DAML™ "await" function that waits for party1's "chooses" such that if each side is a single color, then the parties "agree" that the "Cube is solved." Here, DAML™ allows the parties to agree on statements and their interpretations outside of the ledger.

[0138] Turning to FIG. 14, an instance of DAML™ code is indicated generally by reference numeral 1400. This code includes a DAML™ “await” function that waits for party1’s “chooses” such that, if each side is a single color, the parties “agree” that the “Cube is solved” and that a prize is transferred from party2 to party1 (“transferAsset”). Thus, DAML™ enables parties to manipulate native fungible digital assets (e.g., assets in HyperLedger).

[0139] Turning now to Figure 15, an instance of DAML™ that allows for alternating moves by two participants is indicated generally by reference numeral 1500. This DAML™ two participant alternating move differs from that of Figure 12, where only one participant can choose one of the two shown moves.

[0140] As shown in Figure 16, an instance of DAML™ code combining multiple steps is indicated generally by reference numeral 1600. This is an example of multiple moves with "such that" conditions that must be met for validation to be accepted and updates to be allowed to occur.

[0141] 17, exemplary DAML™ code for an exchange of assets between two parties is indicated generally by reference numeral 1700. This can be extended via recursion to the exchange of cubes between multiple parties.

[0142] Thus, a DAML™ ledger entry can be an agreement, an “await” (active model) that waits for a party to make one or more choices, and / or an operation on a native fungible asset. A DAML™ agreement binds a party to “real-world” data or “real-world” activities and / or promises. DAML™ active models and operations on digital assets are both data and algorithms in that they “contain” data-centric agreements and enable the execution of active models and the manipulation of assets that are algorithmic. Validation rules for the execution of active models are defined “within” each active model, where those validation rules are in a language that is like blockchain script but more sophisticated in nature, and new active models can create new validation rules.

[0143] 18, an exemplary DAML™ code entry type is indicated generally by reference numeral 1800. When an active model is executed, it becomes an inactive model, i.e., only one option can be selected in a choice selection, and once selected, that choice selection is no longer available.

[0144] As shown in FIG. 19, an example DAML™ code selection is generally indicated by reference numeral 1900. Composition allows each model step to be as sophisticated as desired. Here, in addition to the multiple move waits for "Top 180" in FIG. 16, another wait for "Swap cubes" is presented. The update section swaps two cubes by making the swapped cube active and deleting the previous cube by making it inactive.

[0145] Turning to FIG. 20, an exemplary DAML-based ledger with ordered ledger entries is indicated generally by reference numeral 2000. A ledger is an ordered set of ledger entries, shown here as X, Y, Z. The current exemplary embodiment of the storage of a DAML™ ledger is an append-only sequential ordering in which a strict "one-dimensional" order is maintained. Alternative embodiments of the storage of DAML™ may be used to achieve better scaling by using a less strict but still logically correct reordering of ledger entries (e.g., through the use of a directed acyclic graph).

[0146] Turning now to Figure 21, another exemplary DAML-based ledger with ordered ledger entries is indicated generally by reference numeral 2100. While the strict one-dimensional ordering of Figure 20 is continuous, the global ordering versus the local ordering allows for other continuous ordering possibilities. Here, topological sorting or directed acyclic graph (DAG) techniques can be utilized to scale to larger scenarios and more complex possibilities.

[0147] Turning to Figure 22, an exemplary DAML-based ledger with ordered and timestamped ledger entries is indicated generally by reference numeral 2200. The ledger stores an ordered and timestamped set of ledger entries, shown here as X, Y, and Z. A current exemplary embodiment of the storage for a DAML™ ledger is an append-only ledger where time information is maintained along with each monotonically increasing time-stamped ledger entry.

[0148] Turning to FIG. 23, two exemplary DAML™ storage and ledger logic deployments across multiple parties are generally indicated by reference numeral 2300, where one (right) has centralized logic as in FIG. 22, while the other (left) has distributed logic. The centralized embodiment of DAML™ storage and ledger logic is centered around key trading parties (e.g., exchanges), which can still maintain their own specific versions of DAML™ storage and ledger logic. The distributed embodiment of DAML™ storage and ledger logic deployment is decentralized to support trading processes that are not centered around key trading parties. This and similar embodiments of DAML™ storage can be used to achieve greater scaling by using broadly monotonically increasing timestamps (e.g., unrelated ledger entries have no temporal dependency).

[0149] Turning now to FIG. 24, an exemplary DAML™ transaction with ledger entries and confidentiality stored as a data structure is generally indicated by reference numeral 2400. Both centralized (left) and decentralized (right) ledger embodiments are shown. Here, parties C and D cannot see certain ledger entries, but parties A and B can. The ledger visible to a party may be substantially hidden, such as to support confidentiality, using known cryptographic techniques, such that a ledger transaction shows ledger entries visible only to authorized parties. Here, a ledger transaction may include multiple ledger entries that are added as a "group," and the transaction logic ensures an "all or nothing" execution logic for the group. Since a transaction may include ledger entries that are private to a subset of the participants of the transaction, confidentiality and partial visibility are provided since not all parties involved in the transaction need or are allowed to see all ledger entries for that transaction. Authorization of transactions and entry insertion / appendage is supported, where multiple parties must authorize the transaction to be entered or committed.

[0150] Turning now to FIG. 25, an exemplary DAML™ transaction with ledger entries and confidentiality is generally shown by reference numeral 2500. Here, party B cannot see certain ledger entries, but party A can. The ledger visible to a party may be substantially hidden such that the ledger transaction shows ledger entries visible only to authorized parties, such as to support confidentiality. Here, ledger transactions may include multiple ledger entries that are added as a "group," and the transaction logic ensures an "all-or-nothing" execution logic for groups. Since transactions may include ledger entries that are private to a subset of the participants of the transaction, confidentiality and partial visibility are provided since not all parties involved in the transaction need or are allowed to see all ledger entries for that transaction. Authorization of transactions and entry insertion / appendage is supported, where multiple parties must authorize the transaction to be entered or committed.

[0151] As shown in FIG. 26, an exemplary DAML-based ledger including authorization by multiple parties of a new ledger entry transaction commitment is generally indicated by reference numeral 2600. Here, authorization comes from validating affected parties. Authorization from one or more validating parties can ensure that all new ledger entries committed to the ledger meet the appropriate previously agreed-upon ledger logic. Authorization from affected parties can be a commitment to agree to future transaction variants and scenarios defined within the ledger entry. That is, one or more parties agree to the immediate and possibly future ledger execution impact of a proposed DAML-based ledger transaction. Similarly, one or more parties agree to the immediate and possibly future impact of a proposed DAML-based ledger transaction on relationships between the parties. In the current exemplary embodiment of the DAML™ ledger, one or more parties agree to the execution logic of the DAML™ ledger and one or more parties agree to changes to legal rights and obligations between two or more parties pursuant to the interpretation of the proposed DAML™ ledger transaction within the context of a previously agreed-upon external legal agreement. Alternative embodiments of the DAML™ ledger may have authorization attested by a legal authority to allow DAML™ ledger transactions to define legally binding relationships between two or more parties without the need to function within a prior external agreement framework. Alternative embodiments of the DAML™ ledger may have authorization attested by multiple legal authorities to allow DAML™ ledger transactions to define legally binding relationships between two or more parties across two or more legal jurisdictions. In a current exemplary embodiment of the DAML™ ledger, one or more parties verify the correctness of the execution logic of the DAML™ ledger.

[0152] As shown in FIG. 27, an exemplary DAML-based two-tier ledger with entries and details versus hashes is generally indicated by reference numeral 2700. Here, all parties have anonymized transactions and hash values, but party B does not have some details that party A has. A hash key is tied to the ledger entry. A hash is associated with each ledger entry, but the hash does not reveal the details of the ledger entry. The hash helps provide proof of the ledger entries without revealing their details. The two-tier ledger includes a ledger or log of hashed data and a ledger of ledger entries. Both ledger layers include a transaction structure and / or an optional block structure.

[0153] As shown in FIG. 28, an exemplary DAML-based hash-centric public ledger layer or public log is generally indicated by reference numeral 2800. Here, the public ledger provides provable authorized references. This public ledger is a ledger of "hashes" that hides ledger entry data. The hash of each ledger entry is an anonymized reference to that ledger entry. This provides the status of transaction commitments, where parties authorize transactions based on their own private ledger, but the transaction commitments are in the public ledger. Private ledger commits depend on public ledger commits. This particular embodiment implements only hashes, but has no finite lifecycle or dependencies between entries. That is, the public ledger is a log where entries are hash values ​​associated with detailed ledger entries stored in the private ledger, and the public ledger is an anonymized reference to the detailed private entries. Ledger transaction commitments are authorized by one or more parties in the public ledger, and the status of this public ledger commitment determines the status of the private ledger transaction commitments. The current exemplary embodiment of the DAML™ ledger can be viewed as a log, as it does not include the lifecycle of its entries (hash values) nor the dependencies between entries. Alternative embodiments of the DAML™ ledger may include additional logic, such as homomorphic encryption of some ledger details, and may implement further ledger logic.

[0154] As shown in FIG. 29, an exemplary DAML-based private and shareable private ledger layer is generally indicated by reference numeral 2900. Here, the private ledger includes a permissioned private and shareable private ledger. Ledger entry data can be shared on a "need-to-know" basis. Privacy is maintained because parties do not receive, see, or remember ledger entries in which they are not "participants." The private and public ledgers are linked through hashes of ledger entries. Permissions and transaction commitments are applied to both ledgers, including "Merckle tree-based proofs" on securely distributed and encrypted Merkle trees that are constructed and shared by the parties (e.g., validating parties). Here, need-to-know can be used by parties that can partially view the private ledger.

[0155] The private ledger provides other parties with certification or "proof of correctness" of properties that can be associated with the public ledger on a need-to-know basis based on the requesting party's relationship to the requested private ledger property. A current exemplary embodiment of a certification and attestation scheme for public ledger entries through private data properties is based on a Merkle signature scheme. Alternative embodiments of the certification and attestation scheme are possible, for example based on PKI and proof carrying schemes.

[0156] As shown in FIG. 30, an exemplary two-tier DAML™ ledger with associated ledger entry identification and ledger entry liveliness tracking is generally designated by reference numeral 3000. The current exemplary embodiment of these two ledger entry properties builds on top of a hash structure present in the private ledger layer, where a hash tree / graph is used to capture acyclic dependencies between entries in the DAML™ (and possibly non-DAML) based private ledger, associating unique associated cryptographic hash values ​​with ledger entries, while incrementally updating a Merkle tree structure is used to track the liveliness (active vs. inactive state) of each ledger entry. Alternative embodiments of ledger entry identification and ledger entry liveliness tracking can target scalability by addressing the non-uniform nature of ledger entry data via capturing properties of the physical partitioning model in the hash value assignment logic and in the liveliness tracking structure.

[0157] As shown in Figure 31, an exemplary two-tier DAML™ ledger with block-oriented logic and associated ledger entry identification and block-centric activity tracking is generally indicated by reference numeral 3100. A current exemplary embodiment for tracking ledger entry activity is to regroup ledger transactions as blocks of transactions and incrementally update the private ledger's Merkle tree with each new block of transactions. Alternative embodiments of block-oriented ledger entry activity tracking can target scalability by addressing the non-uniform nature of ledger entry data via capturing properties of the physical partitioning model in the hash value assignment logic and in the block-oriented activity tracking structure.

[0158] As shown in Figure 32, an exemplary sharing of attestation or provable properties of properties of private ledger entries between parties is indicated generally by reference numeral 3200. A current exemplary embodiment for sharing attestation or provable properties of properties of private ledger entries is to provide Merkle signature scheme based attestation of specific ledger entries on a need-to-know basis, optionally supported by partial deeper private ledger data combined with ledger entry hash values, where ledger liveness authorization is based on "Merckle signatures".

[0159] Turning to Figure 33, hosted and unhosted copies of a distributed ledger are generally indicated by reference numeral 3300, where the public version is in the left column and the private version is in the right column. Hosted copies of both the public and private versions are in the top rows for parties A1, A2, etc., and unhosted copies are in the bottom two rows for parties B and C, respectively. That is, a party's ledgers may be hosted or managed by the respective party.

[0160] Turning now to FIG. 34, exemplary DAML™ ledger entry types for Agree, Await, and Delete commands are generally indicated by reference numeral 3400. There are three main types of DAML™ ledger entries: Agree, here, generally means that one or more parties agree to a real-world change or real-world promise between the specified parties; Await generally means that execution awaits a later or future authorization or promise of a “predefined” change to the ledger; Delete generally means that a previously entered active model is inactivated (deactivate / retire / voided). Ledger entries may also include native crypto assets defined by the underlying ledger. There are separate ledger entries that may be both referenced and created by DAML™ ledger entries of type await (see FIG. 14). In operation, Await may act as an offer, while Chooses and / or Agree may act as an acceptance.

[0161] As shown in FIG. 35, an exemplary use of the Agree command of DAML™ is generally indicated by reference numeral 3500. Here, the syntax and semantics are entirely up to the parties agreeing “off-ledger”, but all parties to the agreement must approve it. More specifically, Agree means that one or parties agree to a change in the real world. The syntax etc. are entirely up to the parties agreeing “off-ledger”. All parties to the agreement must approve it. In some circumstances, such an agreement or active model can embody a legally enforceable contract if the approval has legal standing and other legal requirements are met. For example, a parent agreement may be used to give such an agreement legal standing. If not, the parent agreement may bestow other characteristics on the agreement. Although the history of an agreement or active model cannot actually be deleted, one agreement may still replace a previous agreement, thereby deactivating the previous agreement. Thus, the function Delete deactivates a model, but does not necessarily delete its history. The “ledger logic” does not automatically know the scope of real-world influence.

[0162] 36, the ledger entry is an "instantiated" entry, generally designated by reference numeral 3600, where the code in the left column represents an uninstantiated model template for the cube, the middle column represents data values ​​to be instantiated into the template, and the right column represents the instantiated active model containing the data values.

[0163] Turning now to Figure 37, exemplary DAML™ code for an agreement for external notifications within an equity model, where the parties agree to make and receive notifications of an event in a format for that event, is shown generally by reference numeral 3700. In alternative embodiments, the agreement may be used in many other DAML™ applications.

[0164] As shown in Figure 38, an example DAML™ code using the Await command in a cube model is indicated generally by reference numeral 3800. Here, Await waits for permission or promise of a later / future "predefined and pre-authorized" change to the ledger. These are the logical "choices" brought about by the await entry. Each choice produces a new "cube" or active model while consuming the old one, making it an inactive model. In this example, the cube2 model definition is also its validation rule set.

[0165] Turning to Figure 39, a DAML™ ledger with a delete command is indicated generally by reference numeral 3900. The delete command is used to transform an active model into an inactive model, such as by applying deactivation / retirement / invalidation to any previously active entries, where an earlier (upper) delete refers to await, while a later (lower) delete refers to agree.

[0166] A bundle or block of transactions is executed in an all-or-nothing manner as a single step that includes three parts: 1. Transactions in a bundle are created, defined, or derived to contain: a. One or more sets of the following: i. Deactivating previous ledger entries; ii. Transient entries that are created and deactivated within the same transaction; and / or iii. Creating a new ledger entry b. For each entry i. which parties need to authorize the entry (affected parties); ii. which parties will see this entry (to which parties the entry is visible); and / or iii. Justification / proof of the reasoning in b(i) and b(ii) as required to support the soundness of each party's validation checks; 2. Obtain approval from parties affected by the content 3. Commit the transaction to the ledger using authorization

[0167] In the first part, transactions and / or ledger entries may be proposed and / or created by a single party or jointly proposed and / or created by multiple parties. Transactions may be communicated as a data-centric set of transaction entries or as a DAML™ script that generates transaction entries with optional underlying salt codes. Each transaction entry may be independent of the past and unrelated to previous ledger entries, or may depend on one or more previous ledger entries. The proposing party provides a basis for validation of the proposed ledger transaction if it was not previously visible to the affected parties. For example, a non-historically dependent entry does not require a reference to previous entries for justification.

[0168] 40 and 41, a ledger algorithm with a role-centric flow is generally indicated by reference numerals 4000 and 4100. The ledger algorithm is distributed and repeats the following operational steps in sequence, or optionally in parallel:

[0169] In step 1 and / or node 1, a ledger transaction is initiated. A ledger transaction proposal is created, or optionally derived from interpreting existing ledger entries. A participant creates a "ledger entry update" that specifies the anticipated transaction. Optionally, two or more participants may jointly agree to create the ledger entry update. The ledger impact caused by the ledger entry update, which may be referred to as a "Core Transaction", is calculated by the participants' DAML™ engine systems.

[0170] At step 2 and / or node 2, the proposed transaction may include outputs, inputs, authorizations, and proof / justification. Outputs may include a set of one or more new ledger entries. There may be any number of types of ledger entries, but the main ones are destruction of ledger entries (DAML™ delete), creation of new ledger entries such as DAML™ agreement with choice logic or DAML™ await. Inputs may include a set of zero or more references to existing active ledger entries. For each transaction ledger entry, authorization information may include which parties need to authorize the entry in this transaction (affected or validating parties), which parties see this entry (for which parties the entry is visible), optionally which parties are required to authorize derived actions, and the underlying Merkle signatures associated with the ledger entries required to justify the transaction.

[0171] In step 3 and / or node 3, ledger transactions are authorized, where requests for authorization are created and sent to the relevant parties. Once created, requests are sent only to the parties that need the authorization, and each request stores a copy of the transaction ledger entries, excluding those that the party does not see.

[0172] At step 4 and / or node 4, ledger transactions are reconciled. Digital signatures from authorizing parties are provided. These are generated for each ledger transaction, or for each Merkle signature that is associated with a ledger entry in the Merkle tree of the ledger transaction, or possibly in the Merkle tree of a block of transactions. Each party verifies the correctness of the transaction, the ledger entry, and the Merkle tree hash that it can see before granting its authorization.

[0173] In step 5 and / or node 5, the ledger transaction is stored. Each party involved in the transaction stores the new ledger entries in a private tier of its own ledger, without yet committing them to private storage.

[0174] In step 6 and / or node 6, the ledger transaction is committed. A shared, public layer of a ledger with a distributed consensus algorithm (e.g., HyperLedger) stores and commits the new transaction along with its Merkle tree hash and authorization, but without the transaction entry details.

[0175] In step 7 and / or node 7, the ledger transaction is committed to the private tier of ledger storage. Each party involved in the new transaction can commit details of their previously stored transaction entry to the public tier of the ledger.

[0176] The current exemplary embodiment of the DAML™ ledger has a dedicated party (e.g., an exchange entity) that validates the proposal of each new DAML™ ledger entry transaction. In the current exemplary embodiment of the DAML™ ledger, a transaction for a new DAML™ ledger entry is proposed by one party, and the proposing party and additional dedicated parties agree on the impact of the new transaction on the ledger and relationships with other parties. Agreement of multiple parties is achieved by successive entries of DAML™ ledger transactions by different parties in such a way as to build a DAML™ logic that combines the agreements of multiple parties. Alternative embodiments of the DAML™ ledger may allow any number of parties to agree on the impact of a new DAML™ transaction on the ledger and relationships with other parties.

[0177] Turning to Figure 42, the flow of the participant-centric ledger algorithm is generally indicated by reference numeral 4200. Here, a function block 4210 initiates a ledger including a private shared layer 4212 and a public layer 4214 and passes control to a decision block 4220. The decision block 4220 waits for participant actions and then passes control to function blocks 4230 and / or 4240. The function block 4230 initiates a ledger transaction on the private shared ledger 4212 and passes control back to the decision block 4220 to wait for further participant actions. The function block 4240 authorizes the ledger transaction on the public ledger 4214 and passes control back to the decision block 4220 to wait for further participant actions.

[0178] Turning now to Figure 43, a ledger-centric ledger algorithm is indicated generally by reference numeral 4300. Here, a function block 4310 starts a ledger including a private shared layer 4312 and a public layer 4314 and passes control to a decision block 4320. Based on a ledger event, the decision block 4320 passes control to one or more of function blocks 4330, 4340, 4350, 4360, and / or 4370, each of which performs a particular function and passes control back to the decision block 4320 to await the next ledger event. Here, function block 4330 authorizes the ledger transactions, function block 4340 reconciles the ledger transactions, function block 4350 stores the ledger in the private shared ledger 4312, function block 4360 commits the ledger transactions to the public layer 4314 of the participant's ledger, and / or function block 4370 commits the storage state to the private layer of the participant's ledger.

[0179] As shown in FIG. 44, an exemplary function for initiating a ledger transaction is generally indicated by reference numeral 4400. At input block 4410, a party initiates a new DAML™ update representation based on a business intent message (BIT) and passes control to function block 4420. Function block 4420 uses the DAML™ engine to calculate the impact on the ledger of the proposed DAML™ update in the form of a core transaction (CT) 4412 and passes control to function block 4430. Function block 4430 initiates and reconciles the core transaction on the ledger. Core transaction 4412 provides hooks to enumerate expected changes and digitally sign ledger entries. Basic proposed transaction details may include new ledger entries (outputs that will become active models) and ledger entries to be deleted (inputs that will become inactive models). Additionally, each transaction specifies which parties must authorize each ledger entry and which parties can "see" each ledger entry (to which parties the ledger entry is visible), as well as a justification in the form of a cryptographic hash of the BIT and the underlying Merkle proof.

[0180] The DAML™ engine may further include a DAML™ simulator that provides the ability to observe and interact with DAML™ modeling activities. DAML™ is a new type of contract specification language (CSL). Users can explore the developed DAML™ code by running scenarios and observing how DAML™ models are used and progress in a scenario. Users can use this visibility to observe, for example, how user inputs are absorbed into a DAML-based ledger.

[0181] The DAML™ simulator may be deployed with the DAML™ engine onto a host accessible to users. The DAML™ simulator may be deployed as a binary with the DAML™ modeling code as source code. This source code may be visible in the simulator. Thus, users can see the modeling of their business transaction processes in DAML, but cannot modify the installation. The DAML™ simulator includes a user interface (UI) portion. Access to the UI may be limited to via HTTP, HTTPS, etc.

[0182] In operation, the properties of the DAML-based ledger ensure process continuity between successive ledger operations. The properties are fixed and agreed upon in advance among the parties, but can also be incrementally managed. In the current exemplary embodiment, the properties are implemented with a "core primitive ledger" and then deployed as well as versioning by one or more key parties (e.g., exchange entities) to enable backward compatibility of ledger semantics. While mutable semantics are contemplated, the exemplary embodiment uses fixed semantics for existing ledger entries, since new versions of these rules may impose obligations on parties to migrate ledger entries from previous versions to the new version. New versions of function semantics may be introduced for future ledger entries, as long as the future ledger entries maintain the existing semantics of older ledger entries. Such new versions of functions may be tracked, for example, by version or date. Note, however, that the exemplary embodiment should be tracked by revision date, since it may depend on external legal agreements that may be subject to change.

[0183] Parties agree on ledger entries and their representation as data. Ledger entries define what parties can agree on through the medium of the ledger. They are defined in lexical, grammatical, binary, and other representations. Exemplary embodiments of DAML™ can use agree, await, delete, transfer, and other HyperLedger™ compatible digital asset ledger primitives. Semantics of interpretation of previous and future ledger entries, and real-world agreements. Semantics of interpretation of ledger entries define a deterministic way to algorithmically interpret or evaluate ledger entries. Semantics of ledger entries can affect previous and future ledger entries.

[0184] In DAML, a "delete" entry invalidates or deactivates the previous ledger entry in DAML, but leaves behind an auditable history. The execution interpretation of the "await choice" provides a "right" to delete the "selected await entry" and to create zero or more new ledger entries that satisfy the constraints that support updating the ledger entry.

[0185] In an agreement, the semantics of a ledger entry may affect future ledger entries. In DAML, an "await" ledger entry authorizes a later "choice" to create a ledger entry that matches given properties. Further interpretation may depend on the future ledger entry data. In DAML, the choice configuration of an await choice may include a template that optionally depends on zero or more parameters to be provided in one or more future ledger entries.

[0186] Semantics of ledger entries can affect the physical world. In DAML, an "agree" ledger entry binds multiple parties to a "real world" agreement. Semantics of ledger entries define a deterministic way to algorithmically create new ledger entries from declarations of updates to ledger entries. In DAML, update statements and generalized follow-ups have such semantics.

[0187] Authorization rules may be used in the algorithm that calculates which parties need to agree to the creation of a new ledger entry. This takes into account the impact of the ledger entry being derived from an interpretation of one or more existing ledger entries, or whether the ledger entry is created independently of the past. This takes into account that continuity of the "confidentiality face" may be guaranteed by designating trusted parties as validating authorized parties, and by using Merkle signatures on the Merkle trees of active ledger entries.

[0188] Validating party semantics are enforced. Semantics of ledger entry interpretation can define validating parties with the purpose of ensuring "no double transactions" by ensuring the correctness of the ledger logic and the "continuity" of the Merkle tree-based logic. The central concept is that validating parties can be defined within DAML. In an exemplary embodiment, it also means that if a party becomes a validating party that has not been before, and if this party does not have enough ledger details to ensure validation, it needs to receive additional ledger details from another party and be able to show its consistent new view of the ledger within the established confidentiality rules, otherwise it will not be allowed to authorize the proposed transaction.

[0189] Confidentiality semantics and rules are used in the algorithm that calculates which parties can see a new ledger entry. This takes into account the need for ledger entry authorization. Furthermore, the salt and Merkle tree implementation rules define a deterministic way to calculate one or more hash keys for a ledger entry or ledger entry update. These rules produce the same hash value given the same ledger entry and salt value, and produce the same sequence of hashes given the same ledger entry update and the same sequence of salt values. One hash is defined for each ledger entry by update.

[0190] Hashes with cryptographic properties do not allow those hashes to be used to derive information on the ledger entries they came from. For example, an implementation of the DAML™ engine cannot be compromised by a hash that can be used only to check validity.

[0191] In a transaction, ledger entries are added as a "group" with an "all succeed" or "all fail" atomicity property. This is the concept of a DAML™ ledger transaction. Although multiple parties need to authorize a transaction to be entered (committed), it is not necessary for all parties involved in a transaction to see all ledger entries of the transaction. This is because a transaction may contain ledger entries that are private to a subset of the transaction participants. While parties are agreeing to a transaction, they are technically authorizing the ledger entries in that transaction. Thus, the digital signatures of the parties are bound to the individual ledger entries. The "transaction" logic further ensures an "all or nothing" execution logic.

[0192] Using DAML, there are three types of ledger entries: a delete type can be said to deactivate / retire / invalidate a previous entry by transitioning it to an inactive model; an await type embodies a permission or promise for a later or future "pre-determined" change to the ledger; and an agree type requires multiple parties to each agree on one or more steps, conditions, or outcomes.

[0193] An await entry provides a choice by which authorizing parties bind themselves to accept the outcome of the await choice. An agree entry requires one or more parties to agree on a change to the real world, but the outcome cannot be deactivated and the agreement itself cannot be deleted. The ledger logic does not know about scopes, so it cannot determine whether such scopes can be deleted.

[0194] By default, all parties to an agreement must approve the agreement. An agreement may replace a previous agreement. An agreement is typically "eventful," but need not be. The syntax and interpretation of the agreement is entirely up to the parties agreeing "off-ledger." The ledger of the exemplary embodiment records such off-ledger agreements, but does not attempt to interpret them. Under certain circumstances, such agreements leading to an active model may satisfy the requirements of a legally binding contract in a given jurisdiction if the agreement was the intention of the parties and the respective authorizations had legal standing. In general, the ledger does not care whether a given agreement is enforceable, and the exemplary embodiment does not distinguish between general agreements and contracts that meet the criteria for an enforceable contract. If desired, the inventive concept envisions that a parent agreement can be used to give a DAML™ agreement legal standing as a contract in a particular jurisdiction.

[0195] All ledger entries, code, declarative statements, data structures, etc. discussed above may be stored in a non-transitory computer-readable storage medium. The functional steps described herein may be performed by computer code executing on a processor. The various data manipulations described above may be performed on the stored data structures to create transformed data structures that are processed by the computer processor in different ways. Various functions of the embodiments, such as the await function, allow computing systems to operate in new ways to perform transactions, providing advantages not found in the prior art. The steps of the various flowcharts may be performed by software modules executing on a computer processor. The columns shown in the figures may represent data structures, such as databases that store records, which are manipulated in the manner described to allow computing systems to manipulate and transform data.

[0196] An example of a digital system 500 performing one or more of the computer-implemented methods described herein is shown in FIG. 45. The system 5000 may facilitate modeling and / or recording of digital assets and deployment of the digital assets including associated rights of multiple parties. As an example, the multiple parties may include a first user 5001 and a second user 5003. The first user 5001 is associated with a first node 5002, and the second user 5003 is associated with a second node 5004. The first node 5002 and the second node 5004 may be in communication with a third node 5007. This allows for messages, notifications, instructions, selections, authorizations, etc. from the first node and the second node (and operated by the respective users) to the third node 5007.

[0197] The first node 5002, the second node 5004, and the third node 5007 may be electronic devices such as computers, tablet computers, mobile communication devices, computer servers, computer terminals, etc. Such electronic devices may include processing devices, data stores, and user interfaces. Examples of user interfaces include keyboards, mice, monitors, touch screen displays, etc.

[0198] A third node 5007 having a processing device 5008 is in communication with at least one storage device 5009. In some examples, the storage device 5009 is a data store 5011, such as a hard disk, magnetic disk, solid state storage, etc., for the note-only ledger. In some examples, the storage device for the note-only ledger is in the form of a peer-to-peer distributed ledger 5013. The peer-to-peer distributed ledger 5013 may be associated with one or more processing devices 5015 to receive and record data. In some examples, the peer-to-peer distributed ledger 5013 includes a blockchain.

[0199] The system may also include another user 5017, who may be one of the involved parties. The another user 5017 may use a representative, such as a second user 5003 (and a corresponding second node 5004), to interact with the system 5000.

[0200] It should be appreciated that the first node 5002, the second node 5004, the third node 5007, and the data storage 5009 may be in communication with one another over one or more networks, which may include one or more of a local area network, a wide area network. In some examples, this may include a secure local area network. In some examples, the communication may include a communications network, including the Internet.

[0201] 46 shows an example of a method 100 for manipulating a data structure for modeling and / or recording a digital asset and its evolution. At least a part of the method may be executed by a third node 5007. It includes providing 1200 an await function instance executed only once for the transfer of the digital asset with respect to the rights of at least one of a plurality of parties, using at least one of at least one option defined in the await function instance at least once, said await function instance being incorporated with the consent of the affected parties to execute a configured function instance associated with the at least one option.

[0202] In some examples, this step 1200 may be initiated upon receipt of an indication of consent transmitted (5100) from a node 5002, 5003 associated with a participant 5001, 5017.

[0203] The method 100 may include providing 1300 an agree function instance that requires the agreement of at least one of a plurality of participants in order to execute. In some examples, this step 1300 may be initiated upon receiving 5100 an indication of agreement associated with the agree function transmitted from a node 5002, 5003 associated with a participant 5001, 5017.

[0204] The method 100 may also include providing access to an annotated ledger for storing results of the executed function instances (4000), and the at least one storage device 5009 may store the results in the annotated ledger (5200).

[0205] In some examples, the system 5000 may execute a method for interpreting the modeled digital asset and the evolution of the digital asset with respect to the rights of multiple parties, which may include executing an await function instance of the await function 1200 described above, and executing an agree function instance of the agree function 1300 described above. The results of these executed function instances may then be stored in an annotated ledger.

[0206] Another example of a method 6000 performed by the system 5000 will now be described with reference to Figure 47. At least a portion of the method 6000 may be performed by a third node 5007. This illustrates a computer-implemented method of manipulating a data structure to model and / or record a digital asset and its deployment, including associated rights of multiple parties. The method 6000 includes determining 6100 an await function including at least one option defined in the await function for the transfer of the digital asset, the at least one option having an associated configured function and a respective selection step condition.

[0207] The method 6000 further includes executing (6200) the await function instance once, and upon receiving an indication of participant consent required by the at least one option and receiving a selection of a valid option from the at least one option, the method further includes executing an associated configured function instance of the at least one option, and the await function terminating with a determination that a selection step condition of the selection of the valid option is satisfied.

[0208] It should be appreciated that either and / or both of steps 6100 and 6200 may begin with receiving an indication of consent of one or more participants as required by at least one option and / or with receiving a selection of a valid option transmitted (6250) by a node 5002, 5004 associated with a participant 5001, 5003. In some examples, the indication of consent may explicitly or implicitly include the selection of an option (although the selection of an option may include the indication of consent).

[0209] The method 6000 further includes determining an agree function to create an agreement record associated with the digital asset, and the method further includes executing an agree function instance based on receiving consent from the parties required for the agreement. The agree function may be initiated by receiving an indication of the consents required for the agreement transmitted (6350) from the nodes 5002, 5004.

[0210] The method 6000 further includes sending 6400 a result of the executed function instance to the annotation-only ledger for storage, and the storage device 5009 stores 6450 the result in the annotation-only ledger.

[0211] Some further examples of the method 100, 6000 may further include a step of determining (6700) a delete function that, when executed, requires the consent of the affected parties to disable the agree function or to disable the await function that is not executed. This step 6700 may be in response to receiving an indication of the consent of the affected parties to disable the agree function or to disable the await function that is not executed transmitted (6750) from a node 5002, 5003 associated with the party 5001, 5017. The method may further include a step of transmitting (6800) results of the executed await function, the agree function, and the delete function to an annotated ledger for storage. And at least one storage device 5009 may store the results in the annotated ledger.

[0212] The above methods and systems may be applied to a variety of digital assets. In some examples, such digital assets may represent or be associated with tangible assets (e.g., iron ore, wheat, coffee, gold, etc.). For example, modern exchanges of highly traded commodities, such as fungible commodities, are represented as digital assets. As an example, gold may be traded digitally between parties using (digital) tokens without involving a physical exchange of the gold itself. In other examples, digital assets may represent other rights, such as the right to payment in a transferable instrument (such as paper money). Similar to traditional paper money, which may incorporate anti-counterfeiting measures such as seals, watermarks, magnetic strips, etc., digital assets also require security features to maintain the integrity of the digital assets. This may include incorporating measures to prevent double spending and to keep immutable records that can be used for audits.

[0213] Non-limiting examples of how digital assets may be modeled and deployed are described herein. In this example, the digital asset includes associated rights, which may be in the terms of the relationship between the parties. In some examples, some of these terms and agreements may be standardized (at least in part) or may be in a set of agreements between the parties. In a trading context, for example, a master agreement may detail the relationship between the traders and their custodian, explain how and when the custodian will act, and describe the responsibilities of each. In healthcare, a master agreement may be a risk-sharing agreement between hospital workers and outpatient care providers. Operation of the master agreement may be facilitated in part by this method (e.g., deployment of the digital asset).

[0214] In some instances, the relationship between the parties may be considered a contract (in the sense that there is an offer and acceptance by the parties to an agreement that may include contract terms). Since there may be a large number of digital assets, and some digital assets may be similar to each other or share similar characteristics, it may be beneficial to include a template that contains at least some of the information related to the digital assets (such as contract terms). A contract template includes the agreement statement and all applicable parameters and choices that may be made in acting on that data. A contract template specifies the acceptable inputs and the resulting outputs. Thus, a contract template describes the state changes that will occur when the contract is implemented. A contract template is not in force until it is signed by the parties involved. A contract template includes placeholders rather than actual names, amounts, dates, etc.

[0215] Figure 49 shows a schematic diagram representing a contract template 7001. One party (such as an owner 7003) has some currency. The owner 7003 can make a selection to do the following: i. depositing money in a bank 7007 (first option 7011); or ii. Sell it to a second party 7005 (perhaps in exchange for goods or services) (second option 7013)

[0216] In a first option 7011, the money goes to a bank account at the bank 7007, and in a second option 7013, the money goes to the second party 7005. As noted above, the contract template may include placeholders rather than actual names, amounts, dates, etc., as these may be determined at a later stage when the contracting parties provide their selections and / or consents. This allows the contract template to be used multiple times (and / or modified accordingly). It should be appreciated that the contract template may be stored in a library in a data store for retrieval. In some examples, the contract template may formalize or define at least some of the rights of the parties (when they enter into a contract as discussed below).

[0217] An active contract may be an instance of a contract where placeholders have been replaced with actual data, which has been accepted, is in force, and is binding on at least one of the participants. An active contract may be a modified and / or executed instance of the contract templates described above.

[0218] Figure 50 shows a schematic diagram of an example active contract 7101 where the owner 7003 details have been replaced with a specific person Alice 7103. Similarly, the second party 7005 is specified as Bob 7105. The bank 7007 may be defined in the contract template or a specific bank may be defined in the active contract 7101. Thus, in the active contract, Alice has money and she has two options: i. depositing money in a bank 7007 (first option 7011); or ii. Sell it to Bob 7105 (second option 7013)

[0219] In the manner described above, this state of an active contract may be brought about by an await function (or more specifically, an instance of an await function). This is illustrated in FIG. 51, which shows an await function instance 7201 that contains two options 7011, 7013 for Alice 7103.

[0220] If Alice 7103 chooses the first choice 7011 (i.e., the "Pay" option), the code determines that what happens next is to execute the associated configured function 7211. Alice's choice and the bank's agreement to deposit the money in Alice's account (either through a previous agreement or a temporary agreement when Alice's bank account was opened) may indicate the parties' agreement with Alice's choice. In this example, the associated configured function is for the bank to deposit the money in Alice's account. Each choice step condition may include a condition that the bank 7007 receives confirmation that the deposit has been made to Alice's account.

[0221] If Alice 7103 chooses the second choice 7103 (i.e., the "sell" option), the code determines that a new instance 7223 of the contract is created based on the contract template, but this time Bob is the one who has the currency and the choices to deposit and sell. That is, the associated configured function for the second choice 7013 is to create a new instance of the contract 7223. Each choice step condition may include an indication that a new instance 7223 of the contract is to be created. Alternatively, or in combination, another each choice step condition may include that Bob 7105 has made a valid choice or that the bank 7007 has deposited the money into Bob's account.

[0222] When a contract has been used and a selection has been made, it is no longer usable, i.e. the user cannot sell the same asset again or deposit the same currency twice. This can be achieved by an await function that terminates with a determination that the valid option selection step condition is met.

[0223] The choice step condition may allow for parallel choice steps while preventing double spending. Importantly, this may allow a subsequent parallel choice to be validly chosen if an earlier choice step condition of an earlier choice step is not, or cannot be, satisfied. For example, suppose Alice 7103 initially chooses the first choice 7011, but the bank 7007 is unable to deposit the money into Alice's account (e.g., Alice's account has been closed). Thus, Alice has made a choice, but the choice step condition cannot be satisfied. This therefore leaves the contract active (and enforced via an active await function) so that Alice can make an alternative choice, such as the second choice 7013. This prevents a situation where Alice is stuck on a choice that cannot be satisfied.

[0224] Once a contract is "used", the await function instance 7201 is terminated (i.e., when a valid choice is made, the respective choice step condition is satisfied). Thus, the used contract becomes an inactive contract and can no longer be acted upon (i.e., Alice cannot make a choice again). This prevents double consumption. A feature of this system is that since items are not deleted, contracts (or information stored in the ledger associated with the contract) are not deleted from the append-only ledger. This preserves the integrity of the system and may aid review and audit. Figure 52 shows an inactive contract 7101' (which corresponds to a terminated await function instance) where Alice has made a valid choice 7013 and can no longer make other choices. The result is that Bob can make a choice in a new await function instance 7223, such as selling to Charlie 7106 or depositing in the bank 7007.

[0225] However, there are some situations in which one or more of the defined options are not desirable or cannot be selected. This may include situations in which it is necessary to record relevant information for a digital asset in connection with an event that was not predicted or could not be modeled. This may be a "real world" event that affects the digital asset. Thus, the system also includes steps to enable real world events to be recorded.

[0226] This may include an agree function (or an instance thereof) to enable an agreement record associated with the digital asset to be recorded in the annotation-only ledger. The agree function may be executed upon receiving consent of the parties required for the agreement. For example, the required parties may be parties whose rights are affected or outstanding.

[0227] In some examples, the agree function may be associated with an agree function instance and / or a choice step condition. For example, some of the choices may include performing a "real world" or "off-ledger" action, which may require the agree function instance to record this. Referring to the example above, when a bank deposits money into Alice or Bob's account, this may result in a deposit slip or receipt for that payment outside of the system. Thus, Alice 7103 and the bank 7007, or Bob 7105 and the bank 7007, may need to provide an indication that they both agree that the deposit has been made, which may be used as an agreement to record this as an agreement record on the ledger. In other examples where the digital asset represents a tangible commodity, the agree function may be used to record the delivery of the commodity, such as both parties agreeing that a quantity of coal has been delivered.

[0228] The delete function instance (and the delete function instance) can be used to invalidate or invalidate previous entries recorded in the note-only ledger, with the consent of the affected parties. This function, together with the agree function, can give the system some flexibility to correct mistakes without deleting information from the note-only ledger records.

[0229] The above methods and systems may allow a user to code for a particular contract or contract template and execute the contract to see the results of various choices. This may allow a user to drill down to see various contract options (i.e., choices, which may then lead to further contracts and additional choices). This allows a user to follow virtually any path and interact with the modeled contract in any valid way to see the results. In some examples, this may also allow one or more users to simulate and interact with the contract. Thus, in some examples, the systems and methods may be adapted to be analytical tools.

[0230] FIG. 53 illustrates an example of a processing device 5008 that may be associated with nodes 5002, 5004, 5007. The processing device 5008 includes a processor 9310, a memory 9320, and an interface device 9340 that communicate with each other via a bus 9330. The memory 9320 stores instructions and data for implementing the methods 100, 3900, 6000 described above, and the processor 9310 executes instructions (such as computer programs) from the memory 9320 to implement the methods. The interface device 9340 may include a communication module that facilitates communication with a communication network and, in some examples, with user interfaces and peripherals, such as the data store 5009 and other nodes. It should be noted that while the processing device 5008 may be an independent network element, the processing device 5008 may also be part of another network element. Additionally, some functions performed by the processing device 5008 may be distributed across multiple network elements. For example, multiple processing devices 5008 may perform the method in a secure local area network.

[0231] Although the inventive concepts have been described by way of example in connection with non-limiting exemplary embodiments, other alternatives, modifications, and variations will be apparent to those skilled in the relevant art based on the teachings disclosed herein. Accordingly, the appended claims are intended to cover all such alternatives, modifications, and variations to the exemplary embodiments described herein, and their equivalents, that fall within the scope and spirit of the present disclosure. [Explanation of symbols]

[0232] 114 Unary Parser Combinators 118 Abstract syntax tree 4212 Private shared ledger 4214 Public Ledger 4312 Private shared ledger layer 4314 Public Ledger Layer 4412 Core Trading 5001 First User 5002 First Node 5003 Second User 5004 Second Node 5007 Third Node 5008 Processing Device 5009 Storage Devices 5011 Datastore 5013 Peer-to-Peer Distributed Ledger 5015 Processing Device 5017 Another User 7001 Contract Template 7003 Owner 7005 Second Person 7007 Bank 7011 First Choice 7013 Second Option 7103 Alice 7105 Bob 9310 Processor 9320 Memory 9322 Data 9324 Instructions 9330 Bus 9340 Interface < / ioun>

Claims

1. 1. A computer-implemented method of manipulating data structures for modeling digital assets and the deployment of said digital assets with respect to rights of multiple parties, comprising: determining, by one or more computing devices, the rights of the plurality of parties with respect to the digital asset to be transferred by execution of a first function instance, the first function instance including at least a first option defined therein for disposition of the digital asset; generating, by one or more computing devices, a proposed transaction configured to update an annotated private ledger maintained by a plurality of different nodes of a computer network, the proposed transaction comprising: (i) cryptographically authorizing, by a first node of the plurality of distinct nodes, the immediate and future ledger execution impact of the proposed transaction; (ii) data identifying an authorizing subset of a plurality of nodes that can use cryptographic techniques to authorize the immediate and future ledger execution impact of the proposed transaction; and (iii) data identifying a private subset of the plurality of nodes that have a right to receive information related to the transaction; and generating, verifying, by the one or more computing devices, that each of the authorizing nodes has provided cryptographic authorization for the proposed transaction; and storing, by the one or more computing devices, a result of the executed first function instance as a committed transaction in an appended-only ledger.

2. 10. The computer-implemented method of claim 1, wherein the proposed trade includes transient entries that are created and deactivated within the proposed trade.

3. 10. The computer-implemented method of claim 1, wherein the proposed trade includes an output that includes one or more ledger entries.

4. 4. The computer-implemented method of claim 3, wherein the proposed transaction further comprises the first node cryptographically authorizing only a subset of ledger entries.

5. 5. The computer-implemented method of claim 4, wherein the subset of ledger entries is authorized using a cryptographic technique known as a Merkle signature.

6. 4. The computer-implemented method of claim 3, wherein each ledger entry is either a command to discard an existing ledger entry recorded in the add-on only ledger or a command to create a new ledger entry and record the new ledger entry in the add-on only ledger.

7. 4. The computer-implemented method of claim 3, wherein (ii) of claim 1 includes, for each ledger entry included in the proposed transaction output, per-ledger-entry authorization data that identifies one or more ledger-entry authorization nodes that must cryptographically authorize the respective ledger entry.

8. 8. The computer-implemented method of claim 7, further comprising the step of transmitting authorization data for each ledger entry only to the ledger entry authorization node and not to other nodes in the computer network.

9. 8. The computer-implemented method of claim 7, further comprising verifying that each ledger entry included in the output of the proposed transaction has been cryptographically authorized by a respective ledger entry authorization node.

10. 2. The computer-implemented method of claim 1, further comprising transmitting a cryptographically protected version of the proposed transaction to a subset of the plurality of distinct nodes of the computer network that are not affected by the proposed transaction.

11. 2. The computer-implemented method of claim 1, further comprising the step of transmitting a readable version of the proposed transaction only to private nodes that have a right to receive information related to the transaction and not to other nodes in the computer network.

12. 2. The computer-implemented method of claim 1, wherein the appended-only ledger includes a private ledger shared among at least the private nodes, the private ledger storing committed transactions.

13. 13. The computer-implemented method of claim 12, wherein the annotated private ledger includes a public ledger shared among the plurality of nodes of the computer network, the public ledger storing the committed transactions represented using cryptographic techniques.

14. The computer-implemented method of claim 13, wherein the committed transaction represented using the cryptographic technique includes a hash of the committed transaction.

Citation Information

Patent Citations

  • Method for creating, issuing and redeeming payment assured contracts based on mathemematically and objectively verifiable criteria

    US20150206106A1

  • System and method for executing financial transactions

    US20150356555A1

  • Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain.

    US20150379510A1