# US 2021/0209596 A1 · Object Oriented Smart Contracts For UTXO-Based Blockchains

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0209596 A1
- Document ID: US20210209596A1
- Status: Published application
- Kind: A1
- Application number: 17/266,212
- Filed: 2019-08-21
- Published: 2021-07-08
- Earliest claimed: 2018-08-21
- Assignees: Bcdb, Inc.
- Applicants: Bcdb, Inc.
- Inventors: Clemens Ley
- Web page: https://patentgrep.com/patent/US20210209596A1

## CPC

- G06Q 20/401: {Transaction verification}
- G06F 8/31: {Programming languages or programming paradigms}
- G06F 8/41: Compilation
- G06F 9/4488: {Object-oriented}
- G06F 9/467: {Transactional memory (G06F9/528 takes precedence)}
- G06F 9/5016: {the resource being the memory}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 21/606: {by securing the transmission between two devices or processes}
- G06Q 30/06: Buying, selling or leasing transactions
- G06Q 40/02: Banking, e.g. interest calculation or account maintenance (credit or loans G06Q40/03)
- G06Q 20/065: {using e-cash}
- G06Q 2220/00: Business processing using cryptography
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 2463/102: applying security measure for e-commerce
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Disclosed is method and system for turning existing object-oriented programming languages into smart contract languages without introducing new syntactic features. The invented method and system provide a protocol that enables storing a history of computations on a decentralized computer network, such as a UTXO-based blockchain system, for any object-oriented computer language. The invented method and system further provide for storing and updating data on blockchains, where such blockchains may be used in cryptocurrency applications and for smart contracts.

## Claims

### Claim 1

A method of generating an instruction in a first object-oriented computer language for operating in a decentralized computer network from an instruction in a second object-oriented computer language that can operate on a local computer, where a semantic of the second object-oriented computer language can be expressed by a rule
so, S, E, ├e: v, S′
with ├ denoting a semantic relation, said rule meaning that in a context where a variable self refers to an object so, where a data store on the local computer is S, and where an execution environment is E, an expression e evaluates to an object v at a second data store S′ in the local computer, said method comprising:
replacing a local storage update command S[v/l], which updates an at least one location l by an object v, by a command to (a) broadcast to the decentralized computer network an at least one transaction that spends at least one unspent-transaction-output corresponding to said location l into a new output that stores at least one of (i) said object v and (ii) information enabling said object v to be determined; and (b) spend at least one additional unspent-transaction-output corresponding to a second location l′ in said execution environment E or said object so;
wherein said generated instruction enables operation of a smart contract.

### Claim 2 (depends on 1)

The method of claim 1, wherein said instruction in said first object-oriented computer language is a storage-update instruction, and wherein said storage-update instruction either immediately precedes a recursive call to a first semantic relation or is located at, an end of a body of said semantic rule of said first object-oriented computer language.

### Claim 3 (depends on 1)

A method of claim 1, wherein said instruction in said first object-oriented computer language is an instruction for storing a data structure D at an unspent memory location OUT on the decentralized computer network, said data structure D further including a data structure D, where said data structure D′ further includes a data structure D″, said method comprising the steps of:
(a) receiving at the local computer a request to store the data structure D at an unspent memory location OUT on the decentralized computer network;
(b) creating at the local computer a request TX, to the decentralized computer network, to spend the unspent memory location OUT and to generate a new unspent memory location OUT′ on the decentralized computer network;
(c) using the local computer to sign and broadcast said request TX to the decentralized computer network;
(d) receiving said request TX at the decentralized computer network;
(e) using the decentralized computer network to determine validity of said request TX according to a protocol of the decentralized computer network; and
(f) if said request TX is determined to be valid, performing the steps of
(i) spending the unspent memory location OUT on the decentralized computer network and generating said new unspent memory locations OUT on the decentralized computer network; and
(ii) repeating steps (a) through (f)(i) above while using said data structure D′ in place of said data structure D and while using said memory location OUT′ in place of said memory location OUT.

### Claim 4 (depends on 3)

The method of claim 3, wherein the decentralized computer network is an unspent-transaction-outputs blockchain.

### Claim 5 (depends on 1)

The method of claim 1, wherein the decentralized computer network is an unspent-transaction-outputs blockchain.

### Claim 6 (depends on 1)

The method of claim 1, wherein a source code of a program written in one of said first computer language and said second computer language is stored in a transaction.

### Claim 7 (depends on 6)

The method of claim 6, where said transaction represents object creation.

### Claim 8

A computer system comprising a local computer, the local computer comprising:
a) a memory for storing computer instruction and data; and
b) a processor operatively coupled to said memory, said processor capable of generating an instruction in a first object-oriented computer language for operating in a decentralized computer network from an instruction in a second object-oriented computer language that can operate on the local computer, where a semantic of the second object-oriented computer language can be expressed by a rule
so, S, E, ├e: v, S′
with ├ denoting a semantic relation, said rule meaning that in a context where a variable self refers to an object so, where a data store on the local computer is S, and where an execution environment is E, an expression e evaluates to an object v at a second data store S′ in the local computer,
said local computer: replacing a centralized storage update command S[v/l], which updates an at least one location l by an object v, by a command to (c) broadcast to the decentralized computer network an at least one transaction that (c) spends at least one unspent-transaction-output corresponding to said location l into a new output that stores at least one of (i) said object v and (ii) information enabling said object v to be determined; and (d) spending at least one additional unspent-transaction-output corresponding to a second location l′ in said execution environment E or said object so;
wherein said generated instruction enables operation of a smart contract

### Claim 9 (depends on 8)

The computer system of claim 8, wherein the decentralized computer network is an unspent-transaction-outputs blockchain.

### Claim 10 (depends on 8)

The computer system of claim 8, further comprising a decentralized computer network,
wherein said instruction in said first object-oriented computer language is an instruction for storing a data structure D at an unspent memory location OUT on the decentralized computer network, said data structure D further including a data structure D′, where said data structure D′ further includes a data structure D″,
(a) wherein the local computer is configured to receive a request to store the data structure D at an unspent memory location OUT on the decentralized computer network;
(b) wherein the local computer is configured to create a request TX to the decentralized computer network, to spend the unspent memory location OUT and to generate a new unspent memory location OUT′ on the decentralized computer network;
(c) wherein the local computer to configured to enable signing and broadcasting said request TX to the decentralized computer network;
(d) wherein receiving the decentralized computer network is configured to receive said request TX
(e) wherein the decentralized computer network is configured enable determining validity of said request TX according to a protocol of the decentralized computer network; and
(f) if said request TX is determined to be valid,
(i) said decentralized computer network further configured to spend the unspent memory location OUT on the decentralized computer network and to generate said new unspent memory locations OUT′ on the decentralized computer network; and
(ii) wherein the computer system is configured to repeating operations (a) through (f)(i) above while using said data structure D′ in place of said data structure D and while using said memory location OUT′ in place of said memory location OUT.

### Claim 11 (depends on 10)

The computer system of claim 10, wherein the decentralized computer network is an unspent-transaction-outputs blockchain.

### Claim 12 (depends on 8)

The computer system of claim 8, wherein a source code of a program written in one of said first computer language and said second computer language is stored in a transaction that represents object creation.
