Smart Contract Transaction Security via Protection Condition Checks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Smart contracts on blockchain are susceptible to security risks due to Transaction-Ordering Dependence (TOD), which can lead to unauthorized asset transfers and unexpected outcomes, as the ordering of transactions affects the state of the smart contract, and existing solutions like batch auction and pre-submission either sacrifice execution efficiency or require consensus from both parties.

Innovation Solution

Implementing a system that includes a protection condition associated with each transaction, where the current state of the smart contract is checked against this condition before execution, ensuring that transactions are only executed if the condition is met, and returning an execution exception if it is not, thereby preventing unauthorized transfers and maintaining execution efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If batch auction or pre-submission solutions are used to prevent TOD attacks, then security is improved, but execution efficiency is sacrificed

Engineering Contradiction:
ImprovesecurityVSAvoidexecution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary actions by checking execution conditions and determining transaction validity before transactions are executed on the blockchain. The node determines whether to execute a transaction based on protection conditions associated with the transaction and the current state of smart contracts, preventing TOD attacks without requiring batch auction or pre-submission mechanisms that sacrifice execution efficiency.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If transaction ordering is changed to prevent TOD attacks, then security is improved, but transaction processing complexity increases

Engineering Contradiction:
ImprovesecurityVSAvoidtransaction processing complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Each transaction carries its own protection conditions that automatically determine its executability. The system evaluates these self-contained conditions without requiring complex reordering or consensus mechanisms. The transaction itself provides the information needed to determine its execution status, simplifying the processing complexity while maintaining security.

Inventive Principle:
Principle #25Self-service

3Reliability

If protection conditions are checked for each transaction, then unauthorized transfers are prevented, but processing time increases

Engineering Contradiction:
ImprovesecurityVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system extracts and evaluates only the essential protection conditions associated with each transaction against the current smart contract state. By focusing on the specific conditions relevant to each transaction rather than comprehensive verification, the system prevents unauthorized transfers while minimizing processing time overhead.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11138597B2System and method for improving security of smart contract on blockchain
Publication Date: 2021.10.05 ADVANCED NEW TECHNOLOGIES CO LTD
  • US11138597B2 patent drawing
  • US11138597B2 patent drawing
  • US11138597B2 patent drawing

AI summary

A computer-implemented method for improving security of smart contract comprises: obtaining a first and a second transactions both invoking a smart contract, wherein the first transaction is associated with a protection condition; executing the second transaction and updating a current state of the smart contract; determining whether the updated current state of the smart contract satisfies the protection condition; in response to determining that the updated current state satisfies the protection condition, executing the first transaction, and recording the second and the first transactions into a data block for adding to a blockchain; and in response to determining that the updated current state does not satisfy the protection condition, recording the second transaction into another data block for adding to the blockchain, without executing the first transaction.