TWM607492U - System and server for cryptographic currency conversion on blockchain - Google Patents
System and server for cryptographic currency conversion on blockchain Download PDFInfo
- Publication number
- TWM607492U TWM607492U TW109212507U TW109212507U TWM607492U TW M607492 U TWM607492 U TW M607492U TW 109212507 U TW109212507 U TW 109212507U TW 109212507 U TW109212507 U TW 109212507U TW M607492 U TWM607492 U TW M607492U
- Authority
- TW
- Taiwan
- Prior art keywords
- conversion
- currency
- erc20
- server
- encrypted currency
- Prior art date
Links
Images
Landscapes
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
本新型關於一種轉換系統,特別關於一種用於區塊鏈(blockchain)的加密貨幣(cryptographic currency)轉換系統與伺服器。The present invention relates to a conversion system, in particular to a cryptographic currency conversion system and server for blockchain.
區塊鏈是採取共識化演算法的分散式數位帳本,而目前應用區塊鏈技術中最廣泛為人所知的即是加密貨幣。基於區塊鏈技術的加密貨幣,其具有去中心化的特性,不受各國政府央行監管。同時,加密貨幣交易的紀錄原則上是永久存在且不可回溯修改,並且可被驗證和可被追溯。舉例來說,傳統的去中心化交易流程是交易的一方發起,以其用戶私鑰進行簽名,並將該交易內容及其數位簽名提交至區塊鏈上,由各節點進行驗證及記錄。為了確保安全性,交易的相對人通常不會只等待一次確認(confirmation)就認為該筆交易已完成。Blockchain is a decentralized digital ledger that adopts a consensus algorithm, and the most widely known application of blockchain technology is cryptocurrency. Encrypted currency based on blockchain technology has the characteristics of decentralization and is not subject to the supervision of central banks of governments. At the same time, in principle, the record of cryptocurrency transactions is permanent and cannot be retrospectively modified, and can be verified and traceable. For example, a traditional decentralized transaction process is initiated by a party of the transaction, signed with its user's private key, and submitted the transaction content and its digital signature to the blockchain, which are verified and recorded by each node. In order to ensure security, the counterparty of the transaction usually does not wait for a confirmation (confirmation) to think that the transaction has been completed.
一般來說,要在區塊鏈上進行加密貨幣的幣別轉換,需要使用者將其私鑰、欲轉換的幣種在貨幣交易所掛單後,依據使用者設定的轉換匯率與數量等待系統的撮合。然而,這種直接在交易所掛單,以及等待系統撮合的過程中,如果使用者設定的轉換匯率與賣方要求的轉換匯率一直不相同的話,則往往會花費相當多的等待時間。Generally speaking, to carry out the currency conversion of encrypted currencies on the blockchain, the user needs to place his private key and the currency to be converted on the currency exchange, and wait for the system according to the conversion rate and quantity set by the user. Match up. However, in the process of placing orders directly on the exchange and waiting for the system to match, if the conversion rate set by the user is always different from the conversion rate requested by the seller, it will often take a considerable amount of waiting time.
本新型的目的為提供一種區塊鏈的加密貨幣轉換系統與伺服器。本新型有別於傳統在交易所掛單交易的換匯方式,其可供使用者以更簡便與快速的方式將以太幣更換成ERC20加密貨幣,可有效解決使用者自行在交易所掛單交易及撮合等待時間。The purpose of the present invention is to provide a blockchain encryption currency conversion system and server. This new model is different from the traditional exchange method of placing orders on exchanges. It allows users to exchange Ether into ERC20 cryptocurrency in a simpler and faster way, which can effectively solve users’ order transactions and matchmaking on exchanges. waiting time.
本新型提出一種區塊鏈的加密貨幣轉換系統,包括一使用者端計算機裝置、一伺服器以及一區塊鏈網路。使用者端計算機裝置產生一加密貨幣轉換資料,其中該加密貨幣轉換資料包括有一使用者簽名資料、一錢包位址資料與一轉換匯率,該錢包位址資料對應有以太幣。伺服器與該使用者端計算機裝置耦接,該伺服器根據該加密貨幣轉換資料產生一買單資訊,其中該買單資訊包括有該加密貨幣轉換資料。區塊鏈網路分別與該使用者端計算機裝置及該伺服器耦接,該區塊鏈網路具有一換幣智能合約,該換幣智能合約根據該買單資訊的該轉換匯率將該錢包位址資料所對應的該以太幣,轉換成對應的一ERC20加密貨幣,且於轉換完成後進行認證與記錄。The present invention proposes a blockchain encryption currency conversion system, which includes a user-side computer device, a server, and a blockchain network. The user-side computer device generates an encrypted currency conversion data, where the encrypted currency conversion data includes a user signature data, a wallet address data, and a conversion exchange rate, and the wallet address data corresponds to Ether. The server is coupled to the user-side computer device, and the server generates a purchase order information according to the encrypted currency conversion data, wherein the purchase order information includes the encrypted currency conversion data. The blockchain network is respectively coupled to the user-side computer device and the server. The blockchain network has a currency swap smart contract. The currency swap smart contract positions the wallet according to the conversion rate of the purchase order information. The ether corresponding to the address data is converted into a corresponding ERC20 encrypted currency, and authentication and recording are performed after the conversion is completed.
另外,本新型還提出一種區塊鏈的加密貨幣轉換方法,該方法包括有下列步驟:由一使用者端計算機裝置產生一加密貨幣轉換資料,其中該加密貨幣轉換資料包括有一使用者簽名資料、一錢包位址資料與一轉換匯率,該錢包位址資料對應有以太幣;由一伺服器根據該加密貨幣轉換資料產生一買單資訊,其中該買單資訊包括有該加密貨幣轉換資料;以及,由一區塊鏈網路的一換幣智能合約根據該買單資訊的該轉換匯率將該錢包位址資料所對應的該以太幣,轉換成對應的一ERC20加密貨幣,且於轉換完成後進行認證與記錄。In addition, the present invention also proposes a blockchain-based encrypted currency conversion method. The method includes the following steps: a user-side computer device generates an encrypted currency conversion data, wherein the encrypted currency conversion data includes a user signature data, A wallet address data and a conversion exchange rate, the wallet address data corresponds to Ether; a server generates a purchase order information based on the encrypted currency conversion data, where the purchase order information includes the encrypted currency conversion data; and A currency swap smart contract of a blockchain network converts the ether corresponding to the wallet address data into a corresponding ERC20 cryptocurrency according to the conversion rate of the purchase order information, and performs authentication and verification after the conversion is completed. recording.
在一實施例中,加密貨幣轉換資料進一步包括有一轉換幣別與一轉換數量,該轉換幣別為該ERC20加密貨幣。In one embodiment, the encrypted currency conversion data further includes a conversion currency and a conversion quantity, and the conversion currency is the ERC20 encrypted currency.
在一實施例中,伺服器根據該加密貨幣轉換資料,在該使用者端計算機裝置中生成一使用者介面,使用者介面包括有該錢包位址資料所對應的該以太幣的餘額、該轉換幣別與該轉換匯率。In one embodiment, the server generates a user interface in the user-side computer device based on the encrypted currency conversion data, and the user interface includes the balance of the ether corresponding to the wallet address data, and the conversion Currency and the conversion rate.
在一實施例中,使用者介面進一步包括有該ERC20加密貨幣的餘額。In one embodiment, the user interface further includes the balance of the ERC20 encrypted currency.
在一實施例中,伺服器或擁有該ERC20加密貨幣的賣方決定該轉換匯率。In one embodiment, the server or the seller who owns the ERC20 encrypted currency determines the conversion rate.
在一實施例中,使用者介面進一步讓一使用者輸入該轉換數量。In one embodiment, the user interface further allows a user to input the conversion amount.
在一實施例中,換幣智能合約將該以太幣轉換成對應的另一種ERC20加密貨幣後,再於該區塊鏈網路上依照該轉換匯率進行配對、搓合,以將該另一種ERC20加密貨幣轉換成對應的該ERC20加密貨幣。In one embodiment, the currency swap smart contract converts the ether into another corresponding ERC20 encrypted currency, and then matches and mixes it on the blockchain network according to the conversion rate to encrypt the other ERC20 The currency is converted into the corresponding ERC20 encrypted currency.
在一實施例中,區塊鏈網路或該伺服器傳送一轉換成功資訊至該使用者端計算機裝置、及/或該ERC20加密貨幣的賣方。In one embodiment, the blockchain network or the server sends a conversion success message to the client computer device and/or the seller of the ERC20 encrypted currency.
在本新型所揭露的加密貨幣轉換系統和伺服器中,會根據使用者端計算機裝置產生的加密貨幣轉換資料產生買單資訊,使換幣智能合約可根據該買單資訊的轉換匯率將該錢包位址資料所對應的以太幣與賣方進行配對、搓合,以轉換成對應的ERC20加密貨幣,待轉換完成後再將該筆轉換交易在區塊鏈網路上進行認證與記錄。如此一來,使用者除了可以更簡便且快速的方式將以太幣更換成ERC20加密貨幣外,由於不需自行在交易所掛單及等待撮合,因此,可有效解決使用者自行在交易所掛單交易及撮合等待時間。In the encrypted currency conversion system and server disclosed in the present invention, the purchase order information is generated based on the encrypted currency conversion data generated by the user-side computer device, so that the currency exchange smart contract can use the wallet address according to the conversion rate of the purchase order information The Ether corresponding to the data is paired and combined with the seller to convert it into the corresponding ERC20 encrypted currency. After the conversion is completed, the conversion transaction will be authenticated and recorded on the blockchain network. In this way, users can exchange Ether into ERC20 cryptocurrency in a simpler and faster way. They don’t need to place orders on the exchange and wait for matching. Therefore, it can effectively solve the problem of users’ placing orders and trading on the exchange by themselves. Matching waiting time.
以下將參照相關圖式,說明依本新型所提供的各種實施例的區塊鏈的加密貨幣轉換系統與伺服器。其中,相同的元件將以相同的參照符號加以說明。Hereinafter, referring to related drawings, the encryption currency conversion system and server of the blockchain according to various embodiments provided by the present invention will be described. Among them, the same elements will be described with the same reference signs.
除非另外定義,否則本文使用的中所有技術和科學術語的涵義,均等同於具有與本新型所屬技術領域的具有通常知識之人所理解的一般意義相同的含義。應該理解的是,本文所使用的術語僅是為了描述特定實施例,而非不是限制性的。Unless otherwise defined, the meanings of all technical and scientific terms used in this article are equivalent to having the same meaning as the general meaning understood by a person with ordinary knowledge in the technical field to which the present invention belongs. It should be understood that the terms used herein are only for describing specific embodiments and are not limiting.
需要說明的是,本新型各實施例中所有方向性指示(諸如上、下、左、右、前、後、…)僅用於解釋在某一特定姿態(如所附的各圖式所示)下各部件之間的相對位置關係、運動情況等,如果該特定姿態發生改變時,則該方向性指示也會相應的隨之改變。It should be noted that all the directional indicators (such as up, down, left, right, front, back,...) in the various embodiments of the present invention are only used to explain in a specific posture (as shown in the attached drawings ) The relative positional relationship, movement situation, etc. between the various components under the following, if the specific posture changes, the directional indication will also change accordingly.
術語「區塊鏈」在本文中是指架構於點對點(peer-to-peer,P2P)網路系統上,並利用密碼學所加密及串聯的交易記錄(各記錄又稱為「區塊(block)」)。各區塊包括了前一個區塊的加密雜湊字串、時間戳記以及交易資料。區塊鏈技術除了利用上述P2P網路架構之外,還利用了非對稱式加密技術(公鑰-私鑰對)、分散式帳本(distributed ledger)、基於共識化演算法的認證機制等,使得區塊內容很難被竄改,且具有可驗證性和可追溯性。因此要進行貨幣或貨品所有權移轉交易時,可由一方直接發起,中間不需要再通過任何金融機構或第三方機構即可完成,故其具有去中心化的特性。目前常見應用於數位貨幣或加密貨幣的交易。而在基於P2P網路架構的區塊鏈網路中,網路中的每台電腦(也稱為「節點」),具有同等的網路計算權利,而網路計算權利可能會因不同區塊鏈的共識演算法的不同而有差異。The term "blockchain" in this article refers to the transaction records that are built on a peer-to-peer (P2P) network system and are encrypted and connected in series by cryptography (each record is also called a "block (block) )”). Each block includes the encrypted hash string, time stamp and transaction data of the previous block. In addition to using the above-mentioned P2P network architecture, blockchain technology also uses asymmetric encryption technology (public key-private key pair), distributed ledger, and authentication mechanism based on consensus algorithms. It makes the block content difficult to be tampered with, and has verifiability and traceability. Therefore, when a currency or goods ownership transfer transaction is to be carried out, it can be initiated directly by one party, and it can be completed without any financial institution or third-party institution in the middle, so it has the characteristics of decentralization. Currently commonly used in digital currency or cryptocurrency transactions. In a blockchain network based on the P2P network architecture, each computer (also called a "node") in the network has the same network computing rights, and the network computing rights may vary by different blocks. The consensus algorithm of the chain is different.
術語「加密貨幣」,於本文中是代表利用區塊鏈技術之非對稱加密、分散式帳本、共識化演算認證機制等技術來確保交易安全及控制交易單位的一種交易媒介。本文中的加密貨幣是一種數位貨幣,其可包括ERC20加密貨幣與非ERC20加密貨幣:例如以太幣(Ethereum、ETH)。其中,ERC20加密貨幣例如但不限於為SBT、BNB、MKR、BAT、CRO、VEN、USDC、REP、OMG、TUSD、HOT、LINK、PAX、ZRX、ICX、ZIL、…或其他加密貨幣(詳細可參考:https://etherscan.io/tokens網頁)。本文中的加密貨幣轉換系統及方法就是將以太幣轉換成ERC20加密貨幣的其中之一。The term "cryptocurrency" in this article refers to a transaction medium that uses blockchain technology's asymmetric encryption, decentralized ledger, consensus calculation and authentication mechanism and other technologies to ensure transaction security and control transaction units. The cryptocurrency in this article is a digital currency, which can include ERC20 cryptocurrency and non-ERC20 cryptocurrency: for example, Ethereum (ETH). Among them, the ERC20 encrypted currency is, for example, but not limited to SBT, BNB, MKR, BAT, CRO, VEN, USDC, REP, OMG, TUSD, HOT, LINK, PAX, ZRX, ICX, ZIL, ... or other encrypted currencies (details can be Reference: https://etherscan.io/tokens webpage). The cryptocurrency conversion system and method in this article is one of converting Ether into ERC20 cryptocurrency.
術語「錢包」及「錢包地址」,於本文中是代表在區塊鏈上交易所使用的加密貨幣所對應的地址,其中記載有對應該地址的貨幣的結算(及貨幣餘額)。其是利用使用者或擁有者的私鑰進行橢圓曲線演算(例如secp256k1)、雜湊函數運算(例如是SHA-256)與編碼(例如是BASE58)所得出的包括英文字母與數字的字串序列(例如0x80a956Ab640Ee8A6E336C9a954bB55f422e3Ac6e)。區塊鏈上交易所使用的錢包可使用諸如非對稱式加密法來形成,其中每一個錢包都有自己獨特的一組成對的公鑰及私鑰。各錢包的公鑰可公開地讓各節點對該錢包進行識別(例如,將加密貨幣轉入該錢包地址),但是私鑰是由該錢包的擁有者所獨有,並用來對該交易進行簽章(例如,藉此用來讓各節點驗證該筆交易是否為真)。The terms "wallet" and "wallet address" in this article refer to the address corresponding to the cryptocurrency used for exchange on the blockchain, and the currency settlement (and currency balance) corresponding to the address is recorded. It uses the user's or owner's private key to perform elliptic curve calculations (such as secp256k1), hash function calculations (such as SHA-256), and encoding (such as BASE58) to obtain a string sequence of English letters and numbers ( For example, 0x80a956Ab640Ee8A6E336C9a954bB55f422e3Ac6e). The wallets used by transactions on the blockchain can be formed using, for example, asymmetric encryption, in which each wallet has its own unique pair of public and private keys. The public key of each wallet can openly allow each node to identify the wallet (for example, transfer encrypted currency to the wallet address), but the private key is unique to the owner of the wallet and is used to sign the transaction Chapter (for example, to allow nodes to verify whether the transaction is true).
術語「智慧合約」或「智能合約」是指以數位形式定義的契約,其是以程式語言所撰寫的計算機協議,當用於區塊鏈,例如以太坊(Ethereum)區塊鏈上時,其是代表以網路方式所傳遞、且可由區塊鏈上的電腦(礦工、網民)所驗證及自動執行的電腦協議。智慧合約(智能合約)無須交易第三方或是中間人存在,也能夠進行可被驗證、可被追蹤而不可逆轉的交易。舉例來說,當交易雙方基於ERC20代幣標準(ERC20 Token Standard)以Solidity語言撰寫一份智慧合約,並將其佈署在以太坊區塊鏈(以下簡稱以太鏈)上而利用以太坊虛擬機(Ethereum virtual machine,EVM)運作,以太鏈上的電腦即會在出現有與該合約相關訊號(或稱「事件/event」,其可例如是該合約所規定的轉帳時間,或是一方已將交易物件交付給另一方)時根據該合約內容執行對應動作(例如自某一錢包地址中提款轉帳)。在以太鏈上佈署及執行智慧合約均需要額外的計算手續費,稱為「燃料/Gas」,「燃料/Gas」可以利用以太幣購買。同樣的,在以太鏈上因應特定事件來執行智慧合約中的對應動作,也是採取共識型加解密演算。在以太鏈上佈署成功的智慧合約也會有專屬的地址,例如是「0x03f8a79ccf94611a512b63d42f5fc3eacf59d3」這種包括英文字母與數字的字串序列。The term "smart contract" or "smart contract" refers to a contract defined in digital form. It is a computer protocol written in a programming language. When used on a blockchain, such as the Ethereum blockchain, its It represents a computer protocol that is transmitted through the network and can be verified and automatically executed by computers (miners, netizens) on the blockchain. Smart contracts (smart contracts) do not require the existence of third parties or intermediaries, and can also conduct transactions that can be verified, traced and irreversible. For example, when both parties to a transaction write a smart contract in Solidity language based on the ERC20 Token Standard, and deploy it on the Ethereum blockchain (hereinafter referred to as the Ethereum chain) and use the Ethereum virtual machine (Ethereum virtual machine, EVM) operation, the computer on the Ethernet chain will have a signal related to the contract (or "event", for example, the transfer time specified in the contract, or one party has transferred When the transaction item is delivered to the other party), the corresponding action is executed according to the content of the contract (for example, withdrawal and transfer from a wallet address). Deploying and executing smart contracts on the Ethereum chain requires additional calculation fees, which are called "fuel/gas", and "fuel/gas" can be purchased with Ether. Similarly, in response to specific events on the Ethereum chain to execute the corresponding actions in the smart contract, consensus encryption and decryption algorithms are also adopted. A smart contract successfully deployed on the Ethereum chain will also have a dedicated address, such as "0x03f8a79ccf94611a512b63d42f5fc3eacf59d3", a string sequence that includes English letters and numbers.
以下將就本文的數個示例性的實施例進行描述。Several exemplary embodiments of this document will be described below.
圖1為本新型一實施例之一種區塊鏈的加密貨幣轉換系統的示意圖。如圖1所示,本實施例之加密貨幣轉換系統包括有一使用者端計算機裝置1、一伺服器2以及一區塊鏈網路3。Fig. 1 is a schematic diagram of a blockchain encryption currency conversion system according to an embodiment of the new type. As shown in FIG. 1, the encrypted currency conversion system of this embodiment includes a user-
使用者端計算機裝置1可以例如是行動裝置、筆記型電腦、桌上型電腦、可網路連線之裝置(例如智慧家電、智慧手錶)或其他計算機裝置等,並不限制。使用者端計算機裝置1可以接受使用者的輸入,並將輸入的資料傳送至伺服器2,以產生對應的動作。The user-
伺服器2與使用者端計算機裝置1耦接,其耦接方式可包括但不限於為無線網路連接或有線網路連接。伺服器2可包括有記憶單元與處理單元。記憶單元可儲存處理單元可執行的指令(例如程式碼)。而處理單元可為伺服器2的核心控制組件,並例如包括一中央處理器(central processing unit, CPU)及/或為其它的控制硬體、軟體或韌體。The
區塊鏈網路3與伺服器2耦接。區塊鏈網路3包括有複數個電腦(或是節點/nodes),其數量並無限制。圖1中雖繪示由電腦31~37等7台電腦/節點所組成的區塊鏈網路3,其目的僅在於進行示例性說明,而非對本文進行任何限制。另外,使用者端計算機裝置1也可以耦接至區塊鏈網路3,例如與區塊鏈網路3中的電腦31以無線或有線方式耦接,進而連接至整個區塊鏈網路3;或者,使用者端計算機裝置1也可以成為區塊鏈網路3之中的一個節點,進而變成區塊鏈網路3中的一部分。The
在本實施例中,當使用者想要將其錢包中的以太幣轉換成ERC 20加密貨幣,則伺服器2可在使用者端計算機裝置1中生成(顯示)貨幣轉換的一使用者介面,以供使用者進行加密貨幣的轉換操作;或者,使用者端計算機裝置1也可下載貨幣轉換的應用程式並執行後,在使用者端計算機裝置1上生成貨幣轉換的使用者介面。In this embodiment, when the user wants to convert the Ether in his wallet into ERC 20 encrypted currency, the
舉例來說,當某一使用者想要將其錢包中的ETH加密貨幣(非ERC 20加密貨幣)轉換成SBT加密貨幣(ERC 20加密貨幣)時,使用者可利用使用者端計算機裝置1向伺服器2發出一貨幣轉換申請,並傳送對應於該轉換申請的一加密貨幣轉換資料,其中,該加密貨幣轉換資料即包括有使用者要用來進行貨幣轉換的一錢包位址資料(即使用者要用來進行轉換的錢包位址)及一使用者簽名資料(即使用者對該筆轉換的數位簽名)。另外,前述的加密貨幣轉換資料進一步可包括有轉換匯率、轉換幣別(ERC20加密貨幣,例如SBT)與轉換數量(要將ETH轉換成SBT的數量)。For example, when a user wants to convert ETH encrypted currency (non-ERC 20 encrypted currency) in his wallet into SBT encrypted currency (ERC 20 encrypted currency), the user can use the user-
前述錢包位址資料是由使用者的私鑰及/或伺服器2的私鑰,由電腦(其例如是使用者端計算機裝置1、伺服器2,或是其他第三方計算機裝置皆可,本文在此不加以限制)進行如前述之橢圓曲線演算、雜湊函數運算及編碼所產生的。此外,前述的使用者簽名資料(即使用者對該筆交易的數位簽名)也是由使用者端計算機裝置1利用使用者的私鑰進行非對稱式加密等運算後所產生出來的。如果是基於安全性的考量,則使用者私鑰則可以不要傳送到伺服器2,而在產生上述對應該筆轉換的錢包位址時,再由使用者端計算機裝置1自己利用使用者的私鑰進行橢圓曲線演算、雜湊函數運算及編碼來進行。The aforementioned wallet address data is derived from the user’s private key and/or the
接著,在伺服器2收到上述加密貨幣轉換資料後,會向區塊鏈網路3的節點31~37查詢,以取得在區塊鏈的紀錄中,根據該錢包位址資料所記載的錢包位址所對應的加密貨幣的餘額。之後,於使用者端計算機裝置1生成加密貨幣轉換的使用者介面。其中,伺服器2可根據該加密貨幣轉換資料,在使用者端計算機裝置1生成的使用者介面包括有該錢包位址資料所對應的該以太幣(ETH)的餘額、轉換匯率與轉換幣別。Then, after the
以下,是伺服器2根據使用者提供的加密貨幣轉換資料,在使用者端計算機裝置1生成的使用者介面的的一個例子。以下之使用者介面的內容僅在於進行示例性說明,而非對本文進行任何限制。
錢包位址內的ETH:0.523
錢包位址內SBT:0
SBT的轉換匯率:0.0000354585 ETH
SBT的轉換數量: 8
總共需要:0.000283668 ETH
The following is an example of a user interface generated by the
上述的使用者介面除了顯示有該錢包位址內對應的以太幣(ETH)的餘額(例如0.523)、該錢包位址內對應的ERC20加密貨幣(SBT)的餘額(例如0)外,還包括有轉換匯率(0.0000354585)。The above user interface not only displays the balance of the corresponding ether (ETH) in the wallet address (for example, 0.523), and the balance of the corresponding ERC20 cryptocurrency (SBT) in the wallet address (for example, 0), but also includes There is a conversion rate (0.0000354585).
在一些實施例中,使用者介面也可不包括有該錢包位址內對應的ERC20加密貨幣(SBT)的餘額;在一些實施例中,伺服器2或擁有ERC20加密貨幣(SBT)的賣方可決定該轉換匯率;在一些實施例中,該轉換匯率可為固定匯率或變動匯率;在一些實施例中,該轉換匯率可為一段時間自動更新(例如每小時更新一次),或賣方自行手動更新,本新型不限制。In some embodiments, the user interface may not include the corresponding ERC20 cryptocurrency (SBT) balance in the wallet address; in some embodiments, the
另外,上述的使用者介面進一步可讓使用者輸入轉換數量。待使用者輸入想要的轉換數量,例如輸入8時,則可立即產生“總共需要:0.000283668 ETH”,待使用者確認送出後,伺服器2可根據使用者的加密貨幣轉換資料產生一買單資訊(order information)。而使用者端計算機裝置1可將交易資訊傳送至區塊鏈網路3中的換幣智能合約。其中,該買單資訊包括有該加密貨幣轉換資料(即上述之使用者簽名資料、錢包位址資料、轉換幣別、轉換匯率及轉換數量)。前述的換幣智能合約為以太仿協定的智能合約,其可為0x智能合約(“zero x” contract),0x智能合約可根據該買單資訊的轉換匯率將使用者的錢包位址資料所對應的以太幣(ETH),轉換成對應的ERC20加密貨幣(SBT),並且,在轉換完成後將該筆轉換交易由各節點31~37進行對應的認證及記錄等區塊鏈運算(即上鏈)。如此一來,在區塊鏈網路3的各節點31~37即會根據該筆轉換交易中所包括的使用者簽名資料、錢包位址資料、轉換幣別、轉換匯率及轉換數量進行認證與記錄。In addition, the aforementioned user interface can further allow the user to input the conversion quantity. After the user enters the desired conversion quantity, for example, when entering 8, the "Total Needs: 0.000283668 ETH" can be generated immediately. After the user confirms the delivery, the
詳細來說,各節點31~37會利用對應該錢包地址的公鑰對使用者數位簽名資料進行解密來做認證。只有在確認使用者數位簽名資料的數位簽名資料為真,才會根據該0x智能合約將該筆轉換內容資料及賣方相對人資料進行加密運算及編碼,以將其作為一個新的區塊串接(即紀錄)於已有的區塊鏈上,以完成該筆轉換交易。此外,在紀錄該筆轉換交易內容時,各節點31~37也會一併將對應該轉換的時間戳章(time stamp)納入新的區塊中,使得新加上的區塊內容很難被竄改,且具有可驗證性和可追溯性。In detail, each node 31-37 will use the public key corresponding to the wallet address to decrypt the user's digital signature data for authentication. Only after confirming that the digital signature data of the user's digital signature data is true, will the converted content data and the seller counterparty data be encrypted and encoded according to the 0x smart contract to connect them as a new block. (I.e. record) on the existing blockchain to complete the conversion transaction. In addition, when recording the content of the conversion transaction, each node 31-37 will also incorporate the time stamp corresponding to the conversion into the new block, making it difficult for the newly added block content to be included. Tampering, with verifiability and traceability.
前述的0x智能合約是依照上述的該轉換匯率(例如0.0000354585)將以太幣(ETH)轉換成對應數量(例如8)的ERC20加密貨幣(SBT)。在本實施例中,0x智能合約先將以太幣(ETH)轉換成對應的另一種ERC20加密貨幣後,再依照該轉換匯率進行配對、搓合,以將該另一種ERC20加密貨幣(WETH)轉換成對應的ERC20加密貨幣(SBT)。The aforementioned 0x smart contract converts Ether (ETH) into a corresponding amount (such as 8) of ERC20 cryptocurrency (SBT) according to the aforementioned conversion rate (such as 0.0000354585). In this embodiment, the 0x smart contract first converts Ether (ETH) into another corresponding ERC20 encrypted currency, and then matches and mixes according to the conversion rate to convert the other ERC20 encrypted currency (WETH) Into the corresponding ERC20 cryptocurrency (SBT).
詳細來說,仍以上述之使用者介面的例子來說明,其轉換過程可包括以下:(1)、0x智能合約從使用者的錢包位址中轉出0.000283668的ETH加密貨幣到0x智能合約位址中;(2)、0x智能合約將收到的ETH加密貨幣以1比1的比例轉換(等價兌換)成另一種ERC20加密貨幣(中介貨幣,WETH);(3)、0x智能合約從賣方的錢包位址中轉出8個SBT加密貨幣;(4)、0x智能合約將0.000283668的WETH加密貨幣轉到賣方的錢包位址;以及(5)0x智能合約將8個SBT加密貨幣轉入至使用者的錢包位址。其中,為何先將ETH加密貨幣轉換成WETH中介貨幣後,再轉換成SBT加密貨幣的原因在於:由於0x智能合約的協議是透過ERC20加密貨幣內的功能:“授權(Approve)”,讓0x智能合約能在達成特定條件的情況下,可直接轉移用戶的ERC20加密貨幣,然,以太幣本身是一種沒有“授權”功能的加密貨幣,基本的0x智能合約無法直接交易以太幣。因此,利用WETH加密貨幣就是讓以太幣可以轉變成擁有授權功能的ERC20加密貨幣(WETH與ETH等價兌換)。In detail, still taking the above-mentioned user interface example to illustrate, the conversion process can include the following: (1) The 0x smart contract transfers 0.000283668 ETH encrypted currency from the user's wallet address to the 0x smart contract position (2) The 0x smart contract converts the received ETH cryptocurrency at a ratio of 1:1 (equivalent conversion) into another ERC20 cryptocurrency (intermediary currency, WETH); (3), 0x smart contract from The seller’s wallet address transfers 8 SBT cryptocurrencies; (4) 0x smart contract transfers 0.000283668 WETH cryptocurrency to the seller’s wallet address; and (5) 0x smart contract transfers 8 SBT cryptocurrencies into the seller’s wallet address To the user's wallet address. Among them, the reason why the ETH encrypted currency is first converted into WETH intermediary currency, and then converted to SBT encrypted currency is because the 0x smart contract protocol is through the function of the ERC20 encrypted currency: "authorization (Approve)", making 0x smart The contract can directly transfer the user's ERC20 encrypted currency when certain conditions are met. However, Ether itself is an encrypted currency without "authorization" function, and the basic 0x smart contract cannot directly trade Ether. Therefore, the use of WETH cryptocurrency is to allow Ether to be converted into ERC20 cryptocurrency with authorization function (WETH and ETH are equivalently exchanged).
因此,本實施例之區塊鏈的加密貨幣轉換系統有別於傳統使用者在交易所掛單交易的換匯方式,可不需在交易所掛單並等待撮合,利用換幣智能合約根據買單資訊的轉換匯率將錢包位址資料所對應的以太幣,轉換成對應的ERC20加密貨幣,藉此可省去使用者自行在交易所掛單交易及撮合等待時間。Therefore, the cryptocurrency conversion system of the blockchain of this embodiment is different from the exchange method used by traditional users to place orders on exchanges. There is no need to place orders on the exchanges and wait for matching. The exchange smart contract is used to convert the purchase order information. The exchange rate converts the Ether corresponding to the wallet address data into the corresponding ERC20 encrypted currency, which can save users from placing orders on the exchange and waiting time for matching.
此外,在區塊鏈運算完成後,區塊鏈網路3或伺服器2可進一步傳送一轉換成功資訊至使用者端計算機裝置1、及/或該ERC20加密貨幣的賣方,以通知換匯轉換的相對人(使用者與賣方)已確認完成該筆換匯交易。In addition, after the blockchain operation is completed, the
此外,本申請亦提出一種區塊鏈的加密貨幣轉換方法,其是利用前述實施例所提供的耦接於區塊鏈網路3的伺服器2及使用者端計算機裝置1來進行。請參照圖2所示,其為本申請一實施例之區塊鏈的加密貨幣轉換方法的流程示意圖。本申請之區塊鏈的加密貨幣轉換方法可包括有下列步驟。In addition, this application also proposes a blockchain encryption currency conversion method, which uses the
步驟S1為:由使用者端計算機裝置1產生加密貨幣轉換資料,其中該加密貨幣轉換資料包括使用者簽名資料、錢包位址資料與轉換匯率,該錢包位址資料對應有以太幣;步驟S2為:由伺服器2根據該加密貨幣轉換資料產生買單資訊,其中該買單資訊包括有該加密貨幣轉換資料;以及,步驟S3為:由區塊鏈網路3的換幣智能合約根據該買單資訊的轉換匯率將該錢包位址資料所對應的該以太幣,轉換成對應的ERC20加密貨幣,且於轉換完成後進行認證與記錄。此外,步驟S04為:由區塊鏈網路3或伺服器2傳送轉換成功資訊至使用者端計算機裝置1、及/或該ERC20加密貨幣的賣方。Step S1 is: the user-
此外,本申請的加密貨幣轉換方法中所使用的伺服器2、使用者端計算機裝置1和區塊鏈網路3各細部部件之組成、本實施例之加密貨幣轉換方法的變化態樣,以及其所使用之伺服器2、使用者端計算機裝置1、和區塊鏈網路3彼此間的連接關係,則同於前面實施例中所述,於此不再贅述。In addition, the composition of the
綜上所述,在本新型所揭露的加密貨幣轉換系統與伺服器中,會根據使用者端計算機裝置產生的加密貨幣轉換資料產生買單資訊,使換幣智能合約可根據該買單資訊的轉換匯率將該錢包位址資料所對應的以太幣與賣方進行配對、搓合,以轉換成對應的ERC20加密貨幣,待轉換完成後再將該筆轉換交易在區塊鏈網路上進行認證與記錄。如此一來,使用者除了可以更簡便且快速的方式將以太幣更換成ERC20加密貨幣外,由於不需自行在交易所掛單及等待撮合,因此,可有效解決使用者自行在交易所掛單交易及撮合等待時間。To sum up, in the encrypted currency conversion system and server disclosed in the present model, the purchase order information is generated based on the encrypted currency conversion data generated by the user-side computer device, so that the currency exchange smart contract can convert the exchange rate based on the purchase order information The Ether corresponding to the wallet address data is paired and combined with the seller to convert it into the corresponding ERC20 encrypted currency. After the conversion is completed, the conversion transaction will be authenticated and recorded on the blockchain network. In this way, users can exchange Ether into ERC20 cryptocurrency in a simpler and faster way. They don’t need to place orders on the exchange and wait for matching. Therefore, it can effectively solve the problem of users’ placing orders and trading on the exchange by themselves. Matching waiting time.
以上所述僅為舉例性,而非為限制性者。任何未脫離本新型之精神與範疇,而對其進行之等效修改或變更,均應包含於後附之申請專利範圍中。The above description is only illustrative, and not restrictive. Any equivalent modifications or changes that do not depart from the spirit and scope of this new model shall be included in the scope of the attached patent application.
1:使用者端計算機裝置
2:伺服器
3:區塊鏈網路
31,32,33,34,35,36,37:電腦(節點)
S1,S2,S3,S4:步驟1: Client computer device
2: server
3:
圖1為本新型一實施例之一種區塊鏈的加密貨幣轉換系統的示意圖。 圖 2 為本申請一實施例之區塊鏈的加密貨幣轉換方法的流程示意圖。 Fig. 1 is a schematic diagram of a blockchain encryption currency conversion system according to an embodiment of the new type. FIG. 2 is a schematic flowchart of a method for converting cryptocurrency on a blockchain according to an embodiment of the application.
1:使用者端計算機裝置 1: Client computer device
2:伺服器 2: server
3:區塊鏈網路 3: Blockchain network
31,32,33,34,35,36,37:電腦(節點) 31, 32, 33, 34, 35, 36, 37: computer (node)
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109212507U TWM607492U (en) | 2019-10-04 | 2019-10-04 | System and server for cryptographic currency conversion on blockchain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109212507U TWM607492U (en) | 2019-10-04 | 2019-10-04 | System and server for cryptographic currency conversion on blockchain |
Publications (1)
Publication Number | Publication Date |
---|---|
TWM607492U true TWM607492U (en) | 2021-02-11 |
Family
ID=75783347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109212507U TWM607492U (en) | 2019-10-04 | 2019-10-04 | System and server for cryptographic currency conversion on blockchain |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWM607492U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI824625B (en) * | 2022-07-18 | 2023-12-01 | 葉緯 | Device and method for securing and verifying business data via a blockchain system |
-
2019
- 2019-10-04 TW TW109212507U patent/TWM607492U/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI824625B (en) * | 2022-07-18 | 2023-12-01 | 葉緯 | Device and method for securing and verifying business data via a blockchain system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI706275B (en) | System and method for information protection | |
JP7281514B2 (en) | Blockchain-enforced methods for control and distribution of digital content | |
CN110520884B (en) | Out-of-chain intelligent contract service based on trusted execution environment | |
TWI725124B (en) | Determining a common secret for the secure exchange of information and hierarchical, deterministic cryptographic keys | |
TW202020711A (en) | System and method for information protection | |
CN111431713B (en) | Private key storage method and device and related equipment | |
CN110073633A (en) | Use the block chain data protection of homomorphic cryptography | |
US11887107B2 (en) | Method and device for providing transaction service for cryptocurrencies based on different blockchains | |
TW202009841A (en) | Least decentralized fund trading system and method thereof | |
US20210166221A1 (en) | Device and method for providing transaction service of cryptocurrency by means of electronic wallet | |
JP7428704B2 (en) | Computer-implemented systems and methods for transferring access to digital resources | |
CN113409154A (en) | Credible storage-based liability insurance processing method and system | |
CN114997867A (en) | Data element multi-mode delivery system and method based on block chain and privacy calculation | |
Zhao et al. | Blockchain-Enabled Digital Rights Management for Museum-Digital Property Rights. | |
TWM607492U (en) | System and server for cryptographic currency conversion on blockchain | |
US20210004791A1 (en) | Guaranteeing server and method for transaction on blockchain | |
KR102003731B1 (en) | System and method for protecting crypto currency using virtual machine | |
WO2022089518A1 (en) | Address generation method, blockchain information processing method, and related device | |
CN109214921A (en) | File encryption transmission method based on cloud computing | |
TWI766171B (en) | Account data processing method and account data processing system | |
US20230109125A1 (en) | Automated Transactions Across Multiple Blockchains with Cryptocurrency Swaps | |
TWM585941U (en) | Account data processing system | |
JP2002217895A (en) | Data application storage method, method/system for executing command, data application storage program, storage medium with the program stored thereon, command-performing program and storage medium with the program stored thereon | |
US20200342448A1 (en) | Virtual currency data issuing system, user terminal, management device, method, and computer program | |
KR20220037171A (en) | Cryptocurrency transaction system |