parameter names are defined within the expression, the expression is effectively a function. Whereafunctionispassedasaparameter, this is known as a “higher-order” parameter and the receiving code is known as a “higher-order” function.9 An example of a higher-order parameter is illustrated in Figure 4 where some business logic in the legal prose has been highlighted and annotated to be a parameter with name “DailyInterestAmount” of type “Expression”10 and with a value that is an encoding of the business logic in a format that is easily understandable by a computer. Figure 4: From a Barclays demonstration of Smart Contract Templates: an editor permits business logic from the legal prose to be highlighted, and then annotated to denote a higher-order parameter. The parameter has a name “DailyInterestAmount”, type “Expression”, and value corresponding to an arithmetical expression. The business logic refers to three things whose values are unknown. The first two are simple: “the amount of cash in such currency on that day” (in the expression this is called CashAmount), and “the relevant Interest Rate in effect for that day” (in the expression this is called InterestRate). The third occurs in the phrase “in the case of pounds sterling”, which requires some analysis to determine that it is referring to the prevailing currency (hence the name Currency used in the expression) and that the normal abbreviation for pounds sterling is “GBP”. Since this expression contains three parameter names whose values are unknown, it will be stored in the set of execution parameters as a function taking three arguments (CashAmount, InterestRate, and Currency) and returning a numeric value that is the result of the expression. It should be noted that when business logic is converted into an expression this may involve the creation of new parameter names (e.g. a new name for the expression itself, and for unknownquantities). Sometimes the business logic may refer to a name that is already defined as a parameter, and sometimes it may refer to a value provided by an “oracle” — i.e. a value, such as an interest rate, that is provided from a trusted source of data and is available to the code while it is executing. The use of parameters may not only be used to support greater standardisation of code. In the far future, we may see an increasing use of a formally structured style of expression embedded in legal prose; if all business logic in legal prose could be replaced with arithmetical or logical expressions, such as the higher-order parameters discussed in the previous paragraph, this would lead to reduced ambiguity in legal prose and fewer errors in translating legal prose into execution parameters. Such adoption of formal logic into legal prose would require such formal constructs to gain acceptance in the courts and to be admissible as evidence of the intentions of the parties. 9https://en.wikipedia.org/wiki/Higher-order_function 10In a conventional type system this expression would have an associated function type such as: (Decimal, Decimal, Currency) -> Decimal 9

Position Paper | Smart Contract Templates - Page 11 Position Paper | Smart Contract Templates Page 10 Page 12