Dynamic NFT updating method and system based on distributed oracle machine

Through the combination of distributed oracles and smart contracts, off-chain computing and multi-node consistency protocols are used to solve the single point of failure and high token overhead problems in dynamic NFT updates, and achieve safe and efficient dynamic NFT updates.

CN118585218APending Publication Date: 2024-09-03ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410652422.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Dynamic NFTs are prone to single points of failure and high token overhead when updating, and relying on centralized oracles poses security risks and unreliable data sources.

Method used

Using distributed oracle machines and smart contracts, through off-chain computing technology, users register and configure event triggers in the distributed oracle machine, generate the update.sol contract, and use multiple oracle machine nodes to verify and sign data through the consistency protocol , only perform necessary update operations on the blockchain to avoid single points of failure and high token consumption.

Benefits of technology

It improves the security and usability of dynamic NFT updates, reduces the computational load on the blockchain, reduces token overhead, and enables efficient NFT dynamic updates through decentralization and off-chain computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585218A
    Figure CN118585218A
Patent Text Reader

Abstract

The invention relates to a dynamic NFT updating method and system based on a distributed oracle machine, and the method comprises the steps: firstly registering and configuring a triggering condition and a verification method of an NFT updating event in a distributed oracle machine network, and then monitoring an external API (Application Program Interface) through an event trigger until the condition is triggered, reading the data and verifying the data according to a method of customizing the smart contract by a user; and finally, updating the dynamic NFT by the dynamic NFT block chain according to the execution logic of the smart contract. According to the dynamic NFT updating device based on the distributed oracle machine, safe and efficient NFT dynamic updating is achieved through decentration and under-chain calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of blockchain, smart contracts and oracle, and in particular to a dynamic NFT update method and system based on distributed oracle Background Art

[0002] NFT (Non-Fungible Token) is a digital asset based on blockchain technology. Because of its encryption characteristics, uniqueness, indivisibility, transferability and encryption protection, it can be used as ownership certification related to digital assets. NFT is traded on the blockchain and has a unique digital representation, so NFT transactions are decentralized, transparent and traceable.

[0003] Dynamic NFTs are non-fungible tokens that can be automatically updated based on specific conditions or events. Unlike static NFTs, dynamic NFTs are variable and interactive, allowing them to respond to changes in the external environment or interactive behaviors. Changes in dynamic NFTs can be based on a variety of conditions, such as time, user behavior, market data, external events, etc. When these conditions are met, dynamic NFTs can automatically update their status, images, attributes, or other related information, which allows dynamic NFTs to present a more vivid and diverse experience, increasing their application potential in digital art, games, virtual reality and other fields.

[0004] Although the development of dynamic NFTs has promoted the entire art market, there are still some risks that cannot be ignored. Changes in dynamic NFTs usually rely on external data sources or event triggers. If the data source is wrong, tampered or unreliable, it may cause inaccuracy or misleading dynamic NFTs. Some dynamic NFTs may need to rely on specific platforms or services for updates or interactions. If these platforms fail, shut down or are attacked, the functionality and availability of dynamic NFTs will be affected. The public bounty mechanism incentivizes external developers or individuals to develop the project through rewards. The bounty is usually announced publicly and anyone can participate. Public bounties may attract a variety of participants, including malicious actors who try to exploit vulnerabilities, which brings huge risks. Therefore, the system needs a secure and reliable oracle to introduce external data. However, if a centralized oracle is used to update NFTs, there will be single points of failure, network resource limitations and security risks. In addition, the update of some dynamic NFTs is real-time, and it is necessary to constantly monitor external data and make judgments. If these processes are performed on the blockchain where the NFT is located, a large number of tokens will be consumed. Summary of the invention

[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method and device that can deal with the problems of single point failure and high token overhead during dynamic NFT updates. Based on distributed oracles and smart contracts, the present invention provides a dynamic NFT update method and device through off-chain computing technology.

[0006] According to a first aspect of an embodiment of the present application, a dynamic NFT update method based on a distributed oracle is provided, the method comprising the following steps:

[0007] S1: The user completes registration in the distributed oracle, configures user information and event trigger information, etc.

[0008] S2: The user creates the update.sol smart contract file in the blockchain where the dynamic NFT is located. The update contract includes the checkUpkeep function and the performUpkeep function.

[0009] S3: The event trigger monitors the data source and transmits the data to the distributed oracle. The distributed oracle periodically verifies the data. If the verification passes, the distributed oracle generates a report based on the data and signs it, and then calls the performUpkeep function to achieve the effect of updating the dynamic NFT.

[0010] Furthermore, the process of step S1 is as follows:

[0011] S11: The user configures the user name user_name, update interval update_interval, reserved funds money_reserve, contract name upKeep_name, contract address upKeep_address, etc. in the distributed oracle. The update interval determines the frequency of the distributed oracle to verify the data transmitted from the event trigger; the reserved funds are used to pay the token commission of the distributed oracle. When the reserved funds are insufficient to initiate an interface call, the distributed oracle stops providing services; the contract name and contract address are recorded in the distributed oracle and managed by it.

[0012] S12: After registration is completed, the user obtains the unique Forwarder.sol contract address forwarder_address managed by the distributed oracle. forwarder_address is recorded in the Registry registration contract of the oracle network and is also recorded by the user personally. When the oracle network needs to call the update contract, the Registry contract will find the Forwarder.sol contract file according to the forwarder_address address and execute the method to call the update contract.

[0013] S13: The user selects a corresponding trigger according to the type of event triggering. The trigger types include log trigger, time trigger, data stream trigger, etc.

[0014] Furthermore, the process of step S2 is as follows:

[0015] S21: The user creates an update.sol contract file on the NFT blockchain network and constructs a checkUpkeep function, which accepts the data provided by the event trigger as input and returns a Boolean value upkeepNeeded, indicating whether the data passes the verification required by the user, as well as a performData data required to perform dynamic NFT updates.

[0016] S22: The user builds the performUpkeep function in the update contract. This function needs to verify the data sender address msg.sender. The function will only execute subsequent logic when msg.sender is consistent with forwarder_address. This function contains the logic required to perform dynamic NFT modification.

[0017] Furthermore, the process of step S3 is as follows:

[0018] S31: The event trigger monitors the data source data and transmits the data to the distributed oracle regularly.

[0019] S32: The oracle network receives the data from the event trigger and verifies the data according to the checkUpkeep function. The verification result is the Boolean value upkeepNeeded and the data performData required to update the dynamic NFT. If upkeepNeeded is true, multiple oracle nodes jointly sign the protocol to generate an update request report msg_report, which contains performData. Then, according to the performUpkeep function of the blockchain network update contract, msg_report and msg_address are passed as parameters, where msg_address is the address jointly held by the user and the blockchain network.

[0020] forwarder_address.

[0021] S33: The blockchain network where the NFT is located receives the data and verifies whether the parameter msg_address is consistent with the locally saved address forwarder_address. If they are consistent, parse msg_report, obtain the performData therein, continue to execute the perfromUpkeep function, update the dynamic NFT and synchronize the results to the blockchain.

[0022] According to a second aspect of an embodiment of the present application, a dynamic NFT update system based on a distributed oracle is provided, characterized in that the system includes the following modules:

[0023] Event trigger module: obtains data from the data source and inputs the data into the distributed oracle network module after permission verification.

[0024] Distributed Oracle Module: This module consists of multiple oracles and smart contracts. Multiple oracle nodes are composed of a consistency protocol, which processes the data, calls the judgment function of the update contract, and calls the execution function of the update contract when the result passes. This module includes the following contracts: the registration contract Registry, and the security verification contract forwarderAddress. The registration contract is used to record all registered update contracts and all oracle nodes that can execute tasks; the security verification contract can verify whether the execution logic is called by an authorized entity in the automation system, which helps prevent unauthorized access to the network and ensures that only registered and approved entities can trigger update tasks.

[0025] NFT blockchain module: This module contains the update.sol contract file created by the user and the NFT blockchain network. The checkUpkeep function in the update contract contains the logic for verifying and checking the data of the event trigger; the perfromUpkeep function contains the logic for executing dynamic NFT updates and synchronizing the results to the blockchain network.

[0026] Furthermore, according to an embodiment of the present application, a dynamic NFT update system based on a distributed oracle is provided, characterized in that the NFT blockchain module includes a checkUpkeep function, which enables the system to verify the data transmitted by the trigger module outside the NFT blockchain chain, thereby avoiding a large amount of calculations that consume tokens, and only passing the minimum data required for dynamic NFT modification to the NFT blockchain chain.

[0027] Further, according to an embodiment of the present application, a dynamic NFT update system based on a distributed oracle is characterized in that the distributed oracle module includes multiple oracle nodes, and the multiple nodes are connected to a network through a consistency protocol to avoid single point failure. When the data verification is passed, the multiple nodes generate a report based on the data through a consistency protocol and sign it, and then pass the report to the NFT blockchain module. Further, according to an embodiment of the present application, a dynamic NFT update system based on a distributed oracle is characterized in that the distributed oracle module uses a Forwarder contract. The address of the Forwarder contract is recorded by the user, and its function is to connect the distributed oracle module and the update contract created by the user in the NFT blockchain module to ensure that when the performUpkeep function is called, the address of the transaction is the address of the Forwarder contract. By setting the address of the call to the update contract to the address of the Forwarder contract, the user can verify whether the performUpkeep function is called by an authorized entity in the automation system. This helps prevent unauthorized access to the performUpkeep function and ensures that only registered and approved entities can trigger update tasks.

[0028] The present invention first registers and configures the triggering conditions and verification methods of NFT update events in the distributed oracle network, then uses event triggers to monitor external APIs until the conditions are triggered, then reads the data and verifies it according to the user-defined smart contract method, and finally the dynamic NFT blockchain updates the dynamic NFT according to the execution logic of the smart contract. The present invention proposes to achieve safe and efficient dynamic updates of NFTs through decentralization and off-chain computing.

[0029] The beneficial effects of the present invention are as follows:

[0030] 1. Distributed oracles perform update tasks in a trust-minimizing manner, allowing smart contracts to execute as expected without being manipulated by any external entity, greatly improving security. At the same time, distributed networks avoid single points of failure and have strong availability.

[0031] 2. Smart contracts implement the following functions in this system: distributed oracle task execution, maintenance and update, security verification, event triggering and response, which enhances the credibility and security of the system.

[0032] 3. Perform complex and token-intensive calculations off-chain, and only pass the minimum data required for dynamic NFT modification to the blockchain network, reducing token expenses and efficiently utilizing on-chain resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1This is a system architecture diagram of a dynamic NFT update method and system based on a distributed oracle described in an embodiment of the present invention.

[0034] Figure 2 This is a flow chart of user registration in a distributed oracle network in a dynamic NFT update method and system based on a distributed oracle according to an embodiment of the present invention.

[0035] Figure 3 It is a flowchart of judging the NFT update status outside the NFT blockchain in a dynamic NFT update method and system based on a distributed oracle as described in an embodiment of the present invention.

[0036] Figure 4 It is a flowchart of performing NFT update operations on the chain in a dynamic NFT update method and system based on a distributed oracle as described in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will provide a clear and complete explanation of the technical solution in this embodiment in conjunction with the accompanying drawings in this embodiment:

[0038] Example 1

[0039] This embodiment relates to a dynamic NFT update system based on a distributed oracle, such as Figure 1 As shown, it includes the following modules:

[0040] Event trigger module: obtains data from the data source and inputs the data into the distributed oracle network module after permission verification.

[0041] Distributed Oracle Module: This module contains smart contracts and multiple oracle nodes. Multiple oracles are composed of a consensus protocol to process and verify the data. If the verification is successful, multiple oracle nodes will jointly generate a report and sign it according to the protocol, and then call the update method of the update contract in the NFT blockchain module. Smart contracts manage user registration information and execute the logic before dynamic NFT updates.

[0042] NFT blockchain module: This module contains the update.sol contract file created by the user and the NFT blockchain network. The checkUpkeep function in the update contract contains the logic for verifying and checking the data of the event trigger; the perfromUpkeep function contains the logic for executing dynamic NFT updates and synchronizing the results to the blockchain network.

[0043] The NFT blockchain module includes a checkUpkeep function, which allows the system to verify the data passed by the trigger module outside the NFT blockchain, avoiding the calculation of a large amount of token consumption and only passing the minimum data required for dynamic NFT modification to the NFT blockchain.

[0044] The distributed oracle module includes multiple oracle nodes, which are connected into a network through a consistency protocol to avoid single point failure. When the data is verified, multiple nodes generate and sign a report based on the data through a consistency protocol, and then pass the report to the NFT blockchain module.

[0045] Furthermore, according to an embodiment of the present application, a dynamic NFT update system based on a distributed oracle is characterized in that the distributed oracle module uses a Forwarder contract. The address of the Forwarder contract is recorded by the user, and its function is to connect the distributed oracle module and the update contract created by the user in the NFT blockchain module to ensure that when the performUpkeep function is called, the address initiating the transaction is the address of the Forwarder contract. By setting the address of the call to the update contract to the address of the Forwarder contract, the user can verify whether the performUpkeep function is called by an authorized entity in the automation system. This helps prevent unauthorized access to the performUpkeep function and ensures that only registered and approved entities can trigger update tasks.

[0046] Example 2

[0047] This embodiment relates to a dynamic NFT update method based on a distributed oracle, including the following steps:

[0048] S1: The user completes registration in the distributed oracle, configures user information and event trigger information, etc.

[0049] S2: The user creates an update.sol smart contract in the blockchain where the dynamic NFT is located. The update.sol contract includes the checkUpkeep function and the performUpkeep function.

[0050] S3: The event trigger monitors the data source and transmits the data to the distributed oracle. The distributed oracle periodically verifies the data. If the verification passes, the distributed oracle generates a report based on the data and signs it, and then calls the performUpkeep function to achieve the effect of updating the dynamic NFT in the blockchain network where the NFT is located.

[0051] like Figure 2 The stage S1 comprises the following steps:

[0052] S11: The user configures the user name user_name, update interval update_interval, reserved funds money_reserve, contract name upKeep_name, contract address upKeep_address, etc. in the distributed oracle. The update interval determines the frequency of the distributed oracle to verify the data transmitted from the event trigger; the reserved funds are used to pay the token commission of the distributed oracle. When the reserved funds are insufficient to initiate an interface call, the distributed oracle stops providing services; the contract name and contract address are recorded in the distributed oracle and managed by it.

[0053] S12: The user obtains the unique Forwarder.sol contract address forwarder_address, and uses the signature and other authorization mechanisms to authorize the Forwarder contract address to the distributed oracle network. The forwarder_address is recorded in the Registry registration contract of the oracle network and is also recorded by the user personally. When the oracle network needs to call the update.sol contract, the Registry registration contract will find the Forwarder.sol contract file according to the forwarder_address address and execute the method to call the update.sol contract.

[0054] S13: Configure the listener module and select the appropriate event trigger according to the data source type. The optional event triggers include time triggers, log triggers, and data stream triggers. For example, you can select a time trigger and decide to trigger the listener every 5 minutes based on a CRON expression, such as 0 0 / 5***?. The event trigger contains a count and a simple count contract. Each time the listener is triggered, the user-specified number is added to the count.

[0055] The stage S2 comprises the following steps:

[0056] S21: First, the user enters the configuration information and calls the registerUpkeep method of the registration contract. If the registration is successful, the upkeepID can be obtained as the unique identifier of the update contract. The user creates the update.sol contract based on the upkeepID and constructs the checkUpkeep function. This function accepts the data provided by the event trigger as input and returns a Boolean value upkeepNeeded, indicating whether the data needs to pass the verification required by the user, and a performData data required to perform dynamic NFT updates.

[0057] S22: The user builds the performUpkeep function in the update.sol contract. This function needs to verify the data sender address msg.sender. The function will only execute subsequent logic when msg.sender is consistent with forwarder_address. This function contains the logic required to perform dynamic NFT modification.

[0058] The stage S3 comprises the following steps:

[0059] S31: Figure 3 As shown, the event trigger obtains data from the data source and inputs the data into the distributed oracle network module after processing.

[0060] S32: Figure 3 As shown, the distributed oracle network collects data generated by event triggers, and the checkUpkeep function of the update contract in the NFT blockchain network verifies the data. If the contract status fails, for example, the number of tokens of the user is less than the number of tokens required for the current task, the distributed oracle network stops executing the user contract and the process terminates; if the data verification fails, the process enters a waiting state until the distributed oracle network processes the data generated by the event trigger again after the updateInterval time. After verification, the checkUpkeep function updates the state of the contract, including the timestamp of the current task and the number of tokens, and returns a Boolean value upkeepNeeded, indicating whether the data needs to pass the verification required by the user, and a performData data required to perform dynamic NFT updates. As shown, the distributed oracle network obtains Needed and perfromData after verification by the checkUpkeep function. If upkeepNeeded is true, as shown Figure 4 As shown, multiple oracle nodes reach a consensus through the protocol and generate a report. The report contains perfromData data and multiple nodes' signatures on the report. Finally, the distributed oracle network calls the Forwarder contract and sends the report to the NFT blockchain network.

[0061] S33: Figure 4 As shown, the NFT blockchain network first determines whether the caller's address msg.sender is consistent with the forwarderAddress. If the results are consistent, the perfromUpkeep function logic is executed to update the dynamic NFT data and synchronize the updated results to the blockchain network.

[0062] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A dynamic NFT update method based on a distributed oracle, comprising the following steps: S1: The user completes registration in the distributed oracle and configures user information and event trigger information; S2: The user creates the update.sol smart contract file in the blockchain where the dynamic NFT is located. The update contract includes the checkUpkeep function and the performUpkeep function; S3: The event trigger listens to the data source and transmits the data to the distributed oracle; the distributed oracle periodically verifies the data. If the verification passes, the distributed oracle generates a report based on the data and signs it, and then calls the performUpkeep function to achieve the effect of updating the dynamic NFT.

2. A dynamic NFT update method based on a distributed oracle, characterized in that: Step S1 specifically includes: S11: The user configures the user name user_name, update interval update_interval, reserved funds money_reserve, contract name upKeep_name, contract address upKeep_address, etc. in the distributed oracle; the update interval determines the frequency of the distributed oracle verifying the data transmitted from the event trigger; the reserved funds are used to pay the token commission of the distributed oracle. When the reserved funds are insufficient to initiate an interface call, the distributed oracle stops providing services; the contract name and contract address are recorded in the distributed oracle and managed by it; S12: After registration is completed, the user obtains the unique Forwarder.sol contract address forwarder_address managed by the distributed oracle. forwarder_address is recorded in the Registry registration contract of the oracle network and is also recorded by the user personally. When the oracle network needs to call the update contract, the Registry contract will find the Forwarder.sol contract file according to the forwarder_address address and execute the method to call the update contract. S13: The user selects a corresponding trigger according to the type of event triggering. The trigger types include log trigger, time trigger, and data stream trigger.

3. A dynamic NFT update method based on a distributed oracle, characterized in that: Step S2 specifically includes: S21: The user creates the update.sol contract file on the NFT blockchain network and constructs the checkUpkeep function, which accepts the data provided by the event trigger as input and returns a Boolean value upkeepNeeded, indicating whether the data passes the verification required by the user, and a performData data required to perform dynamic NFT updates; S22: The user constructs the performUpkeep function in the update contract; this function needs to verify the data sender address msg.sender, and the function will execute subsequent logic only when msg.sender is consistent with forwarder_address; this function contains the logic required to perform dynamic NFT modifications.

4. A dynamic NFT update method based on a distributed oracle, characterized in that: Step S3 specifically includes: S31: Event triggers monitor data from the data source and transmit data to the distributed oracle regularly; S32: The oracle network receives the data passed by the event trigger and verifies the data according to the checkUpkeep function. The verification result is the Boolean value upkeepNeeded and the data performData required to update the dynamic NFT; if upkeepNeeded is true, multiple oracle nodes jointly sign the protocol to generate an update request report msg_report, which contains performData; then according to the performUpkeep function of the blockchain network update contract, msg_report and msg_address are passed as parameters, where msg_address is the address forwarder_address jointly held by the user and the blockchain network; S33: The blockchain network where the NFT is located receives the data and verifies whether the parameter msg_address is consistent with the locally saved address forwarder_address. If they are consistent, parse msg_report, obtain the performData therein, continue to execute the perfromUpkeep function, update the dynamic NFT and synchronize the results to the blockchain.

5. A dynamic NFT update system based on distributed oracle, characterized in that: include: Event trigger module: obtains data from the data source and inputs the data into the distributed oracle network module after authority verification; Distributed Oracle Module: This module consists of multiple oracles and smart contracts; multiple oracle nodes are composed of a consistency protocol, process data, call the judgment function of the update contract, and call the execution function of the update contract when the result passes; This module includes the following contracts: registration contract Registry, security verification contract forwarderAddress; The registration contract is used to record all registered update contracts and all oracle nodes that can execute tasks; The security verification contract verifies whether the execution logic is called by an authorized entity in the automation system, which helps prevent unauthorized access to the network and ensures that only registered and approved entities can trigger update tasks; NFT blockchain module: This module contains the update.sol contract file created by the user and the NFT blockchain network; the checkUpkeep function in the update contract contains the logic for verifying and checking the data of the event trigger; the perfromUpkeep function contains the logic for executing dynamic NFT updates and synchronizing the results to the blockchain network.

6. A dynamic NFT update system based on a distributed oracle as claimed in claim 5, characterized in that: The NFT blockchain module includes a checkUpkeep function, which enables the system to verify the data passed by the trigger module outside the NFT blockchain chain, avoiding the calculation of a large amount of token consumption, and only passing the minimum data required for dynamic NFT modification to the NFT blockchain chain.

7. A dynamic NFT update system based on a distributed oracle as claimed in claim 5, characterized in that: The distributed oracle module includes multiple oracle nodes, and the multiple nodes are connected into a network through a consistency protocol to avoid single point failure; when the data verification passes, the multiple nodes generate and sign a report based on the data through the consistency protocol, and then pass the report to the NFT blockchain module.

8. A dynamic NFT update system based on a distributed oracle as claimed in claim 5, characterized in that: The distributed oracle module uses the Forwarder contract; the address of the Forwarder contract is recorded by the user, and its function is to connect the distributed oracle module and the update contract created by the user in the NFT blockchain module to ensure that when the performUpkeep function is called, the address initiating the transaction is the address of the Forwarder contract; by setting the address of calling the update contract to the address of the Forwarder contract, the user verifies whether the performUpkeep function is called by an authorized entity in the automation system.