# US 2019/0318346 A1 · Smart contract executed within a blockchain

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

- Number: US 2019/0318346 A1
- Document ID: US20190318346A1
- Status: Published application
- Kind: A1
- Application number: 15/954,696
- Filed: 2018-04-17
- Published: 2019-10-17
- Earliest claimed: 2018-04-17
- Assignees: Lendoit Technologies Israel Ltd.
- Applicants: Lendoit Technologies Israel Ltd.
- Inventors: Avi BEN-DAVID; Vladislav AMIROV; Ori EREZ; Yoav PINKAS
- Web page: https://patentgrep.com/patent/US20190318346A1

## CPC

- G06Q 20/3678: {e-cash details, e.g. blinded, divisible or detecting double spending}
- G06Q 20/0658: {e-cash managed locally}
- G06Q 20/3674: {involving authentication}
- G06Q 20/3829: {involving key management}
- G06Q 40/03: Credit; Loans; Processing thereof
- G06Q 40/04: Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
- H04L 9/006: {involving public key infrastructure [PKI] trust models (network architecture or network communication protocol for supporting authentication of entities using certificates in a packet data network H04L63/0823)}
- H04L 9/0637: {Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]}
- H04L 9/14: using a plurality of keys or algorithms
- H04L 9/30: Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 9/3242: {involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 63/0442: {wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption (cryptographic mechanisms or cryptographic arrangements for public-key encryption H04L9/30)}
- H04L 63/126: {the source of the received data}
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- G06Q 2220/00: Business processing using cryptography
- 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
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

There is provided a method and system for selection of response message(s), comprising: receiving from an initiator client terminal a function message including an unencrypted target value and a public key, receiving respective response messages to the function message from responding client terminals, each respective response comprising an unencrypted partial value of the target value and a parameter encrypted with the pubic key, receiving, from the initiator client terminal, a selection of response message(s) according to a ranking of the encrypted parameters, wherein a sum of the unencrypted partial values of the selected response message(s) is according to a requirement of the target value, and receiving a validation for the selected response message(s) from corresponding responding client terminals, wherein each of the corresponding responding client terminals is provided with all partial values and all unencrypted parameters associated with all of the selected response message(s).

## Claims

### Claim 1

A system for secure selection of at least one response message from a plurality of response messages including a combination of encrypted and unencrypted data processed by a distributed smart contract function of a blockchain dataset, comprising:
a non-transitory memory having stored thereon a code for execution by at least one hardware processor executing a code of the distributed smart contract function of the blockchain dataset, the code comprising instructions for:
receiving, by the distributed smart contract function, from an initiator client terminal a function message including an unencrypted target value, and a public key associated with a corresponding private key stored by the initiator client terminal;
receiving respective response messages to the function message, by the distributed smart contract function, from a plurality of responding client terminals, each respective response comprising an unencrypted partial value of the target value and a parameter encrypted with the pubic key;
storing, by the distributed smart contract function, the response messages including the encrypted parameter and the unencrypted partial value received from the plurality of responding client terminals, and providing the initiator client terminal with access to the response messages including the encrypted parameter when a threshold computed as the sum of the unencrypted partial values of the response messages is met;
receiving, by the distributed smart contract function, from the initiator client terminal, a selection of at least one response message,
wherein client code stored on a storage device of the initiator client terminal performs computations off the blockchain when executed by at least one hardware processor of the initiator client terminal comprises instructions for: decrypting the parameter of each respective response with the private key, analyzing the respective response messages according to a ranking of the decrypted parameters of the respective response messages, and selecting the at least one response message, wherein a sum of the unencrypted partial values of the selected at least one response message is according to a requirement of the target value;
receiving, by the distributed smart contract function, an indication of a validation for the selected at least one response message from corresponding responding client terminals,
wherein each of the corresponding responding client terminals independently validates the selected at least one response by client code locally stored thereon executed by processor resources of the respective corresponding responding client terminal according to all partial values and all unencrypted parameters associated with all of the selected at least one response message; and
in response to the received indication of validation of the selected at least one response message from the corresponding responding client terminals, creating a new block for storage in the blockchain, wherein the new block stores, for each of the selected at least one response messages from corresponding responding client terminals providing the indication of validation, the address of the respective responding client terminal, the partial amount, and the unencrypted parameter, wherein the new block is stored in a data storage device accessible to a third client terminal over the network.

### Claim 2 (depends on 1)

The system of claim 1, wherein the smart contract function is executed as a decentralized application.

### Claim 3 (depends on 1)

The system of claim 1, wherein the client code is stored on the non-transitory memory in association with the blockchain dataset and the code of the distributed smart contract function for transmission to the initiator client terminal and to the corresponding responding client terminals for local storage of the client code in a data storage device thereof and execution of the client code by at least one respective hardware processor of the initiator client terminal and of the corresponding responding client terminals.

### Claim 4 (depends on 1)

The system of claim 1, further comprising evaluating a consensus for the selected at least one response amongst the responding client terminals according to a majority vote computed according to the indications of validations receives from responding client terminals.

### Claim 5 (depends on 1)

The system of claim 1, further comprising:
computing a hash value based on an indication of each of the selected at least one response, wherein the hash value is provided to each of the corresponding responding client terminals for local computation of the hash value by the respective responding client terminal for matching to the provided hash value.

### Claim 6 (depends on 5)

The system of claim 5, further comprising verifying a threshold approval ratio is reached according to the indications of validation received from the corresponding responding client terminals, wherein the threshold approval ratio is included with the function message.

### Claim 7 (depends on 5)

The system of claim 5, wherein the hash value is computed for a concatenation of a plurality strings, each string including an identification code for a respective responding client terminal and the associated unencrypted parameter.

### Claim 8 (depends on 1)

The system of claim 1, wherein the unencrypted target value denotes a total amount of a loan, and the parameter denotes an interest rate for a partial amount of the total amount of the loan, wherein the function message denotes a tender for the total amount of the loan, and wherein each respective response denotes a bid for the partial amount of the total amount of the loan at the respective interest rate.

### Claim 9 (depends on 8)

The system of claim 8, wherein the selecting of the at least one response is according to a lowest value of the decrypted proposed interest rate.

### Claim 10 (depends on 8)

The system of claim 8, further comprising:
receiving from the plurality of responding client terminals, funds of the at least partial amount associated with each respective bid;
locking the received funds; and
unlocking funds for access by the initiator client terminal, and by the non-selected responding client terminals in response to receiving the indication of the validation of the selected at least one response.

### Claim 11 (depends on 10)

The system of claim 10, wherein the funds are provided to the smart contract function code by each of the responding client terminals that execute a transmit function of an application programming interface (API) that accesses a respective digital wallet of the plurality of responding client terminals and transmits the funds to the smart contract function code, and the unlocked funds are accessed by the initiator client terminal executing a get function of the API for obtaining the funds from the smart contract function code into a digital wallet of the initiator client terminal.

### Claim 12 (depends on 10)

The system of claim 10, further comprising unlocking partial funds for access by each at least one selected responding client terminals, wherein the partial funds denote a portion of the funds not included as the loan for the initiator client terminal.

### Claim 13 (depends on 10)

The system of claim 10, further comprising unlocking all funds for retrieval by the plurality of responding client terminals when a set-of-rules is met.

### Claim 14 (depends on 13)

The system of claim 13, wherein the set-of-rules include at least one of: no selection is made, an amount of received indication of validation is below a threshold provided by the initiator client terminal, and funds are not claimed by the initiator client terminal within a defined time interval.

### Claim 15 (depends on 8)

The system of claim 8, wherein the function message further include at least one of: a currency type of the loan, a token type of the loan, a range of the interest rate of the loan, a threshold approval ratio, and a funds holding timeout indicative of an amount of time for holding funds after elapse of the tender timeout duration.

### Claim 16 (depends on 8)

The system of claim 8, wherein the funds of the loan are in a cryptocurrency.

### Claim 17

(canceled)

### Claim 18 (depends on 1)

The system of claim 1, wherein the new block further stores all received respective response messages from the plurality of responding client terminals including respective unencrypted partial values and unencrypted parameters for access by the third client terminal.

### Claim 19 (depends on 1)

The system of claim 1, further comprising distributing the new block over the network to a plurality of servers hosting copies of the blockchain dataset for mining into a new block for local validation and updating respective copies of a side-chain of the block of the blockchain, wherein the side-chain stores a history of previous response messages to previous queries.

### Claim 20 (depends on 1)

The system of claim 1, wherein the at least one response is selected in a non-centralized manner, without a third party intermediary.

### Claim 21 (depends on 1)

The system of claim 1, wherein the response messages received from the plurality of responding client terminals are accessible to the initiator client terminal when a timeout duration provided by the initiator client terminal has expired.

### Claim 22

(canceled)

### Claim 23 (depends on 1)

The system of claim 1, wherein the function message includes an indication of a maximum parameter, and wherein the selection of the at least one response is performed according to a ranking of parameters below the maximum value.

### Claim 24 (depends on 23)

The system of claim 23, further comprising computing a remaining amount as a difference between the target value and the sum of the partial values, and selecting at least one additional response according to response messages including the maximum value of the parameter and the remaining amount.

### Claim 25 (depends on 23)

The system of claim 23, further comprising computing a remaining amount as the difference between the target value and the sum of the partial values, and selecting a plurality of additional response messages according to response messages including the maximum value of the parameter and an equal percentage of each of the partial amounts associated with the respective response messages to total the remaining amount.

### Claim 26 (depends on 25)

The system of claim 25, wherein the equal percentage is computed based on the remaining amount divided by a sum of the partial values associated with the respective response messages.

### Claim 27 (depends on 1)

The system of claim 1, wherein each code of the respective copy of the smart contract function is executed by a copy of a virtual machine executed by the at least one hardware processor.

### Claim 28 (depends on 1)

The system of claim 1, wherein the respective response messages received from the plurality of responding client terminals are stored in a dataset associated with the smart contract function.

### Claim 29

A method of secure selection of at least one response message from a plurality of response messages including a combination of encrypted and unencrypted data processed by a distributed smart contract function of a blockchain dataset, the method comprising:
receiving, by the distributed smart contract function, from an initiator client terminal a function message including an unencrypted target value, and a public key associated with a corresponding private key stored by the initiator client terminal;
receiving respective response messages to the function message, by the distributed smart contract function, from the plurality of responding client terminals, each respective response comprising an unencrypted partial value of the target value and a parameter encrypted with the pubic key;
storing, by the distributed smart contract function, the response messages including the encrypted parameter and the unencrypted partial value received from the plurality of responding client terminals, and providing the initiator client terminal with access to the response messages including the encrypted parameter when a threshold computed as the sum of the unencrypted partial values of the response messages is met;
receiving, by the distributed smart contract function, from the initiator client terminal, a selection of at least one response message,
wherein client code stored on a storage device of the initiator client terminal performs computations off the blockchain when executed by at least one hardware processor of the initiator client terminal comprises instructions for: decrypting the parameter of each respective response with the private key, analyzing the respective response messages according to a ranking of the decrypted parameters of the respective response messages, and selecting the at least one response message, wherein a sum of the unencrypted partial values of the selected at least one response message is according to a requirement of the target value;
receiving, by the distributed smart contract function, an indication of a validation for the selected at least one response message from corresponding responding client terminals,
wherein each of the corresponding responding client terminals independently validates the selected at least one response by client code locally stored thereon executed by processor resources of the respective corresponding responding client terminal according to all partial values and all unencrypted parameters associated with all of the selected at least one response message; and
in response to the received indication of validation of the selected at least one response message from the corresponding responding client terminals, creating a new block for storage in the blockchain, wherein the new block stores, for each of the selected at least one response messages from corresponding responding client terminals providing the indication of validation, the address of the respective responding client terminal, the partial amount, and the unencrypted parameter, wherein the new block is stored in a data storage device accessible to a third client terminal over the network.

### Claim 30

A computer program product for secure selection of at least one response message from a plurality of response messages including a combination of encrypted and unencrypted data processed by a distributed smart contract function of a blockchain dataset, comprising:
a non-transitory memory having stored thereon executing a code of the distributed smart contract function of the blockchain dataset for execution by at least one hardware processor, the code comprising:
instructions for receiving, by the distributed smart contract function, from an initiator client terminal, a function message including an unencrypted target value, and a public key associated with a corresponding private key stored by the initiator client terminal;
instructions for receiving respective response messages to the function message, by the distributed smart contract function, from a plurality of responding client terminals, each respective response comprising an unencrypted partial value of the target value and a parameter encrypted with the pubic key;
instructions for storing, by the distributed smart contract function, the response messages including the encrypted parameter and the unencrypted partial value received from the plurality of responding client terminals, and providing the initiator client terminal with access to the response messages including the encrypted parameter when a threshold computed as the sum of the unencrypted partial values of the response messages is met;
instructions for receiving, by the distributed smart contract function, from the initiator client terminal, a selection of at least one response message,
wherein client code stored on a storage device of the initiator client terminal performs computations off the blockchain when executed by at least one hardware processor of the initiator client terminal comprises instructions for: decrypting the parameter of each respective response with the private key, analyzing the respective response messages according to a ranking of the decrypted parameters of the respective response messages, and selecting the at least one response message, wherein a sum of the unencrypted partial values of the selected at least one response message is according to a requirement of the target value;
instructions for receiving, by the distributed smart contract function, an indication of a validation for the selected at least one response message from corresponding responding client terminals,
wherein each of the corresponding responding client terminals independently validates the selected at least one response by client code locally stored thereon executed by processor resources of the respective corresponding responding client terminal according to all partial values and all unencrypted parameters associated with all of the selected at least one response message; and
in response to the received indication of validation of the selected at least one response message from the corresponding responding client terminals, creating a new block for storage in the blockchain, wherein the new block stores, for each of the selected at least one response messages from corresponding responding client terminals providing the indication of validation, the address of the respective responding client terminal, the partial amount, and the unencrypted parameter, wherein the new block is stored in a data storage device accessible to a third client terminal over the network.

### Claim 31 (depends on 1)

The system of claim 1, wherein the distributed smart contract function collects and stores the response messages until the sum of the unencrypted partial values of the response messages reaches and/or is above the threshold, wherein the threshold is set as a requirement of the unencrypted target value provided by the initiator client terminal.

### Claim 32 (depends on 1)

The system of claim 1, wherein the parameter is encrypted with non-deterministic encryption.
