Process
FastPay is the latest expansion solution for Libra, a cross-border payment project led by Facebook. It supports efficient distributed accounting and can accommodate up to 1/3 of malicious bookkeepers. Combined with sharding technology, FastPay's tips in the laboratory environment reached 80,000, which has surpassed traditional settlement systems such as visa or mastercard. FastPay draws on the layer 2 expansion plan of public chains such as Ethereum and the consensus mechanism used by Libra, which can be called the layer 2 expansion plan of the Libra blockchain.
The complete FastPay system includes three roles: Libra main chain smart contract, FastPay Committee (FastPay Committee), and user (Sender). Among them, the FastPay Committee is composed of accounting nodes, and the smart contract records the address of the accounting node and the user's FastPay address As well as information such as deposit and withdrawal records, the user is the initiator/receiver of the transaction.
FastPay is a layer 2 expansion solution of the Libra blockchain. FastPay follows the normal process of main chain deposit-side chain mapping-side chain transaction-main chain mapping. The following first introduces the main chain deposit-side chain mapping, the process is as follows,
- The user sends the digital currency to the smart contract on the Libra main chain and specifies the FastPay address
- The smart contract locks the digital currency, and charges the same amount of digital currency to the FastPay address specified by the user, and more Latest status of new contracts
- The bookkeeper of the FastPay committee will monitor the latest status of the smart contract in real time, and record it when new coins are added. Account holder to synchronize.
Sharding
FastPay supports bookkeepers to improve bookkeeping efficiency through sharding. Specifically, the bookkeeper can assign users to different chips (cores/processes/threads) according to certain rules. When users on different chips send transfer requests to the bookkeeper, the bookkeeper can process these requests in parallel.
This can be done because the correlation between different accounts is very small. For example, for users A and B on different slices, suppose there are two transactions: A is transferred to C, and B is transferred to D. If A, B, C , D is four different addresses or C=D, then these two transactions can obviously be processed in parallel, if C=B or A=D, you can also judge in parallel whether the payer’s account has enough money for deduction If it is satisfied, then the transaction processing is also parallel. Only when C=B and B’s account balance is insufficient, then you need to wait for A to transfer to B. This transaction is verified successfully and then judge B to transfer to D In this case, the two transactions need to be executed in a specific order.
Features
- The accuracy and security of a single account need to be maintained by the user corresponding to the account. Users not only need to collect
Enough signatures to legalize the transaction initiated by oneself, and also need to ensure that every account change will be received by enough honest bookkeepers. This requires a strong liveness on the user side, but FastPay proposes to rely on intermediaries to perform information receiving and sending operations, and users only need to sign. - The 1/3 threshold for evil is the key to the certainty of bookkeeping. This is because only in this case can any two joint signatures necessarily include the signature of the same honest bookkeeper, so the ledger state will not fork.
- The overall security still comes from the main chain consensus. The creation and destruction of currency in the FastPay system comes from the main chain smart contract, and its operation requires the main chain consensus, while the FastPay committee is only responsible for verifying the transfer of currency. At the same time, if users are dissatisfied with the accounting procedures of the FastPay system (for example, the rate is too high, or they feel that the committee has formed some kind of collusion), they can initiate a coin withdrawal and return their assets to the main chain to ensure asset security.
Evaluation
FastPay can be used for the rapid settlement of a single digital currency. Contact the libra project. FastPay can realize the rapid settlement of a certain legal currency stable currency or CBDC on the libra blockchain. Specifically, the libra main chain is responsible for the exchange between different currencies. Exchange, that is, cross-border transactions, and FastPay is responsible for the transfer of the same currency. This will make the scenarios served by libra no longer limited to cross-border settlements, and 80,000 tips can support local currency trading scenarios in most countries. Technically supporting high tips is not the biggest problem. The key point is whether it can be successfully implemented in the cross-border payment scenario.