Price anchoring method and device based on automatic market maker and computer equipment

By adjusting the amount of digital resources in the liquidity pool based on the off-chain value reported by oracles, the problem of AMM price decoupling is solved, and the resources in the liquidity pool are anchored to real-world prices, thereby improving liquidity and resource utilization efficiency.

CN121616345APending Publication Date: 2026-03-06HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511812308.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Traditional Automated Market Makers (AMMs) lack the ability to perceive real-world asset prices on the blockchain, causing prices to deviate from their anchor, which can easily lead to frequent arbitrage and impermanent loss, affecting liquidity.

Method used

By receiving off-chain value reported periodically by oracles, the amount of digital resources in the liquidity pool is adjusted to align with real-world prices, and resources in the yield pool are transferred to the liquidity pool when conditions are met, thus achieving price anchoring and resource circulation.

Benefits of technology

By forcing the digital resources in the liquidity pool to align with their off-chain value, the risk-free arbitrage opportunity is eliminated, resource utilization efficiency and returns for liquidity providers are improved, and price stability and liquidity are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616345A_ABST
    Figure CN121616345A_ABST
Patent Text Reader

Abstract

The invention relates to a price anchoring method and device based on an automatic market maker and computer equipment. The method comprises the following steps: receiving an off-chain value periodically reported by an oracle machine; the under-chain value is used for representing the real world price of the digital resource in the mobility pool; the digital resources comprise a first digital resource and a second digital resource which form a transaction pair; determining an initial number of digital resources in the mobility pool; based on the under-chain value and the initial number, transferring a part of the number of one digital resource in the mobility pool to a revenue library, so that the price in the mobility pool is the same as the under-chain value; and when a preset condition is met, transferring the digital resources in the income library into the mobility pool, thereby solving the problem that the AMM price is out of anchoring, forcibly enabling the digital resource composition in the pool to be aligned to the value under the chain, assisting the digital resources in forward circulation through the income library, and ensuring the mobility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to a price anchoring method, apparatus, and computer equipment based on automated market makers. Background Technology

[0002] Automated Market Makers (AMMs) are a core technology in decentralized finance (DeFi). They use smart contracts to build liquidity pools, allowing users to trade assets without a traditional order book. Liquidity Providers (LPs) deposit two assets into the pool in a specific ratio, and the trading price is determined by the real-time ratio of the assets in the pool. This mechanism enables permissionless, 24 / 7 automated trading, helping to improve trading efficiency and mitigate centralized risks.

[0003] However, traditional AMMs rely entirely on on-chain supply and demand for pricing, lacking the ability to perceive external real market prices. This is especially true in scenarios involving Real World Assets (RWAs), where the value of RWAs is typically determined by off-chain economic activities, cash flows, or valuation models, and their fair price cannot be naturally formed through on-chain trading volume. This leads to a disconnect between RWA prices within AMM pools and the real market, easily triggering frequent arbitrage and impermanent loss risks, thus hindering on-chain liquidity of RWAs. Summary of the Invention

[0004] This embodiment provides a price anchoring method, apparatus, and computer equipment based on automated market makers to solve the problem of price decoupling of digital resources on the blockchain in related technologies.

[0005] Firstly, this embodiment provides a price anchoring method based on an automated market maker, the method comprising:

[0006] Receive off-chain value reported periodically by oracles; the off-chain value is used to characterize the real-world price of digital resources within the liquidity pool; the digital resources include a first digital resource and a second digital resource constituting the trading pair;

[0007] Determine the initial quantity of digital resources within the liquidity pool;

[0008] Based on the off-chain value and the initial quantity, a portion of a digital resource in the liquidity pool is transferred to the yield pool so that the price in the liquidity pool is the same as the off-chain value.

[0009] When preset conditions are met, the digital resources in the revenue pool are transferred to the liquidity pool.

[0010] In some embodiments, based on the off-chain value and the initial quantity, a portion of a digital resource within the liquidity pool is transferred to the yield pool to make the price within the liquidity pool equal to the off-chain value, including:

[0011] The initial exchange price of the first digital resource is determined based on the initial quantity;

[0012] Based on the off-chain value corresponding to the first digital resource and the initial exchange price, determine the type and excess quantity of the excess digital resource in the liquidity pool;

[0013] The excess digital resource of one type is exchanged for another digital resource in the liquidity pool based on the off-chain value and the excess quantity; and the exchanged digital resource is stored in the yield vault.

[0014] In some embodiments, based on the off-chain value corresponding to the first digital resource and the initial exchange price, the type and quantity of excess digital resources in the liquidity pool are determined, including:

[0015] If the off-chain value of the first digital resource is greater than the initial exchange price of the first digital resource, then the current holding quantity of the first digital resource is calculated based on the off-chain value of the first digital resource and the initial quantity of the second digital resource; and the excess quantity of the first digital resource is calculated based on the current holding quantity and the initial quantity of the first digital resource.

[0016] If the off-chain value of the first digital resource is less than the initial exchange price of the first digital resource, then the current holding quantity of the second digital resource is calculated based on the off-chain value of the first digital resource and the initial quantity of the first digital resource; and the excess quantity of the second digital resource is calculated based on the current holding quantity and the initial quantity of the second digital resource.

[0017] In some embodiments, the method further includes:

[0018] Create a liquidity pool based on the constant product formula;

[0019] Identify two digital resources as a trading pair and determine the initial liquidity of each digital resource;

[0020] Based on the initial liquidity amount, two types of digital resources are transferred to the liquidity pool, and the product value of the constant product formula is determined;

[0021] Execute the transaction operation based on the constant product formula.

[0022] In some of these embodiments, determining the initial flow quantities of the two digital resources includes:

[0023] The current fair value of the digital resource is obtained based on the oracle;

[0024] The initial flow quantities of the two digital resources are determined based on their current fair value.

[0025] In some embodiments, when preset conditions are met, the digital resources in the revenue pool are transferred to the liquidity pool, including:

[0026] When preset conditions are met, the latest off-chain value of the digital resource is obtained;

[0027] Based on the latest off-chain value, the digital resources in the yield pool are transferred to the liquidity pool.

[0028] In some of these embodiments, receiving off-chain value periodically reported by the oracle includes:

[0029] Receive off-chain data periodically reported by oracles;

[0030] Verify the validity of the off-chain data;

[0031] The off-chain value is derived based on the verified and valid off-chain data.

[0032] Secondly, this embodiment provides a price anchoring device based on an automated market maker, the device comprising:

[0033] The value acquisition module is used to receive off-chain value reported periodically by the oracle; the off-chain value is used to represent the real-world price of digital resources in the liquidity pool; the digital resources include a first digital resource and a second digital resource that constitute the trading pair;

[0034] The resource determination module is used to determine the initial quantity of digital resources in the liquidity pool;

[0035] The resource recycling module is used to transfer a portion of a digital resource from the liquidity pool to the yield pool based on the off-chain value and the initial quantity, so that the price in the liquidity pool is the same as the off-chain value.

[0036] The resource reuse module is used to transfer the digital resources in the revenue pool to the liquidity pool when preset conditions are met.

[0037] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the price anchoring method based on an automated market maker as described in the first aspect.

[0038] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the price anchoring method based on an automated market maker as described in the first aspect.

[0039] Compared with related technologies, the price anchoring method, apparatus, and computer equipment based on automated market makers (AMMs) provided in this embodiment receive off-chain value periodically reported by oracles. This off-chain value represents the real-world price of digital resources within a liquidity pool. The digital resources include a first digital resource and a second digital resource constituting a trading pair. An initial quantity of digital resources within the liquidity pool is determined. Based on the off-chain value and the initial quantity, a portion of one type of digital resource within the liquidity pool is transferred to a yield pool to make the price within the liquidity pool equal to the off-chain value. When preset conditions are met, the digital resources in the yield pool are transferred back into the liquidity pool. This solves the problem of AMM price decoupling, forces the composition of digital resources within the pool to align with the off-chain value, and ensures liquidity through a positive circulation of digital resources assisted by the yield pool.

[0040] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0041] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0042] Figure 1 This is a hardware structure block diagram of the terminal based on the price anchoring method of automatic market makers in the embodiments of this application;

[0043] Figure 2 This is a flowchart illustrating the price anchoring method based on automated market makers in the embodiments of this application;

[0044] Figure 3 This is a schematic diagram of the method for exchanging excess digital resources in an embodiment of this application;

[0045] Figure 4 This is a schematic diagram of the method for creating a liquidity pool in an embodiment of this application;

[0046] Figure 5 This is a schematic diagram of the structure of the price anchoring system based on automatic market makers in a preferred embodiment of this application;

[0047] Figure 6 This is a structural block diagram of the price anchoring device based on an automated market maker in the embodiments of this application.

[0048] Reference numerals: 102, processor; 104, memory; 106, transmission device; 108, input / output device; 61, value acquisition module; 62, resource determination module; 63, resource recycling module; 64, resource reuse module. Detailed Implementation

[0049] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0050] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.

[0051] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal based on the price anchoring method of automated market makers in this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0052] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the price anchoring method based on automated market makers in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the aforementioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0053] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0054] This embodiment provides a price anchoring method based on automatic market makers. Figure 2 This is a flowchart of the price anchoring method based on automated market makers in this embodiment, as follows: Figure 2 As shown, the process includes the following steps:

[0055] Step S210: Receive the off-chain value reported periodically by the oracle; the off-chain value is used to represent the real-world price of digital resources in the liquidity pool; the digital resources include the first digital resource and the second digital resource that constitute the trading pair.

[0056] Specifically, liquidity providers deposit digital resources into liquidity pools for users to trade based on the Automated Market Maker (AMM) model. These digital resources can be Real World Assets (RWAs), which are traditional financial or physical assets tokenized through blockchain technology, such as real estate and commodities, or stablecoins and fiat digital currencies issued through blockchain.

[0057] Blockchain itself is a closed system, and smart contracts cannot directly access external data. Oracles act as data bridges between the blockchain and the external world (real-world data or off-chain systems). They are typically responsible for securely and reliably transmitting off-chain information (such as prices, weather, event outcomes, etc.) to on-chain smart contracts, or outputting on-chain data to external systems. In this embodiment, the oracle is used to monitor the real-world prices of digital resources in real time.

[0058] Step S220: Determine the initial amount of digital resources in the liquidity pool.

[0059] Specifically, steps S210 and S220 can be executed simultaneously, meaning that off-chain value is received based on a preset period, and the initial quantity of digital resources in the liquidity pool is determined based on the same period. Alternatively, step S210 can trigger step S220, meaning that after receiving data reported by the receiving oracle, the initial quantity of digital resources in the liquidity pool is calculated. The specific implementation method is not limited in this embodiment and can be set according to the actual situation.

[0060] Step S230: Based on the off-chain value and the initial quantity, a portion of a digital resource in the liquidity pool is transferred to the yield pool so that the price in the liquidity pool is the same as the off-chain value.

[0061] Specifically, liquidity pools are priced based on constant product or constant sum rules. Based on the initial quantities of the first and second digital resources, their current exchange ratio, i.e., their prices within the liquidity pool (pool prices), can be determined. Taking one as the target digital resource, its pool price is compared to its off-chain value. If the off-chain value is higher, the target digital resource has appreciated; conversely, if the off-chain value is lower, it has depreciated. Appreciation or depreciation triggers a rebalancing mechanism to anchor the pool price to its off-chain value, eliminating risk-free arbitrage opportunities. The total value within the liquidity pool is V = x × P_1 + y × P_2, where x and y represent the initial quantities of the two types of digital resources, and P_1 and P_2 represent their prices. Since the values ​​of the two types of digital resources should be equal, V can be expressed as 2 × (y × P_oracle), where y represents the quantity of the target digital resource, and P_oracle represents its off-chain value. The quantities of the two digital resources are redistributed based on their off-chain value, while maintaining the total value. Therefore, in this embodiment, a certain type of digital resource is transferred out of the liquidity pool based on the redistributed quantity. This "transfer of digital resources" can be achieved through various means, such as exchanging for the corresponding digital resources via an on-chain smart contract, or directly withdrawing the corresponding digital resources; this embodiment does not impose any limitations.

[0062] Step S240: When the preset conditions are met, the digital resources in the revenue pool are transferred to the liquidity pool.

[0063] Specifically, a portion of a digital resource is transferred to the yield pool to avoid impermanent loss. In addition, digital resources in the yield pool are also used to reinvest in the liquidity pool, improving resource utilization efficiency and the overall return for liquidity providers.

[0064] In this embodiment, the system receives off-chain value reported periodically by the oracle; the off-chain value represents the real-world price of digital resources within the liquidity pool; the digital resources include a first digital resource and a second digital resource constituting a trading pair; the system determines the initial quantity of digital resources within the liquidity pool; based on the off-chain value and the initial quantity, a portion of one type of digital resource is transferred out of the liquidity pool and stored in the yield repository; when preset conditions are met, the digital resources in the yield repository are transferred back into the liquidity pool, thus solving the problem of AMM price decoupling, forcing the composition of digital resources within the pool to align with the off-chain value, and ensuring liquidity by assisting the positive circulation of digital resources through the yield repository.

[0065] In some of these embodiments, such as Figure 3As shown, step S230 above, based on the off-chain value and initial quantity, transfers a portion of a digital resource from the liquidity pool to the yield pool to make the price in the liquidity pool the same as the off-chain value. This specifically includes the following steps:

[0066] Step S231: Determine the initial exchange price of the first digital resource based on the initial quantity.

[0067] Among these, the preferred digital resource is Real World Assets (RWA), which are traditional financial or physical assets tokenized using blockchain technology. Preferably, the liquidity pool automatically prices trading pairs based on a constant product automated market maker model.

[0068] Step S232: Based on the off-chain value and initial exchange price corresponding to the first digital resource, determine the type and quantity of excess digital resources in the liquidity pool.

[0069] Specifically, based on the initial quantities of the first and second digital resources, the initial exchange price of the first digital resource, i.e., its in-pool price, can be determined. This in-pool price is then compared to its corresponding off-chain value. If the off-chain value of the first digital resource appreciates, then there is a surplus of the first digital resource. If the first digital resource depreciates, then there is a surplus of the second digital resource.

[0070] Step S233: Exchange the excess of one type of digital resource for another type of digital resource in the liquidity pool based on its off-chain value and excess quantity; and store the exchanged digital resource into the yield repository.

[0071] Specifically, when exchanging excess first digital resources for second digital resources, the calculation is based on the current off-chain value: (x - Δx) × (y' + Δy) = k', where x represents the initial quantity of second digital resources, y' represents the recalculated quantity of first digital resources to be held, Δy represents the excess quantity of first digital resources, and k' represents the off-chain value. These four parameters are known quantities, and the unknown quantity Δx can be solved, where Δx represents the exchange quantity of second digital resources. The Δx quantity of second digital resources is stored in the yield repository. Similarly, excess second digital resources can be used to exchange for first digital resources.

[0072] In this embodiment, by automatically generating market models and using off-chain value reported by oracles, the amount of redundant assets in the pool is intelligently calculated, and they are recovered through in-pool transactions, thereby achieving a rebalancing of the value of the first digital resource. Arbitrage risk is transformed into the return for liquidity providers, protecting their interests.

[0073] In some embodiments, step S232 above, which determines the type and quantity of excess digital resources in the liquidity pool based on the off-chain value and initial exchange price corresponding to the first digital resource, specifically includes the following steps:

[0074] Step S232-A: If the off-chain value of the first digital resource is greater than the initial exchange price of the first digital resource, then calculate the current holding quantity of the first digital resource based on the off-chain value of the first digital resource and the initial quantity of the second digital resource; calculate the excess quantity of the first digital resource based on the current holding quantity and the initial quantity of the first digital resource.

[0075] In step S232-B, if the off-chain value of the first digital resource is less than the initial exchange price of the first digital resource, then calculate the current holding quantity of the second digital resource based on the off-chain value of the first digital resource and the initial quantity of the first digital resource; and calculate the excess quantity of the second digital resource based on the current holding quantity and the initial quantity of the second digital resource.

[0076] For example, initially, the price of the first digital resource in the liquidity pool is 1, and the quantity of the first digital resource is 50,000. The quantity of the second digital resource placed in the pool is also 50,000. Then, based on the constant product formula, the quantity relationship between the two digital resources in the liquidity pool is: x × y = 25 × 10 8 x represents the quantity of the second digital resource, and y represents the quantity of the first digital resource.

[0077] Assuming the off-chain value reported by the oracle is 1.05 (x / y=1.05), and the price of the first digital resource increases, based on the current quantity of the second digital resource in the liquidity pool of 50,000, the corresponding current holding of the first digital resource should be 50,000 / 1.05 = 47,619. Since the current quantity of the first digital resource in the liquidity pool is 50,000, there is a surplus of 2,381 units. Further, these surplus 2,381 units of the first digital resource can be exchanged for the second digital resource in the liquidity pool, according to the formula: x×y=50,000×47,619=23.8095×10. 8 At this exchange rate, (50000 - the number of second digital resources exchanged) × (47619 + 2381) = 23.8095 × 10 8 The exchange quantity of the second digital resource was calculated to be 2381.

[0078] Assuming the off-chain value reported by the oracle is 0.95 (x / y=0.95), and the price of the first digital resource drops, based on the off-chain value and the initial quantity of the first digital resource, the current holding quantity of the second digital resource should be 50000 × 0.95 = 47500. Currently, there are 50000 second digital resources in the liquidity pool. Calculating the surplus second digital resource in the liquidity pool: 50000 - 47500 = 2500, meaning there are 2500 second digital resources remaining. The updated quantity relationship in the liquidity pool is x × y = 47500 × 50000 = 23.75 × 10⁻¹⁰. 8 Use the excess 2500 second digital resources to exchange for first digital resources in the pool, according to x×y=47500×50000=23.75×10 8 At this exchange rate, (47500 + 2500) × (50000 - the number of first digital resources exchanged) = 23.75 × 10 8 The exchange quantity of the first digital resource was calculated to be 2500.

[0079] In other embodiments, step S230 above, which involves transferring a portion of a digital resource from the liquidity pool to the yield pool based on the off-chain value and the initial quantity, so that the price in the liquidity pool is the same as the off-chain value, can also be achieved through the following process:

[0080] Determine the initial exchange price of the first digital resource based on the initial quantity. Determine the relationship between the off-chain value of the first digital resource and the initial exchange price.

[0081] If the off-chain value is greater than the initial exchange price, then based on the off-chain value and the initial quantity of the first digital resource, a target quantity of the second digital resource is allocated; based on the difference between the initial quantity and the target quantity of the second digital resource, the second digital resource is extracted from the liquidity pool and stored in the yield pool.

[0082] If the off-chain value is less than the initial exchange price, then based on the off-chain value and the initial quantity of the second digital resource, a target quantity of the first digital resource is allocated; based on the difference between the initial quantity and the target quantity of the first digital resource, the first digital resource is extracted from the liquidity pool and stored in the yield treasury.

[0083] In this embodiment, the liquidity provider directly extracts the corresponding digital resources and resets the price in the pool, eliminating the need for a transaction process.

[0084] In some of these embodiments, such as Figure 4 As shown, the price anchoring method based on automated market makers also includes the following steps:

[0085] Step S110: Create a liquidity pool based on the constant product formula.

[0086] Step S120: Determine the two digital resources as a trading pair and determine the initial liquidity of the two digital resources.

[0087] Step S130: Transfer two types of digital resources to the liquidity pool based on the initial liquidity amount, and determine the product value of the constant product formula.

[0088] Step S140: Execute the transaction operation based on the constant product formula.

[0089] Specifically, a liquidity pool is created based on the constant product formula x × y = k. Here, x represents the quantity of the second digital resource in the liquidity pool, and y represents the quantity of the first digital resource. The corresponding initial price, Price = x / y, should be set to match the initial fair value of the first digital resource reported by the oracle. The constant k = x × y is determined after the initial liquidity injection.

[0090] During the daily operation of the liquidity pool, users trade with the pool based on a traditional Automated Market Maker (AMM) to exchange for either a first or second digital resource. Transactions are priced and executed entirely using the formula x×y=k. During this period, changes in the asset ratio within the pool can cause the transaction price to temporarily deviate from the oracle price. Therefore, after step S140, steps S210 to S240 are executed to rebalance the pool price.

[0091] In this embodiment, daily transaction operations are performed based on a constant product formula to achieve reliable flow of digital resources.

[0092] In some embodiments, step S120 above, determining the initial flow quantity of the two digital resources, specifically includes the following steps:

[0093] Step S121: Obtain the current fair value of the digital resource based on the oracle. The fair value is the real-world price of the streaming digital resource.

[0094] Step S122: Determine the initial flow quantity of the two digital resources based on the current fair value.

[0095] In this embodiment, the liquidity pool is anchored to the real-world price provided by the oracle from the initial stage of its creation, ensuring the reliable flow of digital resources.

[0096] In some embodiments, based on step S240 above, when preset conditions are met, the digital resources in the revenue pool are transferred to the liquidity pool, specifically including the following steps:

[0097] Step S241: When the preset conditions are met, obtain the latest off-chain value of the digital resource.

[0098] Specifically, based on the off-chain data reported by the oracle, the off-chain value of digital resources is updated to obtain the latest off-chain value. The preset conditions can be set according to actual needs, such as preset time periods, cycles, or other strategies, to trigger the off-chain value update.

[0099] Step S242: Based on the latest off-chain value, transfer the digital resources in the yield pool to the liquidity pool.

[0100] Specifically, the digital resources in the yield pool are reinvested into the liquidity pool, which is equivalent to reinvesting a portion of the yield as liquidity. The ever-expanding size of the liquidity pool generates more transaction fees, further increasing the revenue of liquidity providers and creating a positive cycle.

[0101] In some embodiments, step S210 above, receiving the off-chain value periodically reported by the oracle, specifically includes the following steps:

[0102] Step S211: Receive off-chain data periodically reported by the oracle. Specifically, the off-chain data is obtained based on the value information of real-world asset tokens in the external world of the blockchain collected by the oracle.

[0103] Step S220 verifies the validity of the off-chain data. Specifically, it verifies whether the oracle's signature is valid and whether the price data of real-world asset tokens in the off-chain data is within a valid range.

[0104] Step S230: Obtain off-chain value based on verified valid off-chain data.

[0105] In this embodiment, the risk of malicious oracles or man-in-the-middle attacks is reduced and the robustness of the system is enhanced through validity verification.

[0106] The present application will now be described and illustrated through preferred embodiments.

[0107] Figure 5 This is a schematic diagram of the price anchoring system based on an automated market maker (AMM) in this preferred embodiment. The system connects to a trusted off-chain oracle, which periodically (e.g., every 24 hours) reports the current fair value of the required digital resources, i.e., the off-chain value P_oracle. The core of this system is a periodically rebalancing AMM mechanism driven by an oracle. It retains the automated trading format of an AMM, but its core pricing power is delegated to the off-chain oracle that provides the fair value of the digital resources. It reflects value changes and recovers resources by periodically adjusting the asset composition within the pool.

[0108] like Figure 5As shown, the oracle monitors the value of physical assets and periodically reports the corresponding digital resource prices to a price feed contract on the blockchain. After the price feed contract verifies the validity of the price, it automatically executes the subsequent AMM mechanism. The system's operation process includes the following steps:

[0109] I. System Initialization Phase:

[0110] Step S1: Create a liquidity pool based on the constant product formula x×y=k.

[0111] Step S2: Identify two digital resources as a trading pair and obtain the current fair value of the digital resources based on an oracle; determine the initial liquidity of the two digital resources based on the current fair value. The two digital resources are the real-world asset token RWA and a stablecoin.

[0112] II. Transaction Stage:

[0113] Step S3 involves transferring two types of digital resources to the liquidity pool based on the initial liquidity amount and determining the product value using a constant product formula; then, a transaction is executed based on the constant product formula. During this period, the asset ratio within the liquidity pool may change, causing the pool price to initially deviate from the current fair price.

[0114] III. Oracle Bidding and Rebalancing Triggering:

[0115] Step S4: Receive off-chain data periodically reported by the oracle; verify whether the oracle's signature in the off-chain data is valid and whether the price data of the real-world asset token RWA in the off-chain data is within a valid range.

[0116] Step S5: Based on the verified valid off-chain data, obtain the off-chain value P_oracle=x' / y' of the real-world asset token RWA.

[0117] Step S6: Trigger a rebalancing mechanism based on the off-chain value reported by the oracle: Determine the initial quantity x of stablecoins and the initial quantity y of real-world asset token RWA in the liquidity pool. Determine the theoretical price x / y of RWA in the pool, i.e., the initial exchange price, based on the initial quantities of the two digital resources in the liquidity pool. Determine the relationship between the off-chain value P_oracle and the theoretical price x / y.

[0118] IV. Rebalancing Implementation – Value Growth:

[0119] Step S7: If the off-chain value P_oracle is greater than the theoretical price x / y, it indicates that the real-world asset token RWA has appreciated. At this point, the total actual value of all RWA tokens in the liquidity pool is higher than the total value of all stablecoins. Based on the off-chain value P_oracle and the initial quantity of stablecoins x, calculate the current holding quantity of RWA tokens y_1 = x / P_oracle. Based on the current holding quantity y_1 and the initial quantity y, calculate the excess quantity of RWA tokens Δy = y - y_1.

[0120] Step S8 involves converting the excess Δy portion of the real-world asset token RWA within the liquidity pool into a corresponding amount of stablecoins based on its off-chain value P_oracle. This operation is equivalent to automatically selling part of the position to realize profits after the asset appreciates.

[0121] Step S9: Deposit the exchanged stablecoins into the yield vault.

[0122] V. Rebalancing Implementation – Value Reduction Situation:

[0123] Step S10: If the off-chain value P_oracle is less than the theoretical price x / y, it indicates that the real-world asset token RWA has depreciated. At this time, the total value of all stablecoins in the liquidity pool is higher than the total actual value of all real-world asset tokens RWA. Based on the off-chain value P_oracle and the initial quantity y of the real-world asset token RWA, calculate the current holding quantity of stablecoins x_1 = y × P_oracle. Based on the current holding quantity x_1 and the initial quantity x, calculate the excess quantity of stablecoins Δx = x - x_1.

[0124] Step S11: Within the liquidity pool, the excess stablecoin portion Δx is exchanged for a corresponding amount of real-world asset tokens RWA, based on the off-chain value P_oracle. This operation is equivalent to increasing asset holdings at a lower price after asset devaluation.

[0125] Step S12: Deposit the redeemed real-world asset token RWA into the yield vault.

[0126] VI. Increased liquidity:

[0127] In step S13, the digital resources accumulated in the yield pool (real-world asset tokens RWA and stablecoins) can be periodically or according to a set strategy, based on the off-chain value P_oracle reported by the oracle at that time, and then reinvested into the liquidity pool. This is equivalent to reinvesting a portion of the yield into liquidity, continuously expanding the size of the liquidity pool, increasing liquidity, generating more transaction fees, and forming a positive cycle.

[0128] The beneficial effects of this preferred embodiment include: 1. It solves the cold start problem of the order book model. Existing off-chain order book models require matching orders from buyers and sellers to achieve transactions and pricing. In the early stages of a project, insufficient market depth and scarce buy and sell orders lead to huge bid-ask spreads, extremely poor liquidity, high user transaction costs, and difficulty in forming an effective market price, hindering the ecosystem's launch. This preferred embodiment inherits the advantages of the Automated Market Maker (AMM) model, providing continuous liquidity without order matching, greatly reducing the transaction threshold for users and facilitating the cold start of the project. 2. It further solves the problem of price decoupling in traditional AMMs. By periodically introducing off-chain oracle prices as a benchmark, it forces the composition of digital resources in the liquidity pool to align with real value, ensuring that the price of the real-world asset token RWA is anchored to the value of off-chain physical assets and conforms to its fundamentals. 3. It eliminates risk-free arbitrage opportunities. The system itself actively completes rebalancing, preventing arbitrageurs from profiting from price differences after oracle updates. Arbitrage risk is mitigated by the liquidity provider's profit recovery operation, protecting the interests of liquidity providers. 4. Automatic reinvestment of returns enhances resource utilization efficiency and overall returns for liquidity providers, making it more attractive than static AMM pools or order books.

[0129] It should be noted that the steps shown in the above process or in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here. For example, steps S7 to S9 may be executed after step S6, or steps S10 to S12 may be executed after step S6.

[0130] This embodiment also provides a price anchoring device based on an automated market maker, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform predetermined functions. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0131] Figure 6 This is a structural block diagram of the price anchoring device based on an automated market maker in this embodiment, as shown below. Figure 6 As shown, the device includes: a value acquisition module 61, a resource determination module 62, a resource recycling module 63, and a resource reuse module 64.

[0132] Value capture module 61 is used to receive off-chain value reported periodically by oracles; off-chain value is used to represent the real-world price of digital resources in the liquidity pool; digital resources include the first digital resource and the second digital resource that constitute the trading pair.

[0133] Resource determination module 62 is used to determine the initial quantity of digital resources in the liquidity pool.

[0134] Resource recycling module 63 is used to transfer a portion of a digital resource from the liquidity pool to the yield pool based on the off-chain value and initial quantity, so that the price in the liquidity pool is the same as the off-chain value.

[0135] The resource reuse module 64 is used to transfer digital resources in the revenue pool to the liquidity pool when preset conditions are met.

[0136] In some embodiments, based on off-chain value and an initial quantity, a portion of a digital resource in the liquidity pool is transferred to the yield pool so that the price in the liquidity pool is the same as the off-chain value. This includes: determining an initial exchange price for the first digital resource based on the initial quantity; determining the type and quantity of excess digital resources in the liquidity pool based on the off-chain value and the initial exchange price corresponding to the first digital resource; exchanging the excess digital resource for another digital resource in the liquidity pool based on the off-chain value and the excess quantity; and storing the exchanged digital resource in the yield pool.

[0137] In some embodiments, determining the type and quantity of excess digital resources in the liquidity pool based on the off-chain value and initial exchange price of the first digital resource includes: if the off-chain value of the first digital resource is greater than the initial exchange price of the first digital resource, then calculating the current holding quantity of the first digital resource based on the off-chain value of the first digital resource and the initial quantity of the second digital resource; calculating the excess quantity of the first digital resource based on the current holding quantity and the initial quantity of the first digital resource; if the off-chain value of the first digital resource is less than the initial exchange price of the first digital resource, then calculating the current holding quantity of the second digital resource based on the off-chain value and the initial quantity of the first digital resource; calculating the excess quantity of the second digital resource based on the current holding quantity and the initial quantity of the second digital resource.

[0138] In some embodiments, the apparatus further includes a liquidity creation module for creating a liquidity pool based on a constant product formula; determining two digital resources as a trading pair and determining the initial liquidity amounts of the two digital resources; transferring the two digital resources into the liquidity pool based on the initial liquidity amounts and determining the product value of the constant product formula; and executing trading operations based on the constant product formula.

[0139] In some embodiments, determining the initial flow quantities of the two digital resources includes: obtaining the current fair value of the digital resources based on an oracle; and determining the initial flow quantities of the two digital resources based on the current fair value.

[0140] In some of these embodiments, when preset conditions are met, the digital resources in the revenue pool are transferred to the liquidity pool, including: when the preset conditions are met, obtaining the latest off-chain value of the digital resources; and based on the latest off-chain value, transferring the digital resources in the revenue pool to the liquidity pool.

[0141] In some of these embodiments, receiving off-chain value reported periodically by an oracle includes: receiving off-chain data reported periodically by an oracle; verifying the validity of the off-chain data; and obtaining off-chain value based on the verified valid off-chain data.

[0142] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0143] This embodiment also provides a computer device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0144] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0145] Furthermore, in conjunction with the price anchoring method based on automated market makers provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the price anchoring methods based on automated market makers in the above embodiments.

[0146] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0147] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.

[0148] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0149] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. An automated market maker based price anchoring method, characterized by, The method comprises: receiving off-chain values periodically reported by an oracle; the off-chain values are used to represent the real-world prices of digital resources in a liquidity pool; the digital resources include a first digital resource and a second digital resource constituting a trading pair; determining an initial quantity of digital resources in the liquidity pool; based on the off-chain values and the initial quantity, transferring a part of a quantity of one digital resource in the liquidity pool to a yield pool, so that the price in the liquidity pool is the same as the off-chain value; when a preset condition is met, transferring the digital resource in the yield pool into the liquidity pool.

2. The automated market maker based price anchoring method of claim 1, wherein, Transferring a part of a quantity of one digital resource in the liquidity pool to a yield pool to make the price in the liquidity pool the same as the off-chain value, comprising: determining an initial exchange price of the first digital resource based on the initial quantity; based on the off-chain value corresponding to the first digital resource and the initial exchange price, determining the type and excess quantity of the digital resource that is excessive in the liquidity pool; based on the off-chain value and the excess quantity, exchanging the excess one of the digital resources into another one of the digital resources in the liquidity pool; and storing the exchanged another one of the digital resources in the yield pool.

3. The automated market maker based price anchoring method of claim 2, wherein, Based on the off-chain value corresponding to the first digital resource and the initial exchange price, determining the type and excess quantity of the digital resource that is excessive in the liquidity pool, comprising: if the off-chain value of the first digital resource is greater than the initial exchange price of the first digital resource, calculating the current holding quantity of the first digital resource based on the off-chain value of the first digital resource and the initial quantity of the second digital resource; based on the current holding quantity and the initial quantity corresponding to the first digital resource, the excess quantity of the first digital resource is calculated; if the off-chain value of the first digital resource is less than the initial exchange price of the first digital resource, calculating the current holding quantity of the second digital resource based on the off-chain value of the first digital resource and the initial quantity of the first digital resource; based on the current holding quantity and the initial quantity corresponding to the second digital resource, the excess quantity of the second digital resource is calculated.

4. The automated market maker based price anchoring method of claim 1, wherein, The method further comprises: creating a liquidity pool based on a constant product formula; determining two digital resources as a trading pair, and determining the initial flow quantity of the two digital resources; based on the initial flow quantity, transferring the two digital resources into the liquidity pool, and determining the product value of the constant product formula; performing a transaction operation based on the constant product formula.

5. The automated market maker based price anchoring method of claim 4, wherein, Determining the initial flow quantity of the two digital resources, comprising: obtaining the current fair value of the digital resources based on an oracle; based on the current fair value, determining the initial flow quantity of the two digital resources.

6. The automated market maker based price anchoring method of claim 1, wherein, When a preset condition is met, transferring the digital resource in the yield pool into the liquidity pool, comprising: when a preset condition is met, obtaining the latest off-chain value of the digital resource; based on the latest off-chain value, transferring the digital resource in the yield pool into the liquidity pool.

7. The automated market maker based price anchoring method of claim 1, wherein, Receiving off-chain values reported by the oracle periodically, including: Receiving off-chain data reported by the oracle periodically; Verifying the validity of the off-chain data; Obtaining off-chain values based on the verified off-chain data.

8. An automated market maker based price anchoring apparatus, characterized by, The device comprises: A value acquisition module configured to receive off-chain values reported by the oracle periodically; the off-chain values are used to represent the real-world prices of digital resources in a liquidity pool; the digital resources include a first digital resource and a second digital resource constituting a trading pair; A resource determination module configured to determine an initial quantity of digital resources in the liquidity pool; A resource recycling module configured to transfer a part of the quantity of a digital resource in the liquidity pool to a yield pool based on the off-chain values and the initial quantity, so that the price in the liquidity pool is the same as the off-chain values; A resource reuse module configured to transfer the digital resource in the yield pool to the liquidity pool when a preset condition is met. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.