Program and method executed by smart contract
A smart contract program on a blockchain manages prepaid time-limited tokens by recording purchase data to validate payments within their validity period, preventing expired token usage and ensuring system integrity.
Patent Information
- Application Number
- JP2023076367
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-02
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing smart contract systems using ERC20 tokens do not account for a validity period, allowing payments to be made with expired tokens, which undermines the integrity of prepaid token systems.
A smart contract program that manages prepaid time-limited tokens by recording purchase amounts and dates on a blockchain, enabling validation of token payments within their validity period.
Ensures that payments using expired tokens are invalidated, maintaining the integrity of prepaid token systems by ensuring only valid tokens are accepted for transactions.
Smart Images

Figure 2024160876000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a program and a method implemented by a smart contract. [Background technology]
[0002] There are known services that issue payment instruments that are not legal tender, such as in-service currencies that are valid only within a specific service. Patent Document 1 discloses an example of an online game that provides this type of payment instrument.
[0003] Meanwhile, the provision of payment instruments is subject to regulations by laws such as the "Act on Settlement of Funds (Settlement of Funds Act)" and the "Enforcement Order of the Act on Settlement of Funds (Enforcement Order of the Settlement of Funds Act)." This is to ensure the proper implementation of services related to settlement of funds, to protect users, and to promote the provision of said services (Article 1 of the Settlement of Funds Act). According to the Settlement of Funds Act, payment instruments that meet the following four requirements are called "prepaid payment instruments," and in order to protect users, numerous obligations are imposed on the issuers (Article 3, Paragraph 1, Item 1 of the Settlement of Funds Act). However, this alone is not enough to promote the provision of services, so exemptions from the application of obligations are provided only when certain requirements are met (Article 4 of the Settlement of Funds Act). One of them is that it "may only be used within a certain period from the date of issue as determined by government ordinance" (Article 4, Paragraph 1, Item 2 of the Settlement Act), and the Settlement Act Enforcement Order stipulates that this certain period (hereinafter referred to as the "validity period") is six months (Settlement Act Enforcement Order Article 4, Paragraph 2). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2019-088421 A Summary of the Invention [Problem to be solved by the invention]
[0005] Incidentally, the applicant of the present application is considering using tokens conforming to the Ethereum standard "ERC20" as the in-service currency described above. Using tokens conforming to "ERC20" as the in-service currency will not only ensure robustness and tamper resistance, but will also enable automatic settlement using smart contracts, greatly improving the efficiency of service provision.
[0006] However, ERC20 does not have the concept of a validity period from the time of receipt of a token. As a result, even if a validity period from the time of receipt of a token was specified in the terms and conditions, it was not possible to invalidate payments made using tokens that had expired, as a blockchain mechanism, and improvement was needed.
[0007] Therefore, one of the objects of the present invention is to provide a program and a method executed by a smart contract that can invalidate payments made using tokens that have expired from the time of receipt as a blockchain mechanism. [Means for solving the problem]
[0008] The program according to the present invention is a program constituting a smart contract recorded on a blockchain, and is a program for causing a computer to execute the following steps: accepting a purchase request for a prepaid time-limited token specifying a purchase amount; and, in response to accepting the purchase request, recording on the blockchain the issuance or transfer of the prepaid time-limited token for the purchase amount to a first account, and adding the purchase amount and purchase date and time to an array corresponding to the first account.
[0009] A method according to the present invention is a method executed by a smart contract recorded on a blockchain, and includes the steps of accepting a purchase request for a prepaid time-limited token specifying a purchase amount, and, in response to accepting the purchase request, recording on the blockchain the issuance or transfer of the prepaid time-limited token for the purchase amount to a first account, and adding the purchase amount and purchase date and time to an array corresponding to the first account. Effect of the Invention
[0010] According to the present invention, since the purchase amount and purchase date and time of the token are stored in an array for each blockchain account, the smart contract can calculate the token balance taking into account the validity period from the time of receipt when making a payment using the token. Therefore, it becomes possible to invalidate payments made using tokens that have expired from the time of receipt as a blockchain mechanism. [Brief description of the drawings]
[0011] [Figure 1] 1 is a diagram showing a configuration of a system including a prepaid time-limited token management system 1 according to an embodiment of the present invention. [Diagram 2] A diagram showing an example of the hardware configuration of each computer that constitutes a user terminal 2, a store device 3, a token management server 4, and a blockchain network 5. [Diagram 3] 1A is a diagram showing an “array for managing prepaid prepaid time-limited tokens per account” (array U) used by smart contract 10 for managing prepaid time-limited tokens, and FIG. 1B is a diagram showing an “array for managing paid prepaid time-limited tokens” (array G) used by smart contract 10 for managing prepaid time-limited tokens. [Figure 4] This is a sequence diagram showing the process of a user purchasing a "prepaid time-limited token" in the case of using a listed "currency token." [Diagram 5]This is a sequence diagram showing the process of a user purchasing a "prepaid time-limited token" in the case of using an unlisted "currency token." [Figure 6] FIG. 11 is a sequence diagram showing a process for checking the balance and total balance for each user of the “prepaid time-limited token.” [Figure 7] FIG. 11 is a sequence diagram showing a process for purchasing a product using a "prepaid time-limited token." DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.
[0013] 1 is a diagram showing the configuration of a system including a prepaid time-limited token management system 1 according to this embodiment. As shown in the figure, the prepaid time-limited token management system 1 has a configuration in which a user terminal 2, a store device 3, a prepaid time-limited token management server 4, and a blockchain network 5 are interconnected via a network 6.
[0014] The prepaid time-limited token management system 1 is a system that issues "prepaid time-limited tokens" that are tokens conforming to "ERC20" as in-service currency and realizes payments using the "prepaid time-limited tokens." Specific examples of such "prepaid time-limited tokens" include in-game currency used in a specific online game, in-site currency that can be used to purchase various products (clothing, books, electrical appliances, non-fungible tokens, etc.) on an EC (Electronic Commerce) site (including app-type sites), and prepaid points that can be used to purchase various products in real stores.
[0015] First, an overview of the processing performed by the prepaid time-limited token management system 1 will be given. First, a prepaid time-limited token management smart contract 10 (hereinafter referred to as the "management SC 10"), which is a program according to the present invention, is pre-recorded in the blockchain realized by the blockchain network 5. The management SC 10 issues a "prepaid time-limited token" in response to a request from the user terminal 2, and performs processing to transfer the token to an externally owned account (described later) of the user of the user terminal 2. This puts the user in possession of the "prepaid time-limited token."
[0016] When issuing a "prepaid time-limited token", the management SC 10 obtains and holds a "currency token" of the same amount as the issued "prepaid time-limited token" by some method. The type of the "currency token" is not particularly limited, and it may be a listed one (Bitcoin, Ethereum, etc.) or an unlisted one. When using a listed "currency token", the management SC 10 transfers a "currency token" of the same amount as the issued "prepaid time-limited token" from the user's external account to the management SC 10. When using an unlisted "currency token", the management SC 10 issues a "currency token" of the same amount as the issued "prepaid time-limited token" to itself when issuing a "prepaid time-limited token".
[0017] A user who wishes to make a payment using a "prepaid time-limited token" at a store (either online or real) requests the management SC 10 to transfer the "prepaid time-limited token" for the payment amount to the store's externally owned account (described below). Upon receiving this request, the management SC 10 burns the "prepaid time-limited token" for the payment amount and transfers the "currency token" for the payment amount from itself to the store's externally owned account. As a result, even though the user paid with the "prepaid time-limited token," the store is able to receive it in the form of a "currency token," and the purchase using the "prepaid time-limited token" is completed.
[0018] Here, it is assumed that the validity period of the "prepaid time-limited token" is determined in the terms and conditions of the "prepaid time-limited token". However, the processing described above alone cannot prevent users from using the "prepaid time-limited token" whose validity period has expired. Therefore, in this embodiment, a customized default smart contract of "ERC20" is used as the management SC 10 so that the validity period can be taken into consideration to determine whether or not payment can be made. Specifically, the management SC 10 stores the purchase amount and purchase date and time of the "prepaid time-limited token" for each user, and at the time of payment, calculates the total amount of the "prepaid time-limited token" whose number of days elapsed from the purchase date and time is within a predetermined validity period, and incorporates a function that does not allow the payment if the calculated total amount is less than the payment amount. In this way, the prepaid time-limited token management system 1 can prevent payments from being made using the "prepaid time-limited token" whose validity period has expired. Below, the configuration of the prepaid time-limited token management system 1 for realizing such processing will be described in detail.
[0019] The user terminal 2 is a terminal used by a user who purchases a "prepaid time-limited token" and makes a payment with the purchased "prepaid time-limited token", and is configured with any computer such as a smartphone, tablet terminal, or personal computer. The user terminal 2 can also be used to check information recorded in the blockchain network 5.
[0020] The in-store device 3 is a computer used by a seller who sells products to users. In one example, the in-store device 3 is a server computer that provides online games and sells game items to users. In another example, the in-store device 3 is a server computer that provides an EC site (including an app-type site) and sells various products to users. In yet another example, the in-store device 3 is a terminal-type computer (including a POS terminal) installed in a real store and performs payment processing for product purchases by users.
[0021] The prepaid time-limited token management server 4 is a computer that sits between the user terminal 2 and the management SC 10 and mediates the purchase of a "prepaid time-limited token" by the user. Hereinafter, the prepaid time-limited token management server 4 is abbreviated to "token management server 4". The token management server 4 may be a server that constitutes an exchange for "currency tokens" or a marketplace for non-fungible tokens. In addition, some or all of the processes described in this embodiment as being performed by the token management server 4 may be performed by the management SC 10.
[0022] The blockchain network 5 is a network of multiple computers connected in a peer-to-peer manner. There are three types of blockchains: a public chain with no specific administrator, a private chain managed by a single organization, and a consortium chain managed by multiple organizations, and the blockchain network 5 may be any of these. In a typical example, the blockchain network 5 may be the Ethereum network or Polygon network, which are classified as public chains, or the LINE blockchain, which is classified as a private chain.
[0023] Users of the blockchain network 5 use the blockchain network 5 through blockchain accounts called externally owned accounts. The blockchain network 5 is also configured to be capable of recording various smart contracts (programs) including the management SC 10. The externally owned accounts are identified by their "wallet addresses," and the smart contracts are identified by their "account contract addresses." Both the externally owned accounts and smart contracts can become the owners of various tokens, including "prepaid time-limited tokens" and "currency tokens."
[0024] The blockchain network 5 is configured to be able to record (mint) various transactions on the blockchain. The various transactions include an issue transaction for newly issuing an account, a smart contract, or a token, a transfer transaction for transferring ownership of a token, and the like.
[0025] The process of minting a transaction into the blockchain network 5 is executed by several computers (hereinafter referred to as "miners") connected to the blockchain network 5. Specifically, each block constituting the blockchain is composed of a block header and data (transaction data) indicating the specific contents of the transaction. Among these, the block header includes a Merkle root, which is data obtained by compressing the size of the transaction data, a hash value of the previous block, and a nonce value, which is an arbitrary character string. In the blockchain network 5, a rule is established that in order to connect a new block to the blockchain, the hash value of the block must satisfy a predetermined condition (for example, the condition that the value starts with "000"). Therefore, a miner who wants to record a block in the blockchain performs an operation (mining) of brute-forcely finding a nonce value so that the hash value of the block header of the block satisfies the above-mentioned predetermined condition. As a result of this operation, the miner who succeeds in finding the nonce value first connects the block to the blockchain, thereby completing the minting of the transaction into the blockchain.
[0026] When the blockchain network 5 is the Ethereum network or the Polygon network, those who wish to mint a transaction onto the blockchain must pay a fee called "gas" in cryptocurrency. Gas is paid as a reward to miners who successfully concatenate a block.
[0027] The externally owned accounts, smart contracts, and transactions of the blockchain are actually stored in one or more of the multiple computers that make up the blockchain network 5. In the following explanation, the processes (including the storage process) that are performed by the smart contract (including the management SC 10) are also actually executed by one of the computers that make up the blockchain network 5.
[0028] 2 is a diagram showing an example of the hardware configuration of each computer constituting the user terminal 2, the store device 3, the token management server 4, and the blockchain network 5. Each computer constituting the user terminal 2, the store device 3, the token management server 4, and the blockchain network 5 may be configured by a computer 100 having the configuration shown in the figure. Note that the computer 100 constituting the store device 3 and the token management server 4 may be a computer configured by combining multiple computers.
[0029] As shown in FIG. 2, the computer 100 has a configuration in which a CPU (Central Processing Unit) 101, a storage device 102, an input device 103, an output device 104, and a communication device 105 are interconnected via a bus .
[0030] The CPU 101 is a device that controls each part of the computer 100 and reads and executes various programs stored in the storage device 102. The storage device 102 includes a main storage device such as a dynamic random access memory (DRAM) and an auxiliary storage device such as a hard disk, and serves to store various programs (including smart contracts) for executing the operating system of the computer 100 and various applications, as well as data used by these programs. The processes shown in various sequence diagrams described later are realized by the CPU 101 of each of the computers constituting the user terminal 2, the store device 3, the token management server 4, and the blockchain network 5 executing the programs stored in the respective storage devices 102.
[0031] The input device 103 is a device that receives external input and supplies it to the CPU 101, and includes, for example, a keyboard, a mouse, and a touch panel. The output device 104 is a device that outputs the processing result of the CPU 101 to the outside, and includes, for example, a display and a speaker.
[0032] The communication device 105 is a device for communicating with external devices, and transmits and receives data according to instructions from the CPU 101. Each of the user terminal 2, the store device 3, the token management server 4, and the computers constituting the blockchain network 5 is configured to use this communication device 105 to communicate with other devices including the network 6 shown in FIG.
[0033] FIG. 3(a) is a diagram showing an "array for managing prepaid time-limited tokens paid out per account" (hereinafter referred to as "array U") used by the management SC 10, and FIG. 3(b) is a diagram showing an "array for managing prepaid time-limited tokens paid out per account" (hereinafter referred to as "array G") used by the management SC 10. These arrays U and G are actually written in the source code of the management SC 10. The management SC 10 uses these arrays U and G in the process it performs to prevent payments from being made with "prepaid time-limited tokens" that have expired.
[0034] Array U is an array that stores the purchase amount and purchase date and time of a "prepaid time-limited token", and is provided for each externally owned account of a user. Therefore, array U corresponding to a certain externally owned account stores a list of the purchase amounts and purchase dates and times of "prepaid time-limited tokens" for that externally owned account. In contrast, array G is an array that stores the purchase amounts and purchase dates and times of all "prepaid time-limited tokens". Therefore, array G is an array that contains the contents of all arrays U.
[0035] Fig. 4 is a sequence diagram showing the process of purchasing a "prepaid time-limited token" by a user in the case of using a listed "currency token". As shown in the figure, in this case, the user must first purchase and possess a "currency token" equivalent to the purchase amount of the "prepaid time-limited token" that he or she is about to purchase (step S1). Specifically, the "currency token" whose owner is the user's externally owned account must be recorded in the blockchain network 5.
[0036] When a user requests the purchase of a "prepaid time-limited token" from the user terminal 2 by specifying the purchase amount to the token management server 4 (step S2), the token management server 4 requests the user terminal 2 to transfer a "currency token" equivalent to the purchase amount to the management SC 10 (step S3).
[0037] The user terminal 2 that has received the request in step S3 executes a process for transferring "currency tokens" equivalent to the purchase amount to the management SC 10 via the token management server 4 (step S4). Specifically, a process is performed for recording a transfer transaction for transferring "currency tokens" equivalent to the purchase amount from the user's external account to the management SC 10 in the blockchain network 5. Note that, although an example is described here in which the token management server 4 executes the recording of the transfer transaction in the blockchain network 5, it may be executed by another server that mediates token transactions.
[0038] Next, the token management server 4 checks the blockchain (step S5) and determines whether the transfer of the "currency token" equivalent to the purchase amount to the management SC 10 has been completed (step S6). If the token management server 4 determines that the transfer has not been completed, it returns an error (purchase not possible) to the user terminal 2. In this case, the "prepaid time-limited token" will not be paid out to the user.
[0039] On the other hand, the token management server 4 that has determined completion in step S6 instructs the management SC 10 to issue a "prepaid time-limited token" equivalent to the purchase amount specified in step S2 (step S7). The management SC 10 that has received this instruction issues a "prepaid time-limited token" equivalent to the purchase amount to the management SC 10 (step S8). Specifically, it performs a process of recording an issuance transaction indicating the issuance of a "prepaid time-limited token" equivalent to the purchase amount to the management SC 10 in the blockchain. After that, the management SC 10 transfers the "prepaid time-limited token" issued in step S8 to the external account of the user who requested the purchase of the "prepaid time-limited token" (step S9). Specifically, it performs a process of recording a transfer transaction indicating the transfer of the "prepaid time-limited token" issued in step S8 from the management SC 10 to the external account of the user in the blockchain.
[0040] After step S9 is completed, the management SC 10 adds information about the newly issued "prepaid time-limited token" to each of the arrays U and G (step S10). Specifically, as shown in FIG. 3, a record including the purchase amount and purchase date and time is added to each of the arrays U and G.
[0041] After this, the user may, if necessary, confirm that the purchased "prepaid time-limited token" has been added to his / her externally owned account (step S11). Specifically, the user may confirm by accessing his / her wallet using a blockchain explorer such as "Etherscan" or by accessing his / her wallet via the token management server 4. By performing this confirmation, the user can confirm that the "prepaid time-limited token" he / she requested to purchase in step S2 has been successfully acquired by the user.
[0042] 5 is a sequence diagram showing the process of purchasing a "prepaid time-limited token" by a user when using an unlisted "currency token." In this case, first, a purchase request for a "prepaid time-limited token" specifying the purchase amount is sent from the user terminal 2 to the token management server 4 (step S20). Upon receiving this request, the token management server 4 executes a predetermined settlement process with the user terminal 2 (step S21). This settlement process is carried out using legal tender or listed virtual currency.
[0043] The token management server 4 that executed the payment process determines whether the payment is complete (step S22). If the token management server 4 determines that the payment is not complete, it returns an error (purchase not possible) to the user terminal 2. In this case, the "prepaid time-limited token" will not be paid out to the user.
[0044] On the other hand, the token management server 4 that has determined completion in step S22 instructs the management SC 10 to issue a "prepaid time-limited token" and a "currency token" equivalent to the purchase amount specified in step S20 (step S23). Upon receiving this instruction, the management SC 10 issues a "prepaid time-limited token" and a "currency token" equivalent to the purchase amount to the management SC 10 (step S24). Specifically, a process is performed to record in the blockchain an issue transaction indicating the issuance to the management SC 10 of a "prepaid time-limited token" equivalent to the purchase amount, and an issue transaction indicating the issuance to the management SC 10 of a "currency token" equivalent to the purchase amount.
[0045] The subsequent processing is the same as steps S9 to S11 shown in Fig. 4 (steps S25 to S27). As a result, as in the case of Fig. 4, a "prepaid time-limited token" is added to the user's externally owned account, and a "currency token" of the same amount is added to the management SC10, and a record including the purchase amount and purchase date and time is added to arrays U and G.
[0046] Fig. 6 is a sequence diagram showing a process for checking the balance and total balance of each user of the "prepaid time-limited token". This diagram shows a process for the administrator of the prepaid time-limited token management system 1 to check the balance and total balance of each user of the "prepaid time-limited token" within the validity period for the "prepaid time-limited token" issued by the process of Fig. 4 or Fig. 5.
[0047] First, the process of checking the balance of a "prepaid time-limited token" for each user will be explained. The administrator requests the management SC 10 to check the balance by specifying a wallet address from the token management server 4 (step S30). Upon receiving this request, the management SC 10 refers to array U corresponding to the externally owned account identified by the specified wallet address, and extracts records in which the number of days elapsed since the purchase date and time is within a specified validity period. Then, by calculating the total purchase amount contained in the extracted records, it calculates the balance within the validity period corresponding to the specified wallet address (step S31).
[0048] The management SC 10 that performed the calculation in step S31 returns the calculated balance to the token management server 4. This allows the administrator to know the balance of the "prepaid time-limited tokens" that are within their validity periods and correspond to the wallet address specified in step S30, and therefore makes it possible to know the valid balance of the "prepaid time-limited tokens" for each user.
[0049] Next, the process of checking the total balance of the "prepaid time-limited token" will be explained. The administrator requests the management SC 10 to check the total balance from the token management server 4 (step S40). Upon receiving this request, the management SC 10 refers to array G and extracts records in which the number of days elapsed since the purchase date and time is within a predetermined validity period. Then, the total purchase amount included in the extracted records is calculated to calculate the total balance within the validity period (step S41).
[0050] The management SC 10 that performed the calculation in step S41 returns the calculated total balance to the token management server 4. This allows the manager to know the total balance of the "prepaid time-limited tokens" within the validity period.
[0051] As described above, according to the management SC 10 of this embodiment, the administrator of the prepaid time-limited token management system 1 can know the balance of each user and the total balance of the "prepaid time-limited token" within the validity period. Note that, although the management SC 10 of this embodiment calculates the total balance using the array G, the management SC 10 may calculate the total balance by adding up the balances of each array U. In this case, it is not necessary to write the array G in the source code of the management SC 10, and in the above-mentioned steps S10 and S26, it is sufficient to add the information of the newly issued "prepaid time-limited token" only to the array U.
[0052] 7 is a sequence diagram showing a process for purchasing a product with a "prepaid time-limited token." This process is started when a user who is about to purchase a product at an online or real store operates the user terminal 2, and a transfer request for "prepaid time-limited tokens" for an amount n (payment amount) to the store's externally owned account is sent from the user terminal 2 to the management SC 10 (step S50). This transfer request includes information identifying the user's externally owned account (first account) as the transfer source (specifically, the wallet address of the user's externally owned account) and information identifying the store's externally owned account (second account) as the transfer destination (specifically, the wallet address of the store's externally owned account).
[0053] Upon receiving the transfer request in step S50, the management SC 10 first performs a process to delete expired records from arrays U and G (step S51). Specifically, records for which the number of days elapsed since the purchase date and time exceeds a predetermined validity period are extracted and deleted from arrays U and G. Note that the array U to be processed in step S51 is all arrays U stored in the management SC 10.
[0054] Next, the management SC 10 refers to the array U corresponding to the externally owned account of the user who sent the transfer request, and calculates the total purchase amount included in the records whose number of days elapsed since the purchase date and time is within the specified validity period, thereby calculating the remaining balance within the validity period corresponding to the externally owned account of the user (step S52). In the example of FIG. 7, since the expired records are deleted from the array U in step S51, at the stage of step S52, "records whose number of days elapsed since the purchase date and time is within the specified validity period" is equal to all records included in the array U. Therefore, in step S52, it is sufficient to calculate the total purchase amount included in all records. It is also possible not to perform the process of step S51 before step S52, in which case, in step S52, it is sufficient to extract records whose number of days elapsed since the purchase date and time does not exceed the specified validity period, and calculate the total purchase amount included in the extracted records.
[0055] Next, the management SC 10 judges whether the balance calculated in step S52 is equal to or greater than the amount n (step S53). If the management SC 10 judges that the balance is less than the amount n, it returns an error (transfer not possible) to the user terminal 2. In this case, the transfer of the "prepaid time-limited token" is not executed, and the user cannot purchase the product.
[0056] On the other hand, if management SC 10 determines in step S53 that the balance is equal to or greater than the amount n, it deletes records for the amount n from arrays U and G in order of oldest purchase date and time (step S54). In this case, if, as a result of deleting the records in order of oldest purchase date and time, the purchase amount entered in the record to be deleted next is less than the remaining amount (i.e., a fractional amount is entered), management SC 10 performs a process to reduce the purchase amount entered in that record by the remaining amount.
[0057] Next, the management SC 10 burns the "prepaid time-limited tokens" of the amount n among the "prepaid time-limited tokens" owned by the externally owned account of the user who sent the transfer request in step S50 (step S55), and transfers the "currency tokens" of the amount n from the management SC to the externally owned account of the store (step S56). To explain in detail, first, in the process of step S55, the management SC 10 records in the blockchain a transfer transaction for transferring the "prepaid time-limited tokens" of the amount n from the externally owned account of the user to a predetermined burning account (an account whose private key is not known by anyone. For example, an account identified by a wallet address whose digits are all 0). As a result of this recording, the burned "prepaid time-limited tokens" become in a state where they can never be used for payment again. Next, in the process of step S56, the management SC 10 performs a process for recording in the blockchain a transfer transaction indicating the transfer of the "currency tokens" of the amount n from the management SC 10 to the externally owned account of the store. This will result in the transfer of "currency tokens" equal to the amount of "prepaid time-limited tokens" paid by the user to the store's externally owned account.
[0058] Next, the store device 3 confirms that n-amount worth of "currency tokens" have been added to the store's externally owned account (step S57). Specifically, similar to step S11 in FIG. 4, confirmation can be made using a blockchain explorer or the token management server 4. After confirming that n-amount worth of "currency tokens" have been added to the store's externally owned account, the store device 3 performs a process to deliver the product to the user terminal 2 (step S58). Note that if the store device 3 is a device installed in a real store, the product may be delivered to the user by hand.
[0059] As described above, according to the prepaid time-limited token management system 1 of this embodiment, the purchase amount and purchase date and time of the "prepaid time-limited token" are stored in the array U for each user's externally owned account, so that the management SC 10 can calculate the balance of the user's "prepaid time-limited token" taking into account the validity period from the time of receipt when making a payment using the "prepaid time-limited token." Therefore, it becomes possible to invalidate payments made using "prepaid time-limited tokens" that have expired from the time of receipt as a blockchain mechanism.
[0060] In addition, when a "prepaid time-limited token" is paid out to a user, a "currency token" of the same amount is held in the management SC10. Therefore, when a user makes a payment using a "prepaid time-limited token," it is possible to pay the store with the "currency token" of the same amount, rather than the "prepaid time-limited token" paid by the user.
[0061] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and it goes without saying that the present invention can be embodied in various forms without departing from the spirit of the present invention.
[0062] For example, in the above embodiment, after issuing a "prepaid time-limited token" to the management SC10 (steps S8, S24), the "prepaid time-limited token" is transferred to the user's externally owned account (steps S9, S25), but it is also possible to issue the "prepaid time-limited token" directly to the user's externally owned account without going through the management SC10.
[0063] In addition, in the above embodiment, an example was described in which a process is performed to erase expired records from arrays U and G when a transfer request occurs in step S50 of Figure 7.However, this erasure may also be performed at other times (for example, at regular intervals, when the token management server 4 is instructed to issue a ``prepaid time-limited token,'' when the administrator checks the balance of the ``prepaid time-limited token,'' etc.). [Explanation of symbols]
[0064] 1. Prepaid time-limited token management system 2 User terminal 3. Store equipment 4. Prepaid time-limited token management server (token management server) 5. Blockchain Network 6 Network 10 Smart contract for managing prepaid time-limited tokens (Management SC) 100 Computers 101 CPU 102 Storage device 103 Input Device 104 Output Device 105 Communication equipment 106 Bus
Claims
1. A program constituting a smart contract recorded on a blockchain, receiving a request to purchase prepaid time-limited tokens specifying a purchase amount; In response to receiving the purchase request, recording the issuance or transfer of the prepaid time-limited tokens to the first account for the purchase amount on the blockchain and adding the purchase amount and purchase date and time to an array corresponding to the first account; A program for causing a computer to execute the following.
2. receiving a transfer request for the prepaid time-limited token, the transfer request specifying a payment amount, the first account as a transfer source, and a second account different from the first account as a transfer destination; a calculation step of calculating, in response to receiving the transfer request, a total of the purchase amounts stored in the array that are within a predetermined validity period from the purchase date and time; a step of returning information indicating that the transfer is not possible when the total calculated by the calculation step is less than the payment amount; The program according to claim 1 , further causing the computer to execute the steps of:
3. If the total calculated by the calculation step is equal to or greater than the payment amount, recording in the blockchain a transfer of currency tokens equivalent to the payment amount to the second account and deleting a record of the payment amount from the array; The program according to claim 2, further causing the computer to execute the steps of:
4. The recording of the transfer of the currency tokens of the settlement amount to the second account on the blockchain is executed by recording the transfer of the currency tokens recorded on the blockchain with the smart contract as an owner to the second account on the blockchain. The program according to claim 3.
5. When the total calculated by the calculation step is equal to or greater than the payment amount, burning the prepaid time-limited tokens recorded in the blockchain with the first account as the owner, for the payment amount; The program according to claim 3 or 4, further causing the computer to execute the following:
6. 1. A method implemented by a smart contract recorded on a blockchain, comprising: receiving a request to purchase prepaid time-limited tokens specifying a purchase amount; In response to receiving the purchase request, recording the issuance or transfer of the prepaid time-limited tokens to the first account for the purchase amount on the blockchain and adding the purchase amount and purchase date and time to an array corresponding to the first account; The method includes:
Citation Information
Patent Citations
Server system, game system, and program
JP2019088421A
