Policy-Based Smart Contract Generation for Security
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Blockchain-based smart contracts face issues such as re-entry problems, transaction order issues, timestamp dependency problems, overflow problems, and significant information exposure, which hinder their construction and make them vulnerable to external malicious attacks.
Innovation Solution
A policy-based smart contract generation method and apparatus that parses and verifies smart contract information using a first and second parsing module, generates a smart contract template, and combines it with policy information to prevent errors and malicious attacks, employing a state diagram for verification.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If smart contract is written directly in programming language by developer or user, then contract execution automation is improved, but security vulnerabilities increase due to re-entry problems, transaction order problems, timestamp dependency problems, overflow problems, and information exposure problems
Solution Approach 1:
The patent applies preliminary action by introducing a policy verification step before smart contract execution. The system parses smart contract information to obtain basic information and policy information, verifies the policy information against predefined policies, and only then executes the contract. This preliminary verification prevents security vulnerabilities like re-entry problems, transaction order problems, timestamp dependency problems, overflow problems, and information exposure problems from occurring during contract execution.
Solution Approach 2:
The patent introduces policy information as an intermediary layer between the smart contract code and its execution. The policy information acts as a mediator that verifies contract parameters and execution conditions before the contract is executed on the blockchain. This intermediary verification mechanism separates the contract writing process from the execution process, allowing security checks without compromising automation.
2Reliability
If policy verification process is added to smart contract generation, then contract security is improved, but system complexity increases due to multiple parsing modules and verification steps
Solution Approach 1:
The patent applies segmentation by dividing the smart contract processing system into distinct functional modules: a first parsing module that extracts basic information and policy information from smart contract input, a verification module that checks policy information against predefined policies, and a contract generation module that creates the final smart contract. This modular segmentation manages complexity by organizing verification functions into separate, manageable components rather than a monolithic system.
Data Source
AI summary
The present invention prevents an error of a blockchain-based smart contract and an error occurring in a process of cooperating with a conventional smart contract and uses a smart contract template, thereby enhancing convenience in writing a smart contract.


