Celer Network 백서

Celer Network

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 8쪽 중 5쪽

the client going o✏ine, the runtime handles avail- ability o✏oading to the State Guardian Network. When the client comes back online, the runtime synchronizes the local states with the State Guardian Network. 4We name decentralized applications running on Celer Network as cApps. 38 For local o↵-chain state management, the conditional state graphs synthesized by the cOS SDK is bundled within the cApp and passed on to the runtime for o↵-chain execution. The runtime serves as the infrastructure to create, update, store and mon- itor o↵-chain states locally on Celer Network clients. It tracks the internal logic of the applications running on top of it and performs the DAG traversal of state up- dates as outlined in § 4.1. It also gracefully handles payment reliability issues such as insucient capacity for routing the payment. At its core, the cOS runtime bundles a native virtual machine (VM) for running smart contracts. While we intend to deploy cOS to many platforms including desk- top, web, mobile and IoT devices, we have adopted the ambitious design principle of “write once, run anywhere”. In other words, we enable developers to write the common business logic once and run the exact same on-chain smart contract code in every en- vironment as opposed to having to implement multiple variants of the same logic. By adopting this principle, we aim to eliminate code duplication and ensure high degree of consistency across various platforms. The platform-specific part of cApps, such as user interface (UI), can be built in languages most suitable to each platform (eg. Kotlin for Android and Swift for iOS). The UI code is also free to use platform-specific utilities and libraries, so that the look and feel of cApps match the respective design guidelines on each platform. The cOS runtime provides VM-native bridge implementations in di↵erent languages for the platform-specific code to interact with the underlying business logic. For ex- ample, consider a cApp representing a chess game running on iOS with the UI written in Swift and business logic written in Solidity. Naturally, the UI layer will need to query the cOS VM for the state of the game board, and it will be able to do so via the Solidity-Swift bridge. Because the code for the contract is available at compile time, the code generator cOS SDK would have generated a bridge method named chess.getBoardState , which is dispatched to the VM for the actual query. Whenever possible, we make use of the language’s foreign function interface (eg. JNI) to reduce the overhead of calling back-and-forth between smart contracts and the native code. The developer will also be able to use the same debugging and profiling tools for on-chain smart contracts in the o↵-chain development scenario. In order to genuinely replicate the state changes that would have happened on- chain in the o↵-chain environment, the VM progresses through the same bytecode as 39 if they were executed on-chain, with the caveat of a few di↵erences. The first major di↵erence is that the VM needs to update and store the states locally instead of on the blockchain. To achieve seamless and transparent inter-operation between the VM and the rest of cOS, we will implement a set of APIs that bridge platform-specific storage backends with the VM. The second major di↵erence is that as opposed to being always online, a local VM can shut down unexpectedly at any time due to software bugs, hardware failure or simply loss of power. To avoid corruption of local states, we need to implement a robust logging, checkpointing and committing protocol. A third minor di↵erence is that the logic for gas metering can be omitted, because the execution happens locally and it does not make sense to charge gas fees. The bundled VM needs to be lightweight and performant so that it can run well on mobile and IoT devices, which tend to operate under tight processor power, mem- ory capacity and battery life constraints. While we currently embed a lightweight Ethereum VM in cOS, we are researching into adopting more common bytecode for- mats (eg. WebAssembly) with the goal of supporting more contract languages and other blockchains. In our ultimate vision of the cOS VM, we will apply modern VM techniques such as ahead-of-time compilation (AOT) and just-in-time compilation (JIT) to achieve near- native performance of o↵-chain smart contract execution. Instead of interpreting the smart contract bytecodes like what most Ethereum VMs currently do, we compile the bytecodes to lower level intermediate representations that are closer to native code. If the code for a certain contract is available at compile time (eg. a contract that is already deployed on-chain), we perform the compilation ahead of time and statically link the binary with the rest of the application. For the contracts that are dynamically loaded at runtime, we profile them for frequently-called functions (i.e. “hot” code) and perform just-in-time compilation. We believe that the combination of these two techniques will bring a great balance between performance and energy consumption, which are both crucial for mobile and IoT devices. 5. cEconomy: O↵-chain Cryptoeconomics Mechanism Design The native digital cryptographically-secured protocol token of the Celer Network, (CELR) is a major component of the ecosystem on the Celer Network, and is de- 40 signed to be used solely on the network. CELR is a non-refundable functional utility token which will be used as the platform currency in the ecosystem on the Celer Net- work. CELR does not in any way represent any shareholding, participation, right, title, or interest in the Token Vendor, the Foundation, their aliates, or any other company, enterprise or undertaking, nor will CELR entitle token holders to any promise of fees, revenue, profits or investment returns, and are not intended to constitute securities in Singapore or any relevant jurisdiction. CELR may only be utilized on the Celer Network, and ownership of CELR carries no rights, express or implied, other than the right to use CELR as a means to enable usage of and interaction with the Celer Network. In the following, we introduce Celer Network’s cryptoeconomics mechanisms, cEcon- omy, whose design is based on the principle that a good cryptoeconomics model (token model) should provide additional values and enable new game-theoretical dynamics that are otherwise impossible. In the following, we first elaborate the fundamental tradeo↵s in o↵-chain ecosystems (Section 5.1) and then demonstrate how cEconomy can bring value and enable new dynamics to “balance out” those tradeo↵s (Section 5.2). 5.1. T radeo↵s in O↵-chain Ecosystems Any o↵-chain solution, while gaining scalability, is also making tradeo↵s. In the follow- ing, we describe two fundamental tradeo↵s in o↵-chain ecosystems: scalability-liquidity tradeo↵s and scalability-availability tradeo↵s. 5.1.1. O↵-Chain Scalability vs. Liquidity O↵-chain platform gains scalability by first trading o↵ network liquidity. For example, in a bi-party payment state channel, the two involved parties can safely send each other payments at high speeds without hitting the underlying blockchain because they have deposited liquidity to the on-chain bond contract at the beginning. Liquidity-locking of this nature works is fine for the end users because the end users can simply deposit their own liquidity to the open channels and enjoy the scalable dApps. However, it poses a significant challenge for those who want to operate as an O↵-chain Service Providers (OSPs). Using state channels as an example, OSPs need to make deposits in each channel with outgoing payment possibility. Those deposits can easily aggregate to an 41 astronomical amount. Even though Celer Networks sidechain channels can significantly reduce the level of liquidity requirement, each block proposer still needs to deposit fraud-proof bonds proportional to the level of value transfer “at stake”. All in all, significant amount of liquidity is needed to provide e↵ective o↵-chain ser- vices for global blockchain users. However, whales may not have the business interest or technical capability to run an o↵-chain service infrastructure, while people who have the technical capability of running a reliable and scalable o↵-chain service often do not have enough capital for channel deposits or fraud-proof bonds. Such a mismatch creates a huge hurdle for the mass adoption and technical evolution of o↵-chain plat- forms. If not mitigated, eventually only the rich can serve as OSPs. This high capital barrier of becoming an OSP will result in a centralized network that providing under- mines the entire premise of blockchain’s decentralization vision. From a more practical view, censorship, poor service quality and privacy breach will hurt users as today’s centralized services do. 5.1.2. O↵-Chain Scalability vs. Availability While an o↵-chain platform improves scalability by bringing application states o↵- chain, it imposes an impractical “always online” responsibility on the users, because the o↵-chain states should always be available for on-chain disputes. For example, in a bi- party payment state channel, if one party goes o✏ine, the counterparty may get hacked or act maliciously, and try to settle an old but more favorable state for himself. The data availability issue is even more critical in a sidechain channel where block proposers need to be independently monitored and validated while the participants are o✏ine; this is a matter of security and should be scrutinized carefully. This challenge is even more critical in machine to machine communication scenarios where IoT devices are not likely to be online all the time. Therefore, it is crucial to design proper mechanisms that guarantee data availability in an o↵-chain platform. Solving this challenge requires systematic thinking of the entire o↵-chain ecosystem and existing solutions all fail to provide the important properties of decentralization, eciency, simplicity, flexibility, and security as we will discuss more in the following section. 42 Figure 9. Relationship among cEconomy components. 5.2. cEconomy Design To balance the above-mentioned tradeo↵s, we propose a suite of cryptoeconomics mechanisms called cEconomy that includes three tightly interconnected components: Proof of Liquidity Commitment (PoLC) mining, Liquidity Backing Auction (LiBA) and State Guardian Network (SGN). The relationship among the three components is illustrated in Figure 9. Before moving on to the details of these components, we first introduce several terms that will be used throughout this section. Specifically, a user in our cEconomy system may play any of the three roles: O↵-chain Service Provider (OSP), End Users (EU), Network Liquidity Backer (NLB) and State Guardians (SG). O↵-chain Service Providers (OSP) are entities who have the technical capability to run highly redundant, scalable and secure o↵-chain infrastructures. End Users (EU) can access the o↵-chain services provided by OSP (e.g., pay and receive cryptocurrency). They can be common consumers or they can be IoT devices, VPN providers, live video streaming providers and CDN providers, counterparties in Machine to Machine (M2M) systems, or even an o↵-chain/on-chain smart contract. Network Liquidity Backers (NLB) are entities that lock up their liquidity in the system to support the operations of o↵-chain infras- tructure. State Guardians are those who provide EUs decentralized, secure, flexible 43 and ecient state guarding service through State Guardian Network. 5.2.1. Proof of Liquidity Commitment (PoLC) Mining Our first goal is to balance out the scalability-liquidity tradeo↵ by lowering the liquidity barrier for technically capable parties to become o↵-chain service providers and thus creating an ecient and competitive market for good and reliable o↵-chain services. The gist of the idea is to enable service providers to tap into large amounts of liquidity whenever they need to. The first part to realize this idea is to provision an abundant and stable liquidity pool that can smooth out short-term liquidity supply fluctuation. To that end, we propose the Proof of Liquidity Commitment (PoLC) virtual mining process. From a high level, the PoLC mining process is to incentivize Network Liquidity Backers (NLB) to lock in their liquidity (which can be in the form of digital assets, including but not limited to cryptocurrencies and CELR) in Celer Network for a long time by rewarding them with CELR tokens and therefore establishing a stable and abundant liquidity pool. More specifically, the mining process involves NLBs to commit (lock) their idle liquidity (for example, ETH) to a “dumb box”, called Collateral Commitment Contract (CCC), for a certain period of time. During this period of time when the digital assets are locked, the NLB’s assets can only be used in the liquidity backing process and nothing else. More formally, the PoLC mining process can be defined as the following. Definition 5.1 (PoLC Power ). If NLB i locks Si amount of local cryptocurrency in a blockchain (e.g. ETH) for Ti time, its PoLC power Mi is computed as Mi = Si ⇥ Ti. (18) Definition 5.2 (PoLC Incentive Mechanism ). For a limited period of time, Celer Network intends to provide incentives in the form of CELR to NLBs who lock their CCC as a show of support for the system. Incentives will be distributed proportional to each NLB’s PoLC power. Let Ri denote the incentives of i, one has: Ri = R ⇥ MiNP j=1 Mj , (19) 44 where R is the total reward for the current block. Note that locking liquidity in CCC does not carry any inherent counterparty risk as it simply shows a liquidity commitment to Celer Network. Also, note that early unlocking of CCC is not allowed. One may try to create a “spoofed liquidation” with an appearance of one’s CCC getting liquefied due to “hacking” of a faked OSP. To prevent this spoofing, the newly mined CELR is not available for withdrawal and usage until CCC unlocks. Any early liquidation will cause the already mined CCC to be forfeited and redistributed to other miners. The construct of a common denominator of liquidity in PoLC is also an important question. For the initial launch of the platform, we will use the native currency of the target blockchain and later use more heterogeneous crypto assets through external price oracles. With these mechanisms in place, the PoLC mining process ensures that the PoLC power in the system will grow as the system and utility of the CELR grows, forming a positive loop. At this point, one may wonder why is CELR valuable so that it can act as such an incentive? We explain that in the following sections describing Liquidity Backing Auction and State Guardian Networks. 5.2.2. Liquidity Backing Auction (LiBA) The second part for solving the liquidity puzzle is to enable a way for o↵-chain ser- vice providers to access to liquidity pool globally, which is achieved via the Liquidity Backing Auction (LiBA). LiBA enables o↵-chain service providers to solicit liquidity through “crowd lending”. In essence, an o↵-chain service provider starts a LiBA on Celer Network to “borrow” a certain amount of liquidity for a certain amount of time. An interested liquidity backer can submit a bid that contains the interest rate to be o↵ered, amount of liquidity and the amount of CELR that she is willing to stake for the said period of time. The amount of liquidity can be submitted via a CCC. That is, CCC has the functionality to act as a liquidity backing asset. The borrowed liquidity will be used as a fraud-proof bond or outgoing channel deposit. LiBA is a generalized multi-attribute Vickrey-Clarke-Groves (sealed-bid second- score) auction. To start an auction process, an OSP creates a standard LiBA contract through the Celer Network’s central LiBA registry with information regarding the total amount of requested liquidity ( q), duration of the request ( d) and the highest interest 45 rate (rmax) that it can accept. NLBs who watch the registry will notice this new LiBA contract and can start the bidding process. Celer Network requires all crypto assets to be locked in CCC for the bidding process. Note that CCC can be “lock-free” and simply used as a backing asset without the functionality of PoLC mining. CCC acts as a container for crypto assets and provides a unified verifiable value of heterogeneous crypto assets. Moreover, the use of CCC makes it easier for NLBs to participate in LiBA without moving crypto assets around every time they bid and thus simplifies the backing process and improve security. NLB i submits the bid in the form of a tuple bi =( ri,t i,c i), where ri is interest rate, ti is the total amount of CELR it is willing to lock up during the contract time and ci is the aggregate currency value contained in the set of CCCs bonded with this bid. Once the bid is submitted, the corresponding CCCs are temporarily frozen. After sealed bidding, the LiBA contract uses reverse second-score auction [8] to determine winning bids with the following three steps. • (Scoring Rule ). For each bid bi =( ri,t i,c i)i nt h eb i ds e t B = {b1,b 2,. . . ,bn} with fi = tici , its score si is calculated as the following: s(bi)= w1 fi fmax w2 ri rmax , (20) where fmax = max {f1,f 2,. . . ,fn} and rmax = max {r1,r 2,. . . ,rn}. w1 and w2 are weights for the two components and are initially to ensure we take into account an interest rate with higher weight and then take into account the amount of staked CELR. 5. • (Winner Determination ). To determine who has the opportunity to become the network liquidity backer, the LiBA contract sorts the bids in B in descending order by their scores. The sorted bid set is denoted by B⇤ = {b⇤1,b ⇤2,b ⇤3,. . . ,b⇤n},w h e r e s(b⇤1) s(b⇤2) · · · s(b⇤n) (ties are broken randomly). Winners are the first K bids in B⇤,w h e r e KP i=1 ti q and K1P i=1 ti <q . • (Second-Score CELR Staking/Consumption ). After winners are determined, their CCCs will be locked in the LiBA contract for time d (the duration of the request), their interest requests are accepted and interests are prepaid by the OSP initiating the liquidity request. However, it is important to note that not all of their committed CELR are locked/consumed in this contract. Each winner only needs to 5These weights are subject to future decentralized governance adjustment. 46 lock up/consume enough CELR so its score matches the score of the first loser in this auction. Whether the token will be locked or consumed depends on the stage of the platform. In the first five years, new tokens will be generated through PoLC mining and LiBA only requires token staking. When the PoLC mining concludes, LiBA will start to consume token and the consumed tokens will be injected into the system as continuous PoLC mining rewards. Note that under the second-score CELR staking/consumption mechanism, the participants are projected to submit bids matching their true valuation (truthfulness [17]) of the good (in this case, the opportunity to back the network liquidity). Example: Assume that an OSP initiated a LiBA with the following parameters (600 ETH, 30 days, 1%) and there are three potential bidders (let’s say A, B, and C) for this LiBA. The three bidders’ bids are bA = (1%, 800 CELR, 400 ETH); bB = (0.5%, 800 CELR, 200 ETH); bC = (1%, 100 CELR, 400 ETH). According to the scoring rule, we have sB >s A >s C . Since A and B can fill the entire request, they are selected as winners. It should be noted that even though A and C have the same interest rate (1%) and provide the same amount of liquidity (400 ETH), bidder A is selected as a winner while bidder C loses; this is due to the fact that their committed CELR tokens, as a symbol of their contributions to this platform, are significantly di↵erent. Finally, according to the second-score staking rule, A and B lock (or consume) their CELR tokens to match the score of C for 30 days. After the auction process finishes,
프로젝트로 돌아가기