IP Library Granted Patent US 12682120
Granted Patent B2
US 12682120 · App. 18/817,633 · Granted Jul 14, 2026

Apparatus and method for obfuscation

Inventors: Kyungdong Kim (Seoul, KR); Sungyup Nam (Seoul, KR)
Assignee: 78Researchlab Inc.
G06F21/64G06F21/54G06F2221/033
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12682120
App. No.
18/817,633
Granted
Jul 14, 2026
Kind
B2
Abstract

Proposed are an apparatus and method for obfuscating a smart contract. The apparatus for obfuscating a smart contract includes: memory; and a controller configured to, when obtaining a first smart contract, generate a second smart contract by obfuscating at least part of the first smart contract, to generate a third smart contract based on the first smart contract, and to register the second and third smart contracts on a blockchain network. Meanwhile, the embodiments disclosed herein are the technology developed through “BlueBears: Enhanced Security Armor Service for Robust Smart-contract” of the 2023 Fintech Blockchain Technology Commercialization Support Project (FB230059) sponsored by the Seoul Business Agency of the Seoul Metropolitan Government.

Claims (28)

1 . An apparatus for smart contract obfuscation, the apparatus comprising:

a memory to store a program for performing a smart contract obfuscation method; and

a controller comprising at least one processor configured to execute instructions stored in the memory to:

obtain a first smart contract;

parse a Solidity source code of the first smart contract to generate an abstract syntax tree (AST) in a machine-readable format, identify locations of obfuscation targets including variables, functions, and expressions based on the AST, apply at least one of name-based obfuscation and control-flow obfuscation to the identified locations while automatically compiling the first smart contract and rolling back an obfuscation causing a compilation error, thereby generating a second smart contract by obfuscating at least part of the first smart contract;

extract execution-related source codes from the first smart contract, convert the extracted execution-related source codes into callable functions, and generate a third smart contract configured to be invoked by the second smart contract during execution; and

register the second smart contract and the third smart contract on a blockchain network.

2 . The apparatus of claim 1 , wherein the controller generates the second smart contract by obfuscating at least part of a source code corresponding to the first smart contract.

3 . The apparatus of claim 1 , wherein the controller generates the second smart contract by obfuscating at least part of a byte code obtained by compiling the first smart contract.

4 . The apparatus of claim 1 , wherein the controller generates the second smart contract by obfuscating at least part of a source code corresponding to the first smart contract and obfuscating at least part of a byte code obtained by compiling the obfuscated source code.

5 . The apparatus of claim 1 , wherein the controller generates a third smart contract by extracting part of the first smart contract, the controller generating the third smart contract that is called when the second smart contract is executed.

6 . The apparatus of claim 1 , wherein the controller extracts part of a source code of the first smart contract, and inserts a function corresponding to the extracted source code into a location at which the source code has been extracted.

7 . The apparatus of claim 1 , wherein the controller generates a fourth smart contract based on the third smart contract and registers the fourth smart contract on the blockchain network, the controller generating the fourth smart contract that is called instead of the third smart contract when the second smart contract is executed.

8 . The apparatus of claim 7 , wherein the controller generates the fourth smart contract by adding a random formula to the third smart contract.

9 . A method for smart contract obfuscation, the method comprising:

obtaining a first smart contract;

parsing a Solidity source code of the first smart contract to generate an abstract syntax tree (AST) in a machine-readable format, identifying locations of obfuscation targets including variables, functions, and expressions based on the AST, and applying at least one of name-based obfuscation and control-flow obfuscation to the identified locations while automatically compiling the first smart contract and rolling back an obfuscation causing a compilation error, thereby generating a second smart contract by obfuscating at least part of the first smart contract;

extracting execution-related source codes from the first smart contract, converting the extracted execution-related source codes into callable functions, and generating a third smart contract configured to be invoked by the second smart contract during execution; and

registering the second smart contract and the third smart contract on a blockchain network.

10 . The method of claim 9 , wherein generating the second smart contract comprises generating the second smart contract by obfuscating at least part of a source code corresponding to the first smart contract.

11 . The method of claim 9 , wherein generating the second smart contract comprises generating the second smart contract by obfuscating at least part of a source code corresponding to the first smart contract and obfuscating at least part of a byte code obtained by compiling the obfuscated source code.

12 . The method of claim 9 , wherein generating the third smart contract comprises generating the third smart contract by extracting part of the first smart contract, the third smart contract being called when the second smart contract is executed.

13 . The method of claim 9 , wherein generating the third smart contract comprises generating a fourth smart contract based on the third smart contract and registering the fourth smart contract on the blockchain network, the fourth smart contract being called instead of the third smart contract when the second smart contract is executed.

14 . A non-transitory computer-readable storage medium having stored thereon a program that, when executed by a processor, causes the processor to execute a method for smart contract obfuscation, the method comprising:

obtaining a first smart contract;

parsing a Solidity source code of the first smart contract to generate an abstract syntax tree (AST) in a machine-readable format, identifying locations of obfuscation targets including variables, functions, and expressions based on the AST, and applying at least one of name-based obfuscation and control-flow obfuscation to the identified locations while automatically compiling the first smart contract and rolling back an obfuscation causing a compilation error, thereby generating a second smart contract by obfuscating at least part of the first smart contract;

extracting execution-related source codes from the first smart contract, converting the extracted execution-related source codes into callable functions, and generating a third smart contract configured to be invoked by the second smart contract during execution; and

registering the second smart contract and the third smart contract on a blockchain network.