Blockchain digital asset processing method and apparatus, electronic device, and storage medium
By deploying pre-sale smart contracts and loan smart contracts in the blockchain, the problem of users being unable to sell their digital assets immediately after pledging them is solved, enabling smooth pre-sales and redemptions of digital assets and ensuring the completion of transactions.
Patent Information
- Application Number
- CN202211606902.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Users need to redeem their digital assets before they can sell them after pledging them, which may cause them to miss transaction opportunities when no buyer can be found. Existing blockchain technology cannot provide effective support for pre-sales and redemption resources.
Deploy pre-sale smart contracts in the blockchain, and use loan smart contracts to advance redemption resources to ensure that users can successfully sell digital assets, and then settle the loan resources after the pre-sale.
This allows users to successfully redeem and sell their digital assets after finding a buyer, avoiding missed trading opportunities due to lack of funds and ensuring the smooth completion of transactions.
Smart Images

Figure CN116128642B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchains, and in particular to a blockchain digital asset processing method and device, electronic equipment and a storage medium. BACKGROUND
[0002] A non-fungible token (NFT) is a unique trusted digital rights certificate in a blockchain. Due to the non-replaceable nature of NFTs, it means that it can be used to represent unique items such as original paintings, land, game accounts, etc., so NFTs are also considered assets stored in digital form on the blockchain, i.e. digital assets.
[0003] At the present stage, there are many types of mortgage services for digital assets, such as loans, leases, etc. These mortgage services require users to transfer the ownership of digital assets to the blockchain for safekeeping to ensure the security of service execution.
[0004] In some scenarios, users have legitimate needs to sell their mortgaged digital assets. For example, a user decides to sell their digital assets to raise funds, but considering that they cannot find a suitable buyer in the short term, they can first mortgage their digital assets to obtain a loan, and then sell the digital assets if they find a buyer. However, based on the current blockchain technology, users need to redeem their mortgaged digital assets before they can sell them. When a user finds a buyer willing to purchase, if they are unable to redeem at that time, they may lose the opportunity to trade.
[0005] Therefore, there is an urgent need for a technical solution to address the problem of users needing to sell their mortgaged digital assets but lacking the funds to redeem them. SUMMARY
[0006] The present application aims to provide a blockchain digital asset processing method and device, electronic equipment and a storage medium, which can provide pre-sale services for user mortgaged digital assets and provide loan resources for users to redeem after determining the purchase of the pre-sale, to ensure that users can successfully redeem digital assets to complete the pre-sale.
[0007] To achieve the above-mentioned purpose, the embodiments of the present application are implemented as follows:
[0008] In a first aspect, a blockchain digital asset processing method is provided, characterized in that it comprises:
[0009] deploy, in the blockchain, a pre-sale smart contract for pre-selling the target digital asset based on a pre-sale request of the target digital asset initiated by a first user, wherein the target digital asset is a collateral that is mortgaged by the first user based on a mortgage service smart contract in the blockchain, and an owner of the target digital asset is changed from the first user to the mortgage service smart contract after being mortgaged;
[0010] based on a purchase request of a target digital asset initiated by a second user, running the pre-sale smart contract to perform: after the second user pays pre-sale resource of the target digital asset to the pre-sale smart contract, submitting a first blockchain transaction to the blockchain, the first blockchain transaction is used to transfer the pre-sale resource of the target digital asset to the pre-sale smart contract, and the pre-sale resource transferred by the first blockchain transaction is provided by an electronic wallet of the second user;
[0011] based on a redemption request of a target digital asset initiated by the first user, running a loan smart contract of the blockchain to perform: submitting a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer redemption resource of the target digital asset to the mortgage service smart contract, the redemption resource transferred by the second blockchain transaction is loan resource borrowed by the first user from the loan smart contract, and the mortgage service smart contract changes the owner of the target digital asset from the mortgage service smart contract to the first user after receiving the redemption resource of the target digital asset;
[0012] based on a sale request of a target digital asset initiated by the first user, running the pre-sale smart contract to perform: submitting a third blockchain transaction to the blockchain, and changing the owner of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer pre-sale resource of the target digital asset to an electronic wallet of the first user, and the transferred pre-sale resource of the target digital asset is used to repay loan resource borrowed by the first user from the loan smart contract.
[0013] In a second aspect, a processing device of a blockchain digital asset is provided, comprising:
[0014] a pre-sale response module configured to deploy, in the blockchain, a pre-sale smart contract for pre-selling the target digital asset based on a pre-sale request of the target digital asset initiated by a first user, wherein the target digital asset is a collateral that is mortgaged by the first user based on a mortgage service smart contract in the blockchain, and an owner of the target digital asset is changed from the first user to the mortgage service smart contract after being mortgaged;
[0015] The purchase response module is configured to, based on a purchase request initiated by a second user for a target digital asset, run the presale smart contract to perform: after the second user pays the presale resource of the target digital asset to the presale smart contract, submitting a first blockchain transaction to the blockchain, the first blockchain transaction being used to transfer the presale resource of the target digital asset to the presale smart contract, the presale resource transferred by the first blockchain transaction being provided by an electronic wallet of the second user.
[0016] The redemption response module is configured to, based on a redemption request initiated by the first user for the target digital asset, run the loan smart contract of the blockchain to perform: submitting a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer the redemption resource of the target digital asset to the mortgage service smart contract, the redemption resource transferred by the first blockchain transaction being the loan resource borrowed by the first user from the loan smart contract, and the mortgage service smart contract changing the owner of the target digital asset from the mortgage service smart contract to the first user after receiving the redemption resource of the target digital asset.
[0017] The sale response module is configured to, based on a sale request initiated by the first user for the target digital asset, run the presale smart contract to perform: submitting a third blockchain transaction to the blockchain and changing the owner of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer the presale resource of the target digital asset to the electronic wallet of the first user, and the transferred presale resource of the target digital asset is used to repay the loan resource borrowed by the first user from the loan smart contract.
[0018] In a third aspect, an electronic device is provided, including: a processor; and a memory configured to store computer executable instructions that, when executed, cause the processor to perform the processing method of the blockchain digital asset of the first aspect.
[0019] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium being configured to store computer executable instructions that, when executed by a processor, implement the processing method of the blockchain digital asset of the first aspect.
[0020] In the scheme of the embodiment of the application, if the user has the intention to sell the target digital asset after mortgaging the target digital asset to the mortgage service smart contract of the blockchain in exchange for mortgage service, the user can deploy in advance a presale smart contract for preselling the target digital asset in the blockchain. After determining the buyer of the presale, the user first calls the loan smart contract in the blockchain to pay for the redemption resource of the target digital asset to the mortgage service smart contract by way of borrowing, and then further completes the presale transaction with the buyer through the presale smart contract after regaining the target digital asset, and uses part of the resources obtained through the presale to clear the loan resources borrowed from the loan smart contract. Obviously, based on the scheme of the embodiment of the application, the user can initiate the presale of the digital asset mortgaged by the user at any time according to actual needs, and once the buyer is matched, the user can first pay for the redemption fee of the digital asset through the loan smart contract, so as to ensure that the digital asset can be sold smoothly and avoid missing the transaction opportunity due to the user's inability to redeem. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments described in the embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0022] Figure 1 Flowchart of the process of applying for a mortgage based on a blockchain digital asset.
[0023] Figure 2 Flowchart of the process of the blockchain digital asset processing method provided by the embodiment of the application.
[0024] Figure 3 First flowchart of the blockchain digital asset processing method provided by the embodiment of the application in application scenario one.
[0025] Figure 4 Second flowchart of the blockchain digital asset processing method provided by the embodiment of the application in application scenario one.
[0026] Figure 5 Third flowchart of the blockchain digital asset processing method provided by the embodiment of the application in application scenario one.
[0027] Figure 6 First flowchart of the blockchain digital asset processing method provided by the embodiment of the application in application scenario two.
[0028] Figure 7The second flowchart of the processing method of the blockchain digital asset provided by the embodiment of the present application in the second application scenario.
[0029] Figure 8 The third flowchart of the processing method of the blockchain digital asset provided by the embodiment of the present application in the second application scenario.
[0030] Figure 9 The structural diagram of the processing device of the blockchain digital asset provided by the embodiment of the present application.
[0031] Figure 10 The structural diagram of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable the person skilled in the art to better understand the technical solutions in the specification, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the specification, not all the embodiments. Based on the embodiments in the specification, all other embodiments obtained by the person skilled in the art without creative labor should belong to the protection scope of the specification.
[0033] As described above, the prior art has developed many types of mortgage services for digital assets, such as mortgage loan services, mortgage lease services, etc. These mortgage services need the user to transfer the ownership of the digital asset to the blockchain for safe service.
[0034] Here, taking the mortgage loan service as an example, Figure 1A schematic diagram of a scenario of providing mortgage services for a blockchain, including a client, a business platform, and a blockchain. The client can be, but is not limited to, a personal terminal or an application of a user. If the user has a demand for mortgaging his digital assets to obtain a loan, he can log in to the client of the business platform, access the blockchain node through the digital asset platform (or the client directly accesses the blockchain node), and initiate a mortgage request to the blockchain node. Correspondingly, the blockchain node responds to the mortgage request initiated by the user, and if the loan agreement in the mortgage request is reached, a mortgage service smart contract is created in the blockchain. It should be understood that the smart contract is an event-driven program running on the blockchain that can automatically execute according to preset conditions. In this application, the mortgage service smart contract changes the owner of the digital assets used for mortgage from the original user to the mortgage smart contract based on its own execution logic, and transfers the loan fee to the user's electronic wallet. In addition, the mortgage service smart contract will return the digital assets to the user after the user repays the loan, i.e., change the owner of the digital assets from the mortgage smart contract back to the user.
[0035] In some scenarios, the user has a reasonable demand to sell his mortgaged digital assets. For example, the user decides to sell his digital assets to raise funds, but considers that he cannot find a suitable buyer in the short term, so he can first apply for the mortgage service shown in the above example to obtain a loan for emergency. Once a buyer is found during the mortgage period, the user can sell his digital assets.
[0036] However, based on the current blockchain technology, if the user has mortgaged his digital assets, he needs to redeem them before selling them again. The mortgage rules of the smart contract require the user to pay a redemption fee to return the digital assets, and if the user cannot pay the redemption fee after finding a buyer, he may miss the transaction opportunity of the digital assets.
[0037] To solve the above problems, the present application aims to provide a processing scheme for blockchain digital assets, which can provide a pre-sale service for the user's mortgaged digital assets, and provide a loan for the user to redeem the resources after determining the buyer of the pre-sale, so as to ensure that the user can successfully redeem the digital assets to complete the pre-sale.
[0038] Specifically, in the scheme of the present application, the user can use the client to submit a pre-sale request for the target digital assets he has mortgaged, so as to deploy a pre-sale smart contract for the target digital assets in the blockchain through the blockchain. After determining the buyer, the user can call the loan smart contract of the blockchain to obtain a loan from the mortgage service smart contract (such as the mortgage service smart contract) through unsecured lending, so as to redeem the target digital assets. Figure 1the mortgage service smart contract) to pay for the redemption resource (the resource of the present application can include a blockchain token, other digital assets, and digital business rights, etc.) of the digital asset, so that the mortgage service smart contract returns the target digital asset; correspondingly, the user sells the target digital asset through the pre-sale smart contract after redeeming the target digital asset, and uses part of the resources obtained by selling to pay the loan resources borrowed from the loan smart contract.
[0039] In one aspect, the embodiments of the present application provide a processing method of a blockchain digital asset, which can be executed by any node device of a blockchain (such as the blockchain node shown in the example of Figure 1 In one aspect, the embodiments of the present application provide a processing method of a blockchain digital asset, which can be executed by any node device of a blockchain (such as the blockchain node shown in the example of Figure 2 is a flowchart of the processing method of the embodiments of the present application, and specifically includes the following steps:
[0040] S202, based on a pre-sale request of a target digital asset initiated by a first user, deploying a pre-sale smart contract for pre-selling the target digital asset in the blockchain, wherein the target digital asset is a collateral of the first user based on a mortgage service smart contract in the blockchain, and the ownership of the target digital asset is changed from the first user to the mortgage service smart contract after the mortgage.
[0041] In the present application, the mortgage service smart contract is used to execute the service agreement of the mortgage service for the target digital asset. The mortgage service refers to a service that requires the user to mortgage the digital asset to provide, such as a loan, a lease, etc., or can also be an F-NFT service (F-NFT needs to mortgage the digital asset before fragmenting and splitting the digital asset).
[0042] In one possible example, the mortgage service provided by the mortgage service smart contract includes one of a mortgage loan service and a mortgage lease service for the target digital asset.
[0043] For example, after the first user reaches a loan agreement with a loan contributor for a target digital asset (such as the amount of borrowed resources and the loan period), the first user can deploy a mortgage loan service smart contract in the blockchain to fulfill the loan agreement. After the loan contributor transfers the loan resources to the mortgage loan service smart contract, the mortgage loan service smart contract modifies the ownership of the target digital asset from the first user to the mortgage loan service smart contract itself. Then, the mortgage loan service smart contract transfers the loan resources to the electronic wallet of the first user. During the loan period, the first user can transfer the redemption resources (the loan resources plus the loan interest) of the target digital asset to the mortgage loan service smart contract to redeem the target digital asset. After the mortgage loan service smart contract obtains the redemption resources of the target digital asset, the mortgage loan service smart contract re-modifies the ownership of the target digital asset to the first user and transfers the redemption resources to the electronic wallet of the loan contributor. In addition, if the first user defaults after the loan period, the mortgage loan service smart contract can modify the ownership of the target digital asset to the loan contributor, i.e., provide the target digital asset as compensation for the loan default to the loan contributor.
[0044] For example, if the first user needs to rent out the target digital asset to other users (hereinafter referred to as the borrower user), the first user can deploy a mortgage lease service smart contract in the blockchain to fulfill the lease agreement (such as the lease fee resources and the lease period) after reaching an agreement with the borrower user. Then, the first user sets the ownership of the target digital asset to the mortgage lease service smart contract for mortgage, and when the borrower user pays the lease fee resources to the mortgage lease service smart contract, the mortgage lease service smart contract further sets the usage right of the target asset to the borrower user for use. When the lease period expires, the mortgage lease service smart contract recovers the usage right of the target asset from the borrower user and transfers the lease fee resources to the electronic wallet of the first user.
[0045] For the present application, if the first user intends to sell the target digital asset during the period of mortgage to the mortgage service smart contract, the first user can submit a pre-sale request for the target digital asset to the business platform through the client.
[0046] Correspondingly, after receiving the pre-sale request, the business platform can publish the pre-sale information of the target digital asset. If other users of the business platform browse the pre-sale information and have the demand to purchase the target digital asset, the users can apply to become the purchaser of the target digital asset according to the matching method provided by the business platform.
[0047] As an exemplary introduction, the matching method provided by the business platform can be but is not limited to the British auction matching, the Dutch auction matching, the fixed price matching, etc.
[0048] The British auction refers to the mode of higher bid. Within a specified auction time range, for example, the pre-sale auction time limit of the target digital asset is 3 days, the first user proposes to pre-sell the target digital asset for 12 months, and the starting price is 1200 yuan. Within the 3 days, users who have demand to purchase the target digital asset can bid at a higher price. The user who can provide the most pre-sale resource gets the right to purchase the target digital asset.
[0049] The Dutch auction refers to the mode of bidding. The first user can set the starting price, the minimum acceptance price, the bidding period, and the number of price reductions on the business platform, for example: the bidding period is 3 days, the pre-sale time of the target digital asset is 12 months, the starting price is 1400 yuan, the minimum acceptance price is 1200 yuan, and the number of price reductions is 2 times. On the first day, the starting price is 1400 yuan, and if someone bids, the transaction is completed, and if no one bids; On the second day, the price is reduced to 1300 yuan, and if someone bids, the transaction is completed, and if no one bids, the price is reduced to the minimum of 1200 yuan on the third day, and if someone bids, the transaction is completed, and if no one bids, the transaction is failed.
[0050] The fixed price refers to the price set by the first user, which cannot be negotiated. If someone bids, the transaction is completed. For example, the first user sets the pre-sale time of the target digital asset to 12 months, the rental price to 1200 yuan, and if someone bids within the bidding time, the transaction is completed, and if no one bids, the transaction is failed.
[0051] After the purchase party is matched, the business platform or the client of the first user can initiate a pre-sale request carrying a pre-sale agreement. Correspondingly, the blockchain node deploys a corresponding pre-sale smart contract in the blockchain based on the pre-sale agreement in the pre-sale request after receiving the pre-sale request.
[0052] S204, based on the purchase request initiated by the second user for the target digital asset, the pre-sale smart contract is run to execute: after the second user pays the pre-sale resource of the target digital asset to the pre-sale smart contract, a first blockchain transaction is submitted to the blockchain, the first blockchain transaction is used to transfer the pre-sale resource of the target digital asset to the pre-sale smart contract, and the pre-sale resource transferred by the first blockchain transaction is provided by the electronic wallet of the second user.
[0053] In this application, the second user can apply to become the purchase party of the target digital asset according to the matching mode provided by the business platform as described above. For this application, the second user can be regarded as the purchase party of the target digital asset pre-sale after successfully submitting the first blockchain transaction through the pre-sale smart contract. At this time, the pre-sale resource provided by the second user is pledged in the pre-sale smart contract, and if the first user provides the target digital asset to the pre-sale smart contract, the pre-sale transaction of the target digital asset can be completed by the pre-sale smart contract.
[0054] S206, based on the first user initiating the redemption request of the target digital asset, running the loan smart contract of the blockchain to perform: submitting a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer the redemption resource of the target digital asset to the mortgage service smart contract, the redemption resource transferred by the second blockchain transaction is the loan resource borrowed by the first user to the loan smart contract, and after receiving the redemption resource of the target digital asset, the mortgage service smart contract changes the owner of the target digital asset from the mortgage service smart contract to the first user.
[0055] In this application, the loan smart contract is used to provide the first user with the loan resource to redeem the target digital asset, which is different from the mortgage loan service smart contract described above. The first user can submit a redemption request to the blockchain node after determining the buyer user (i.e. the second user) of the pre-sale of the target digital asset, so as to run the loan smart contract on the blockchain through the blockchain node.
[0056] Specifically, the redemption request provides the address of the mortgage service smart contract and the redemption resource of the target digital asset. After the blockchain node runs the loan smart contract, the loan smart contract submits a second blockchain transaction to the mortgage service smart contract according to the address of the loan smart contract and the redemption resource of the target digital asset provided by the redemption request.
[0057] Correspondingly, the mortgage service smart contract modifies the owner of the target digital asset to the first user based on its own logic after receiving the redemption resource of the target digital asset. Then, the first user initiates a sale request for the target digital asset to call the pre-sale smart contract to perform the pre-sale transaction of the target digital asset; that is, setting the owner of the target digital asset to the second user, and submitting a third blockchain transaction to the blockchain to transfer the pre-sale resource of the target digital asset to the electronic wallet of the first user.
[0058] Alternatively, in another possible example, the mortgage service smart contract can also modify the owner of the target digital asset directly to the pre-sale smart contract after receiving the redemption resource of the target digital asset, so that the pre-sale smart contract directly performs the pre-sale transaction of the target digital asset, and finally modifies the owner of the target digital asset to the second user and submits a third blockchain transaction to the blockchain to transfer the pre-sale resource of the target digital asset to the electronic wallet of the first user.
[0059] S208, based on the first user initiating the sale request of the target digital asset, running the pre-sale smart contract to perform: submitting a third blockchain transaction to the blockchain, and changing the ownership of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer the pre-sale fund resource of the target digital asset to the electronic wallet of the first user, and the transferred pre-sale fund resource of the target digital asset is used to repay the loan resource borrowed by the first user to the loan smart contract.
[0060] In this application, the pre-sale smart contract needs to meet two conditions at the same time to perform the pre-sale transaction of the target digital asset. One is that the pre-sale fund resource has been seized in the pre-sale smart contract, that is, the second user has paid the pre-sale fund resource to the pre-sale smart contract through the first blockchain transaction; the other is that the target digital asset has been seized in the pre-sale smart contract, that is, the first user runs the pre-sale smart contract through the sale request, and further sets the ownership of the target digital asset redeemed by the first user to the pre-sale smart contract. When the pre-sale smart contract seizes the target digital asset and the pre-sale fund resource at the same time, it performs the pre-sale transaction to transfer the target digital asset seized by the first user to the second user, and transfer the pre-sale fund resource seized by the second user to the electronic wallet of the first user.
[0061] Optionally, the pre-sale smart contract is triggered by pre-sale after both parties pledge. After the first user pledges the target digital asset to the pre-sale smart contract, the second user needs to pay the pre-sale fund resource first. The first user will redeem the target digital asset from the pre-sale service smart contract after seeing that the second user has paid the pre-sale fund resource to the pre-sale smart contract, and then give the redeemed target digital asset to the pre-sale smart contract to trigger the execution of the pre-sale transaction, that is, the target digital asset first flows from the first user to the pre-sale smart contract, and then flows to the second user, so as to change the ownership of the target digital asset from the first user to the second user.
[0062] It should be understood that after the first user obtains the pre-sale fund resource through the third blockchain transaction, the first user needs to use the pre-sale fund resource to repay the loan resource (that is, the redemption resource of the target digital asset) borrowed from the loan smart contract before.
[0063] Here, in order to ensure that the first user can successfully repay the previously borrowed loan resources to the loan smart contract, after receiving the redemption request for the target digital asset initiated by the first user, the application can first confirm whether the pre-sale resources transferred by the first blockchain transaction are greater than or equal to the redemption resources of the target digital asset; yes, which means that the pre-sale resources are sufficient to pay the loan resources borrowed from the loan smart contract, at which time the loan smart contract running on the blockchain will pay for the first user to pay for the redemption resources of the target digital asset; no, which means that the pre-sale resources cannot pay the loan resources borrowed from the loan smart contract, at which time the redemption request can be ignored to reject the call to the loan smart contract to pay for the first user to pay for the redemption resources of the target digital asset.
[0064] Further, if the loan smart contract is set with a submission fee resource for the second blockchain transaction, the application also needs to confirm whether the pre-sale resources transferred by the first blockchain transaction are greater than or equal to the sum of the redemption resources of the target digital asset and the fee resource, that is, to further ensure that the first user can pay the fee resource for the second blockchain transaction; yes, the loan smart contract running on the blockchain; no, ignore the redemption request; correspondingly, the third blockchain transaction also needs to transfer the fee resource to the first user's electronic wallet.
[0065] In addition, as a preferred solution, the loan smart contract of the application embodiment can actively control the first user's electronic wallet to repay the loan resources. That is, the loan smart contract is configured to monitor the repayment period of the first user borrowing from the loan smart contract, and after the repayment period expires, submit a fourth blockchain transaction to the blockchain to repay the loan resources borrowed by the first user's electronic wallet to the loan smart contract.
[0066] It should be noted that based on existing blockchain technology, any target blockchain transaction submitted by running the smart contract will not be executed immediately, but will be cached in the transaction pool of each blockchain node. After that, an enabled blockchain node pulls all currently cached blockchain transactions in its own transaction pool to pack into the same block, and initiates a blockchain consensus for the block. After receiving the proposal of the blockchain consensus, the other blockchain nodes cooperate with the enabled blockchain node to consensus all the blockchain transactions in the block. If all the blockchain transactions in the block pass the consensus, each blockchain node executes the blockchain transaction in the block, and uploads the block to the local blockchain for recording.
[0067] Among them, the blockchain consensus is carried out round by round. In each round, the enabled blockchain node will pack all the unconsensus blockchain transactions in the current transaction pool into a block and initiate a blockchain consensus. As long as any blockchain transaction in the block fails to execute (to substantially complete resource transfer), each blockchain node will roll back all the blockchain transactions in the block.
[0068] For the present application, if the mortgage service smart contract is configured to directly modify the owner of the target digital asset to the first user, it is necessary to avoid the first user from using the prepayment of the target digital asset to pay the loan resource borrowed from the loan smart contract. To this end, the above-mentioned fourth blockchain transaction should be written into the same block as the second blockchain transaction for blockchain consensus, so that the two blockchain transactions can be immediately executed by the blockchain in the order of the initiation time after the block to which they belong is confirmed by the blockchain consensus.
[0069] That is, when the second blockchain transaction is successfully executed, the loan smart contract transfers the redemption resource to the mortgage service smart contract in the form of a loan, and the presale smart contract modifies the owner of the target digital asset back to the first user; then, the fourth blockchain transaction is executed to automatically control the first user's electronic wallet to repay the loan resource to the loan smart contract.
[0070] At this time, if the first user provides the redeemed target digital asset to the presale smart contract to complete the presale, the fourth blockchain transaction is successfully executed, and the execution of the second blockchain transaction and the fourth blockchain transaction is completed instantaneously as a whole, although they are in the order of sequence. For the first user, after obtaining the prepayment resource in his own electronic wallet, he has to repay the loan resource to the loan smart contract before he can transfer it, thereby ensuring the security of the loan smart contract loan. In addition, if the first user does not provide the redeemed target digital asset to the presale smart contract to complete the presale, the fourth blockchain transaction fails, and the second blockchain transaction and the fourth blockchain transaction are rolled back together, thereby returning to the original state where the loan smart contract does not provide the redemption resource to the first user, and the target digital asset is mortgaged in the mortgage service smart contract.
[0071] Specifically, in order to encapsulate the fourth blockchain transaction and the second blockchain transaction into the same block, the present application can set the repayment period of the loan smart contract to take effect after the second blockchain transaction is submitted, and the duration is less than the time consumed by the second blockchain transaction being converted into block data. In this way, the loan smart contract will submit the fourth blockchain transaction before the second blockchain transaction is encapsulated into a block, regardless of whether the first user's electronic wallet has received the prepayment resource, thereby forcing the fourth blockchain transaction and the second blockchain transaction to be written into the same block for blockchain consensus.
[0072] For the first user, to ensure that the fourth blockchain transaction can be executed successfully, the third blockchain transaction is triggered by the pre-sale request before the return deadline expires, and the pre-sale resources of the target digital asset are transferred into the electronic wallet of the first user. Similarly, if the third blockchain transaction is submitted before the return deadline expires, it will be written into the same block with the second blockchain transaction and the fourth blockchain transaction. The third blockchain transaction will be executed after the second blockchain transaction is executed successfully, and the fourth blockchain transaction will be executed after the third blockchain transaction is executed successfully, thereby completing the entire process of redemption-> pre-sale-> repayment.
[0073] In addition, if the first user fails to trigger the pre-sale smart contract to submit the third blockchain transaction through the sale request after the return deadline expires, the electronic wallet of the first user cannot receive the pre-sale resources, thereby causing the fourth blockchain transaction to fail, and ultimately causing the second blockchain transaction and the fourth blockchain transaction to be rolled back. It should be understood that since the second blockchain transaction is rolled back, the original mortgagor of the target digital asset is the original mortgage service smart contract, and the first user cannot call the pre-sale smart contract to submit the second blockchain transaction without redeeming the target digital asset. That is, the second blockchain transaction, the third blockchain transaction, and the fourth blockchain transaction never occurred.
[0074] Therefore, based on the method of the embodiment of the present application, if the user has the intention to sell the target digital asset after mortgaging the target digital asset to the mortgage service smart contract of the blockchain in exchange for mortgage services, the user can deploy the pre-sale smart contract for pre-selling the target digital asset in advance in the blockchain. When the buyer of the pre-sale is determined, the user first calls the loan smart contract in the blockchain to pay the redemption resources of the target digital asset to the mortgage service smart contract through lending, and then further completes the pre-sale transaction with the buyer through the pre-sale smart contract after obtaining the target digital asset again, and uses part of the resources obtained through the pre-sale to clear the loan resources borrowed from the loan smart contract. Obviously, based on the scheme of the embodiment of the present application, the user can initiate a pre-sale of the digital asset he / she mortgages at any time according to actual needs, and once a buyer is matched, the user can first pay the redemption fee of the digital asset through the loan smart contract, thereby ensuring that the digital asset can be sold smoothly and avoiding the user missing the transaction opportunity due to lack of redemption ability.
[0075] The application scenario of the method of the embodiment of the present application is described in detail below by taking the NTF digital asset of a picture collection as an example.
[0076] Application scenario one
[0077] In this application scenario, the first user, as a collector of the artwork, can upload the metadata of their artwork to the blockchain's InterPlanetary File System (IPS) to obtain a non-fungible digital token (NFT) for that artwork. This token represents the artwork as a digital asset, i.e., the target NFT. Simultaneously, the blockchain creates a minting contract for the token, which records the token's owner. In other words, the minting contract declares the ownership of the NFT, while the metadata describes the specific artwork the NFT represents.
[0078] Here, it is assumed that the first user has already pledged their target NFT to the rental service smart contract to lend it to other users on the NFT social platform. When the first user needs to sell their target NFT, the corresponding execution flow is as follows: Figure 3 As shown:
[0079] S1: The first user initiates a pre-sale request for the target NFT to the NFT social platform through digital wallet signature authorization. The pre-sale request carries the target NFT's token in the blockchain.
[0080] In this system, NFT social platforms can locate the corresponding minting contract on the blockchain based on the target NFT's token. They then compare the signature of the first user's digital wallet with the ownership information in the minting contract to determine if the first user truly owns the target NFT. Once the platform confirms ownership, it publishes pre-sale information for the target NFT according to a pre-set matching method (which can be chosen by the first user). This pre-sale information can include the pre-sale price and duration. Matching methods can include those described earlier, such as British auction, Dutch auction, and fixed-price matching, which will not be elaborated upon further here.
[0081] S2 involves a second user (another user on the NFT social platform) participating in the pre-sale by bidding for the target NFT on the NFT social platform using a digital wallet.
[0082] After the second user successfully bids, the S3 NFT social platform formulates a pre-sale smart contract based on the pre-sale agreement between the first and second users, and deploys the pre-sale smart contract on the blockchain.
[0083] S4, the second user initiates a purchase request for the target NFT to invoke the pre-sale smart contract to execute S5.
[0084] S5, based on its own logic, submits the first blockchain transaction to the blockchain, whereby the second user's electronic wallet transfers the pre-sale funds of the target NFT to the pre-sale smart contract.
[0085] The second user can use the client to directly send a purchase request to the blockchain node, and the blockchain node calls the presale smart contract; or the second user can use the client to send a purchase request to the NFT social platform, and the NFT social platform calls the presale smart contract through the blockchain node.
[0086] S6, after the first user determines that the second user purchases the target NFT, the first user initiates a redemption request for the target NFT to call the loan smart contract to perform S7.
[0087] For this application scenario, after the second user transfers the presale fund resource to the presale smart contract (i.e., the first blockchain transaction is successfully performed), the second user becomes the purchaser of the target NFT.
[0088] The second user or the NFT social platform can send the first user the transaction information of the first blockchain transaction to prove that the target NFT has found a purchaser for presale, thereby notifying the first user to timely initiate the redemption request.
[0089] S7, the loan smart contract submits a second blockchain transaction to the blockchain to transfer the redemption resource of the target NFT to the lease service smart contract based on its own logic. At the same time, the loan smart contract starts timing the repayment period of the loan based on its own contract logic after the first blockchain transaction is submitted.
[0090] The first user can use the client to directly send a redemption request to the blockchain node, and the blockchain node calls the loan smart contract; or the first user can use the client to send a redemption request to the NFT social platform, and the NFT social platform calls the loan smart contract through the blockchain node.
[0091] S8, the first user initiates a presale execution request for the target NFT to call the presale smart contract to perform S9.
[0092] S9, the presale smart contract submits a third blockchain transaction to the blockchain to transfer the presale fund resource of the target NFT to the electronic wallet of the first user based on its own logic.
[0093] The first user can use the client to directly send a sale request to the blockchain node, and the blockchain node calls the presale smart contract; or the first user can use the client to send a sale request to the NFT social platform, and the NFT social platform calls the presale smart contract through the blockchain node. It should be understood that the sale request is equivalent to the first user authorizing the presale smart contract to sell the target NFT to the second user. Under this authorization, the third blockchain transaction initiated by the presale smart contract is legal.
[0094] S10, when the lease service smart contract timing return period expires, based on its own contract logic, the second user's electronic wallet transfers the pre-sale resource of the target NFT to the loan smart contract based on the fourth blockchain transaction.
[0095] After that, the second blockchain transaction, the third blockchain transaction and the fourth blockchain transaction are written into the same block to initiate blockchain consensus.
[0096] If the blockchain consensus passes, the blockchain executes the second blockchain transaction, the third blockchain transaction and the fourth blockchain transaction in order to achieve Figure 4 The process is shown in the figure:
[0097] S1, the loan smart contract instead of the first user pays the redemption resource of the target NFT to the lease service smart contract.
[0098] S2, the lease service contract ends the lease agreement after the redemption resource of the target NFT, and returns the target NFT to the first user, that is, modifies the owner in the casting contract of the target NFT back to the first user.
[0099] S3(3a / 3b), the pre-sale smart contract modifies the owner of the target NFT to the pre-sale smart contract itself based on the authorization of the first user's sale request, thereby triggering the execution of the pre-sale transaction, on the one hand, modifying the owner of the target NFT to the second user, and on the other hand, transferring the pre-sale resource paid by the second user to the electronic wallet of the first user.
[0100] The pre-sale smart contract is triggered after both parties pledge. The first user needs to pledge his own target NFT to the pre-sale smart contract, and the second user also needs to pay the pre-sale resource. After the first user sees that the second user has paid the pre-sale resource to the pre-sale smart contract, he will redeem the target NFT from the pledge service smart contract, and then give the redeemed target NFT to the pre-sale smart contract, triggering the execution of the pre-sale transaction, that is, the target NFT first flows from the first user to the pre-sale smart contract, and then to the second user.
[0101] S4, the loan smart contract extracts the loan resource from the electronic wallet of the first user to complete the loan settlement.
[0102] In addition, if the first blockchain transaction, the second blockchain transaction and the fourth blockchain transaction are rolled back, the second user can cancel the purchase of the target NFT, that is, call the pre-sale smart contract to submit a new blockchain transaction to re-transfer the pre-paid resource in the pre-sale smart contract to the electronic wallet of the second user.
[0103] The above is the introduction of the first application scenario. It should be noted that the user side cannot perceive the transaction submission and transaction execution on the blockchain side, so the process perceived by the first user and the second user can refer toFigure 5 As shown, the flow is not described here.
[0104] Application scenario two
[0105] In this application scenario one, the first user as the collector of the picture can upload the metadata of his picture to his own interstellar file system of the blockchain to obtain a non-fungible token (NFT) for the picture provided by the blockchain, which represents the digital asset of the picture, i.e., the target NFT.
[0106] Here, it is assumed that the first user has pledged his target NFT to the mortgage service smart contract in exchange for the loan resources provided by the mortgage service smart contract. When the first user needs to sell his target NFT, the corresponding execution flow is as shown in Figure 6
[0107] S1, the first user initiates a pre-sale request for the target NFT to the NFT social platform through a digital wallet signature authorization, and the pre-sale request carries the token of the target NFT in the blockchain.
[0108] Among them, the NFT social platform finds the corresponding minting contract of the target NFT in the blockchain according to the token of the target NFT, compares the signature of the digital wallet of the first user with the ownership in the minting contract, and determines whether the first user truly owns the target NFT. In addition, after determining that the first user owns the target NFT, the NFT social platform publishes the pre-sale information of the target NFT according to the pre-set matching method (which can be selected by the first user). The pre-sale information can include the pre-sale price and the pre-sale period, etc. Among them, the matching method can select the British auction matching, Dutch auction matching and fixed price matching introduced in the foregoing, which will not be described here.
[0109] S2, the second user (another user of the NFT social platform) sets a price for the target NFT pre-sale through the digital wallet on the NFT social platform.
[0110] S3, after successfully matching the second user, the NFT social platform formulates a pre-sale smart contract according to the pre-sale agreement agreed upon by the first user and the second user, and deploys the pre-sale smart contract in the blockchain.
[0111] S4, the second user initiates a purchase request for the target NFT to call the pre-sale smart contract to execute S5.
[0112] S5, the pre-sale smart contract submits a first blockchain transaction of the second user's electronic wallet transferring the pre-sale resources of the target NFT to the pre-sale smart contract based on its own logic.
[0113] S6, after the first user determines that the second user purchases the target NFT, the first user initiates a redemption request for the target NFT to call the loan smart contract to perform S7.
[0114] S7, the loan smart contract submits a second blockchain transaction to the blockchain based on its own logic, in which the loan smart contract transfers the redemption resource of the target NFT to the loan service smart contract, and starts timing the repayment period of the loan after the second blockchain transaction is submitted.
[0115] S8, the mortgage loan service smart contract modifies the owner of the target NFT to the presale smart contract based on its own contract logic after receiving the redemption resource of the target NFT.
[0116] S9, the presale smart contract further modifies the owner of the target NFT to the second user after the owner of the target NFT is modified to the presale smart contract based on its own contract logic, and submits a third blockchain transaction to transfer the presale resource of the target NFT to the electronic wallet of the first user.
[0117] S10, the loan smart contract submits a fourth blockchain transaction to transfer the presale resource of the target NFT from the electronic wallet of the second user to the loan smart contract based on its own contract logic after the repayment period expires.
[0118] After that, the second blockchain transaction, the third blockchain transaction and the fourth blockchain transaction are written into the same block to initiate blockchain consensus. If the blockchain consensus is passed, the blockchain executes the second blockchain transaction, the third blockchain transaction and the fourth blockchain transaction in order to realize Figure 7 the process shown in the flowchart:
[0119] S1, the loan smart contract substitutes the first user to pay the redemption resource of the target NFT to the loan service smart contract.
[0120] S2, the mortgage loan service smart contract ends the mortgage loan service and directly transfers the target NFT to the presale smart contract after receiving the redemption resource.
[0121] In this application scenario two, the address of the presale smart contract can be written in advance in the mortgage loan service smart contract, which will not be described here.
[0122] S3(3a / 3b), the presale smart contract automatically triggers the execution of the presale transaction after obtaining the target NFT, which transfers the presale resource paid by the second user to the electronic wallet of the first user, and on the other hand, transfers the target NFT to the second user.
[0123] S4, the loan smart contract withdraws the loan resource from the electronic wallet of the first user to settle the loan.
[0124] In addition, if the second blockchain transaction, the third blockchain transaction and the fourth blockchain transaction are rolled back, the second user can cancel the purchase of the target NFT, that is, a new blockchain transaction is submitted by calling the presale smart contract to re-transfer the prepayment resource in the presale smart contract into the electronic wallet of the second user.
[0125] The above is the introduction of the second application scenario. It should be noted that the user side cannot perceive the transaction submission and transaction execution on the blockchain side, and therefore the processes perceived by the first user and the second user can refer to Figure 8 The processes are not described again herein.
[0126] On the other hand, corresponding to the above Figure 1 The application embodiment also provides a processing device based on a blockchain digital asset. Figure 9 is a structural schematic diagram of a processing device 900 of the application embodiment, which comprises:
[0127] A presale response module 910 is configured to deploy, based on a presale request of a target digital asset initiated by a first user, a presale smart contract for preselling the target digital asset in the blockchain, wherein the target digital asset is a collateral of the first user based on a collateral service smart contract in the blockchain, and the ownership of the target digital asset is changed from the first user to the collateral service smart contract after the collateral.
[0128] A purchase response module 920 is configured to run, based on a purchase request of a target digital asset initiated by a second user, the presale smart contract to execute: after the second user pays a presale resource of the target digital asset to the presale smart contract, submit a first blockchain transaction to the blockchain, and the first blockchain transaction is used to transfer the presale resource of the target digital asset to the presale smart contract, and the presale resource transferred by the first blockchain transaction is provided by an electronic wallet of the second user.
[0129] A redemption response module 930 is configured to run, based on a redemption request of a target digital asset initiated by the first user, a loan smart contract of the blockchain to execute: submit a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer a redemption resource of the target digital asset to the collateral service smart contract, the redemption resource transferred by the second blockchain transaction is a loan resource borrowed by the first user from the loan smart contract, and the ownership of the target digital asset is changed from the collateral service smart contract to the first user after the collateral service smart contract receives the redemption resource of the target digital asset;
[0130] The selling response module 940 is configured to, based on the first user initiating a selling request for the target digital asset, execute the pre-sale smart contract to perform: submitting a third blockchain transaction to the blockchain, and changing the ownership of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer pre-sale fund resources of the target digital asset to the electronic wallet of the first user, and the transferred pre-sale fund resources of the target digital asset are used to repay the loan resources borrowed by the first user from the loan smart contract.
[0131] According to the device provided in the embodiments of the present application, after a user pledges his target digital asset to a mortgage service smart contract of the blockchain to obtain mortgage service, if the user intends to sell the target digital asset, the user can deploy a pre-sale smart contract for pre-selling the target digital asset in the blockchain in advance. After determining the buyer of the pre-sale, the user first calls the loan smart contract in the blockchain to pay the redemption resources of the target digital asset to the mortgage service smart contract, and then further completes the pre-sale transaction with the buyer through the pre-sale smart contract after obtaining the target digital asset again, and uses part of the resources obtained through the pre-sale to repay the loan resources borrowed from the loan smart contract. Obviously, according to the scheme provided in the embodiments of the present application, the user can initiate pre-sale of the digital asset he pledges at any time according to actual needs, and once the buyer is matched, the user can first pay the redemption fee of the digital asset through the loan smart contract, so as to ensure that the digital asset can be sold smoothly, and the user can avoid missing the transaction opportunity due to the lack of redemption ability.
[0132] Optionally, the loan smart contract is configured to monitor a repayment deadline of the loan resources borrowed by the first user from the loan smart contract, and after the repayment deadline expires, submit a fourth blockchain transaction to the blockchain, wherein the fourth blockchain transaction is used to transfer the loan resources used to repay the loan resources borrowed by the first user from the loan smart contract to the loan smart contract. The loan resources transferred by the fourth blockchain transaction are provided by the electronic wallet of the first user.
[0133] Optionally, the mortgage service smart contract is configured to change the ownership of the target digital asset to the first user after receiving the redemption resources of the target digital asset, wherein the repayment deadline takes effect after the second blockchain transaction is submitted, and the effective period of the repayment deadline is less than the time consumption of converting the second blockchain transaction into block data, so that the fourth blockchain transaction and the second blockchain transaction are written into the same block for blockchain consensus.
[0134] Optionally, the redemption response module 930 executes the loan smart contract of the blockchain based on the target digital asset redemption request initiated by the first user, including: confirming whether the pre-sale fund resource transferred by the first blockchain transaction is greater than or equal to the redemption resource of the target digital asset; if yes, executing the loan smart contract of the blockchain based on the target digital asset redemption request initiated by the first user.
[0135] Optionally, the loan smart contract is provided with a service charge resource of the first blockchain transaction, and the third blockchain transaction is further used for transferring the service charge resource to the electronic wallet of the first user; the redemption response module 930 confirms whether the pre-sale fund resource transferred by the first blockchain transaction is greater than or equal to the redemption resource of the target digital asset, including: confirming whether the pre-sale fund resource transferred by the first blockchain transaction is greater than or equal to the sum of the redemption resource of the target digital asset and the service charge resource.
[0136] Optionally, the mortgage service includes one of a loan service and a mortgage lease service for the target digital asset.
[0137] The call address of the redemption request is the address of the loan smart contract, and the redemption request indicates the address of the mortgage service smart contract and the redemption resource of the first digital asset; the redemption response module 930 executes the loan smart contract of the blockchain, including: according to the call address of the redemption request, calling the loan smart contract in the blockchain, and inputting the address of the mortgage service smart contract and the redemption resource of the first digital asset indicated by the redemption request into the loan smart contract, to execute the loan logic of the loan smart contract, and submitting the second blockchain transaction to the blockchain.
[0138] Obviously, Figure 9 The processing device shown can be used as Figure 2 The execution subject of the method shown, so the method can be implemented in Figure 2 The steps and corresponding functions shown. Since the principles are the same, they will not be described in detail here.
[0139] Figure 10 is a structural schematic diagram of an electronic device according to an embodiment of the present specification. Please refer to Figure 10 At the hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The memory may contain a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. Of course, the electronic device may also include other hardware required by the business.
[0140] The processor, the network interface and the memory can be connected with each other through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 10 Only one bidirectional arrow is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0141] The memory is used to store programs. Specifically, the program can include program code including computer operation instructions. The memory can include an internal memory and a non-volatile memory, and provide instructions and data for the processor.
[0142] Optionally, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs, and forms the above-mentioned Figure 9 The processing device shown in the figure. Correspondingly, the processor executes the program stored in the memory, and is specifically used for executing the following operations:
[0143] Based on a pre-sale request of a target digital asset initiated by a first user, a pre-sale smart contract for pre-selling the target digital asset is deployed in the blockchain, wherein the target digital asset is a collateral of the first user based on a collateral service smart contract in the blockchain, and the target digital asset is changed from the first user to the collateral service smart contract after being mortgaged.
[0144] Based on a purchase request of a target digital asset initiated by a second user, the pre-sale smart contract is run to execute: after the second user pays a pre-sale resource of the target digital asset to the pre-sale smart contract, a first blockchain transaction is submitted to the blockchain, the first blockchain transaction is used to transfer the pre-sale resource of the target digital asset to the pre-sale smart contract, and the pre-sale resource transferred by the first blockchain transaction is provided by an electronic wallet of the second user.
[0145] based on the first user initiating the redemption request of the target digital asset, running the loan smart contract of the blockchain to perform: submitting a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer-in the redemption resource of the target digital asset to the mortgage service smart contract, the redemption resource transferred-in by the second blockchain transaction is the loan resource borrowed by the first user from the loan smart contract, and after receiving the redemption resource of the target digital asset, the mortgage service smart contract changes the ownership of the target digital asset from the mortgage service smart contract to the first user.
[0146] based on the first user initiating the sale request of the target digital asset, running the pre-sale smart contract to perform: submitting a third blockchain transaction to the blockchain, and changing the ownership of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer-in the pre-sale resource of the target digital asset to the electronic wallet of the first user, and the pre-sale resource of the target digital asset transferred-in is used to repay the loan resource borrowed by the first user from the loan smart contract.
[0147] The method for processing the blockchain digital asset disclosed in the embodiments of the present application can be applied to a processor and implemented by the processor. The processor can be an integrated circuit chip with processing capability. In the implementation process, each step of the method can be completed by the integrated logic circuit in the hardware of the processor or the instruction in the form of software. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium in the memory is read by the processor, and the hardware thereof is combined to complete the steps of the above method.
[0148] Of course, in addition to the software implementation, the electronic device of the present application does not exclude other implementation manners, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0149] In addition, the embodiments of the present application also propose a computer readable storage medium, which stores one or more programs, and the one or more programs include instructions.
[0150] Optionally, the above instructions, when executed by the portable electronic device including a plurality of application programs, can enable the portable electronic device to perform the steps of the method shown. Figure 2 The steps of the method shown include:
[0151] deploy, in the blockchain, a presale smart contract for preselling a target digital asset based on a presale request of the target digital asset initiated by a first user, wherein the target digital asset is a collateral of the first user based on a collateral service smart contract in the blockchain, and an owner of the target digital asset is changed from the first user to the collateral service smart contract after the target digital asset is collateralized.
[0152] run the presale smart contract to execute, based on a purchase request of a target digital asset initiated by a second user, a first blockchain transaction for transferring, to the presale smart contract, a presale resource of the target digital asset after the second user pays the presale resource of the target digital asset to the presale smart contract, and submit, to the blockchain, the first blockchain transaction.
[0153] run a loan smart contract of the blockchain to execute, based on a redemption request of a target digital asset initiated by the first user, a second blockchain transaction for transferring, to the collateral service smart contract, a redemption resource of the target digital asset, wherein the redemption resource transferred by the second blockchain transaction is a loan resource borrowed by the first user from the loan smart contract, and change, by the collateral service smart contract, the owner of the target digital asset from the collateral service smart contract to the first user after the collateral service smart contract receives the redemption resource of the target digital asset.
[0154] run the presale smart contract to execute, based on a sale request of a target digital asset initiated by the first user, a third blockchain transaction for transferring, to an electronic wallet of the first user, a presale resource of the target digital asset, and change the owner of the target digital asset to the second user, wherein the presale resource of the target digital asset transferred by the third blockchain transaction is used to repay a loan resource borrowed by the first user from the loan smart contract.
[0155] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Accordingly, the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present specification can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code.
[0156] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order and still accomplish the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or necessary.
[0157] The above merely provides an example of the present specification and is not intended to limit the present specification. The present specification can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present specification shall be included in the scope of claims of the present specification. In addition, all other embodiments obtained by those of ordinary skill in the art without creative labor shall belong to the protection scope of the present document.
Claims
1. A method for processing blockchain digital assets, applied to any node device in a blockchain, characterized in that, include: Based on the pre-sale request for the target digital asset initiated by the first user, a pre-sale smart contract for pre-selling the target digital asset is deployed in the blockchain. The target digital asset is collateral used by the first user as collateral based on the collateral service smart contract in the blockchain. After the collateral is pledged, the owner of the target digital asset changes from the first user to the collateral service smart contract. Based on the purchase request initiated by the second user for the target digital asset, the pre-sale smart contract is executed to perform the following: after the second user pays the pre-sale funds of the target digital asset to the pre-sale smart contract, a first blockchain transaction is submitted to the blockchain. The first blockchain transaction is used to transfer the pre-sale funds of the target digital asset to the pre-sale smart contract. The pre-sale funds transferred in the first blockchain transaction are provided by the second user's electronic wallet. Based on the redemption request for the target digital asset initiated by the first user, the loan smart contract of the blockchain is executed to perform: submitting a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer the redemption resources of the target digital asset to the mortgage service smart contract, the redemption resources transferred by the second blockchain transaction are the loan resources borrowed by the first user from the loan smart contract, and after receiving the redemption resources of the target digital asset, the mortgage service smart contract changes the owner of the target digital asset from the mortgage service smart contract to the first user; Based on the sale request of the target digital asset initiated by the first user, the pre-sale smart contract is executed to perform: submitting a third blockchain transaction to the blockchain and changing the owner of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer the pre-sale funds of the target digital asset to the first user's e-wallet, and the transferred pre-sale funds of the target digital asset are used to repay the loan funds borrowed by the first user from the loan smart contract.
2. The method according to claim 1, characterized in that, The loan smart contract is configured to monitor the repayment period of the loan borrowed by the first user and, upon the expiration of the repayment period, submit a fourth blockchain transaction to the blockchain. The fourth blockchain transaction is used to transfer loan resources to the loan smart contract for repaying the loan borrowed by the first user. The loan resources transferred in the fourth blockchain transaction are provided by the first user's e-wallet.
3. The method according to claim 2, characterized in that, The return period takes effect after the second blockchain transaction is submitted, and the validity period of the return period is less than the time it takes for the second blockchain transaction to be converted into block data, so that the fourth blockchain transaction and the second blockchain transaction are written into the same block for blockchain consensus.
4. The method according to claim 3, characterized in that, The process of executing the loan smart contract on the blockchain based on the redemption request for the target digital asset initiated by the first user includes: Confirm whether the pre-sale funds transferred in the first blockchain transaction are greater than or equal to the redemption resources of the target digital asset; If so, the loan smart contract of the blockchain is executed based on the redemption request for the target digital asset initiated by the first user.
5. The method according to claim 4, characterized in that, The loan smart contract is configured with transaction fee resources for submitting the second blockchain transaction, and the third blockchain transaction is also used to transfer the transaction fee resources to the first user's e-wallet; confirming whether the pre-sale funds transferred in the first blockchain transaction are greater than or equal to the redemption resources of the target digital asset includes: Confirm whether the pre-sale funds transferred in the first blockchain transaction are greater than or equal to the sum of the redemption resources of the target digital asset and the transaction fee resources.
6. The method according to any one of claims 1 to 5, characterized in that, The mortgage service smart contract provides mortgage services including either mortgage lending or mortgage leasing services for the target digital asset.
7. The method according to any one of claims 1 to 5, characterized in that, The redemption request is invoked at the address of the loan smart contract, and the redemption request indicates the address of the mortgage service smart contract and the redemption resources of the first digital asset. The loan smart contract running the blockchain includes: Based on the calling address of the redemption request, the loan smart contract is retrieved from the blockchain, and the address of the mortgage service smart contract indicated by the redemption request and the redemption resources of the first digital asset are input into the loan smart contract to run the loan logic of the loan smart contract and submit the second blockchain transaction to the blockchain.
8. A device for processing blockchain digital assets, characterized in that, include: The pre-sale response module is used to deploy a pre-sale smart contract in the blockchain to pre-sell the target digital asset based on the pre-sale request initiated by the first user. The target digital asset is collateral used by the first user as collateral based on the collateral service smart contract in the blockchain. After the collateral is used, the owner of the target digital asset changes from the first user to the collateral service smart contract. The purchase response module is used to execute the pre-sale smart contract based on the purchase request initiated by the second user for the target digital asset: after the second user pays the pre-sale funds of the target digital asset to the pre-sale smart contract, the module submits a first blockchain transaction to the blockchain. The first blockchain transaction is used to transfer the pre-sale funds of the target digital asset to the pre-sale smart contract. The pre-sale funds transferred in the first blockchain transaction are provided by the second user's electronic wallet. The redemption response module is used to execute the loan smart contract of the blockchain based on the redemption request of the target digital asset initiated by the first user: submitting a second blockchain transaction to the blockchain, wherein the second blockchain transaction is used to transfer the redemption resources of the target digital asset to the collateral service smart contract, the redemption resources transferred by the first blockchain transaction are the loan resources borrowed by the first user from the loan smart contract, and after receiving the redemption resources of the target digital asset, the collateral service smart contract changes the owner of the target digital asset from the collateral service smart contract to the first user; The sale response module is used to execute the pre-sale smart contract based on the sale request of the target digital asset initiated by the first user: submitting a third blockchain transaction to the blockchain and changing the owner of the target digital asset to the second user, wherein the third blockchain transaction is used to transfer the pre-sale funds of the target digital asset to the first user's e-wallet, and the transferred pre-sale funds of the target digital asset are used to repay the loan resources borrowed by the first user from the loan smart contract.
9. An electronic device, characterized in that, The device includes: A processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method of processing blockchain digital assets as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store computer-executable instructions, which, when executed by a processor, implement the blockchain digital asset processing method as described in any one of claims 1-7.
Citation Information
Patent Citations
Digital asset transaction method and device based on block chain, equipment and storage medium
CN112686652A
Blockchain loan transaction systems and methods
US20190303926A1