Celo 백서

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

The Celo Protocol: A Multi-Asset Cryptographic Protocol for Decentralized Social Payments cLabs Team DRAFT version 0.25 Abstract Twoofthebiggestbarrierstothelarge-scaleadoptionofcryptocurrenciesasameansofpayment are ease-of-use and purchasing-power volatility. We introduce the Celo protocol, a protocol that addresses these issues with an address-based encryption scheme and a stable-value asset. We show how these attributes together can be used to foster a monetary ecology that includes global reference currencies, local and regional stable-value currencies, and a social dividend. Our first application is a social payments system centered around mobile phones. 1 Contents 1 Introduction 3 2 Ease of Use through Lightweight Identity 3 2.1 Address-Based Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.1 Single-Node Address-Based Encryption . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.2 Drawbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.3 Distributed Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.4 Summary of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Aggregating Reputation Signals through Encrypted EigenTrust . . . . . . . . . . . . . . 6 2.2.1 EigenTrust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2 Privacy-Preserving EigenTrust through Zero-Knowledge Proofs . . . . . . . . . . 7 2.2.3 Personalized Pre-Trusted Peers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.4 Practical Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 Stabilizing V alue 7 3.1 Elastic Coin Supply and Shifting Volatility Risk . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Protocol Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.3 Shared Reserves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.4 Price Discovery and Mechanics of Reserve Asset Purchasing . . . . . . . . . . . . . . . . 10 4 Governance and Incentives 10 4.1 Maintaining the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 Bolstering Reserves and Contracting Stable-Value Currency Supply when Needed . . . . 11 4.3 Increasing User Base and Usage of the System . . . . . . . . . . . . . . . . . . . . . . . 11 4.4 Improving the Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.4.1 Technical Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.4.2 Introducing Regional Currencies and Broadening the Reserve Base . . . . . . . . 12 4.4.3 Futarchical Governance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.4.4 Partitioned Reserves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5 Conclusion 13 2 1 Introduction Cryptocurrencies have several advantages to fiat currencies as a means of payment. They enable transfer of value that is much faster than a bank wire, at lower cost (especially for international payments), in a publicly auditable and secure manner, using a technology that is globally accessible so long as you have a smartphone. Further, cryptocurrencies can be programmed; allowing financial contracts, escrow, and insurance, all without intermediaries. However, at the moment, there are several barriers to the mainstream adoption of cryptocurrencies as a means of payment. First, due to deterministic supply rules and unpredictable coin demand, successful coins1 experience deflationary price instability. As a result, users rationally prefer to use them as a store of value rather than a medium of exchange. Second, even when people do wish to use price-volatile cryptocurrencies as a means of payment, they need to generate a private/public key pair to receive a payment, and enter in somebody’s public key in order to send a payment. While these may seem small obstacles, experience has shown that small differences in user experience lead to large differences in usage outcomes. For a cryptographic social payments system to prosper, sending a payment should be as easy as sending a text message, and the volatility of the currency should be minimal. We describe the Celo protocol, a protocol that addresses each of these issues. To address ease of sending payments, the Celo protocol introduces a cryptographic scheme that we call address-based encryption, in which participants verify a series of cell-phone number-to-public-key mappings, allowing users to then use their friends’ cell phone numbers as public keys. To address stability of value, the Celo protocol introduces an asset whose value is stabilized using a monetary policy with elastic supply rules, backed by a variable-value reserve. Further, it introduces a governance structure that allows the protocol to create a family of local, regional, and utility stable- value currencies, where the introduction of new successful stable-value coins to the family strengthens the stability characteristics of the existing coins. Finally, the Celo protocol introduces a mobile block reward mechanism in which all users involved in transactions are also able to participate in verifications, creating a broad participant base and making block rewards more accessible to day-to-day users. Together, these underpin a compelling social payments protocol. 2 Ease of Use through Lightweight Identity An important obstacle for the mainstream adoption of cryptocurrencies as a means of payment is the lack of intuitive, decentralized public key infrastructures. As a result, in order to send a payment in today’s decentralized systems, users must know the public key of the intended recipient (unless they are operating through a centralized gateway). And in order to receive a payment, a user must first set up a private/public keypair and broadcast it. It would be far easier to send a payment directly to an email address or phone number, and to be able to receive a payment without having to first set up a wallet. Identity-based encryption [18] holds promise towards this end. In this scheme, when Alice wants to send an encrypted message to Bob at bob@company.com, she can simply use the public key string bob@company.com, without needing to obtain Bob’s public key certificate. While a cryptocurrency system based on identity-based encryption would lead to a much more seamless user experience, both the original proposal and subsequent implementations [4, 6] are hindered by the fact that they require a trusted third party, called a private-key generator, to generate private keys. As a result, these schemes are less useful in open, permissionless systems. 1Academics, regulators, entrepreneurs and others use "coin" and "token" interchangeably to describe assets that function as a digital representation of value native to a distributed ledger. In this paper, we refer to ‘digital assets,’ ‘coins,’ ‘cryptocurrencies’ and ‘tokens’ with general interchangeability. 3 2.1 Address-Based Encryption We propose a variant on identity-based encryption, called address-based encryption. Rather than directly using an e-mail address or phone number as a public key, and then relying on a trusted private- key generator to generate a corresponding private key, we have users generate their own private/public key pair in the traditional manner. The user then registers their public key in a public, append-only database that stores[address -> public key] tuples. This database is functionally decentralized, so that no central owner is responsible for storing, managing, or maintaining the database, but logically unified, so that everybody can at any time see all the entries in the database. Crucially, the[address -> public key] tuples are attested to by a peer-to-peer network. To perform attestation, randomly selected validators in the network send a signed and secure message to the registrant, who then signs the message with her private key and returns it to an Attestations smart contract. The Attestations contract checks that the validator did indeed send the message, and that the signature matches the public key of the recipient. This protocol works not just with email addresses, but with any channel to which a secure message can be sent, for example, a cell phone number, an IP address, or even a bank routing and account num- ber. Further, arbitrary strings may be appended to the address in the database key, allowing multiple public keys to be stored for each address, each for a different application. As a consequence, the en- cryption scheme supports a large number of cryptographic applications, from two-factor authentication to decentralized social networks, without relying on trusted third-parties. For the social payments use case, it allows for two important features. First, a user can send Celo currencies to a friend by using her phone number as the public key, allowing easy payments to contacts. Second, a user can send Celo currencies to a friend even if the friend has not yet downloaded a Celo wallet. 2.1.1 Single-Node Address-Based Encryption For the purposes of explanation, we begin by describing a simplified version of the address-based encryption scheme in which a single node, called a validator node, maintains the state of the system. The key role of the validator node is to maintain a public, append-only database of[address -> public key] mappings. In the single node case, the validator node is similar to a traditional key server except that it not only stores the[address -> public key] mappings, but also attests to them as follows: When a user wishes to register a public key with the scheme, they generate a private/public key pair, and then submit their[address -> public key] mapping to the validator node. (In our use case, the address is the cell phone number of the user, but in the general case it could be any address to which a secret message can be sent.) The validator node sends a signed secret message to the address in the entry. The user then sends that message to an Attestations smart contract, which verifies both sig- natures by decrypting them with the public keys of the user and the validator. If the decrypted message matches the secret message, the smart contract writes the following entry to the database[address, user public key, secret message, user signed secret message, validator signature]. 2.1.2 Drawbacks This simplified version has the following drawbacks: Address harvesting. A publicly viewable database with unencrypted phone numbers allows spam- mers to harvest the cell phone numbers of all of the users. To address this, we can store a one-way hash of the address rather than the address itself. To increase the entropy of the underlying string (to make reversing the hash more difficult) we may append a pepper to the string to be hashed2. 2Even with an appended pepper, the following scenario is possible: a spammer one-way hashes every possible 10 digit number along with every possible pepper, and then checks to see which hashed values are in the database. However, harvesting at high cost is possible even today, by taking every possible 10 digit number, sending an SMS to each, and seeing if it goes through. Therefore, our goal would be to make the effective cost of decryption more expensive than the cost of sending a bulk SMS. 4 Single key per address. In practice, people may want to store multiple public keys associated with their address. The simplified protocol gives no mechanism to do so. As a solution to this, we can allow the key to be the hash of an address concatenated with an optional arbitrary string. This allows, for example, Bob to store an application key athash(“4155551212 || application_name”), or an ephemeral application key athash(“4155551212 || application_name || 20171117”). Node failure. Any model that relies on a single node to maintain state is susceptible to that node failing. We can address this by having multiple nodes participate in maintaining the state. (In doing so, we must also ensure that only a small number of nodes send a secret message to a user issuing a attestation request, to avoid overloading the user.) In this model, the secret message must also be verifiable by other validators, even if they did not construct it. This is achieved by signing the message with the private key of the validator sending it. To avoid repeat-attacks, each message from the same validator must be unique. Malicious Validator. A malicious validator node may choose to bypass the message/response step, and instead, write an entry to the ledger in which they choose somebody else’s address, generate their ownkeypairforthataddress, andthensignthesecretmessagewiththeprivatekeythattheygenerated. Doing so allows the validator to spoof an address, claiming payments intended for somebody else. We can address this by requiring consensus between multiple validators who have no mechanism to collude. Transaction Transparency.If we are using hashed phone numbers as public keys, then a traditional bitcoin-style blockchain will allow a user to see the transactions of the contacts in their address book. We can address this by implementing the computationally efficient version of zk-snarks as described in [12]. DDoS.Finally, a malicious user may submit thousands of bogus requests to the validator, both tying up the validator and effectively using the validator as a spam agent. We can mitigate this by introducing a cost to attestation. 2.1.3 Distributed Scheme We introduce here a distributed scheme that introduces each of the features suggested above. In this scheme, rather than the single validator node we describe in Section 2.1.1, a peer-to-peer network of multiple validator nodes maintains the database. The network is open and permissionless; anybody may join as a validator, and validators may leave and rejoin the network at will. Each validator maintains a full copy of the attestation pending queue and attested user database. For each attestation request, validators are chosen at random to handle the attestation. An attestation workflow would then look like this. First, a user will issue an attestation request by sending the request to the Attestations smart contract, along with an attestation fee. The Attestations contract then selects a validator at random from the validator set and generates a message for the validator; the validator then signs that message, sends it to the registrant, who also signs it and sends it back to the Attestations contract. The Attestations contract then verifies the signatures of the registrant and the validator, and if they match, then records the attestation. Most dapps will require multiple attestations, in which case, if there are not enough attestations recorded on the chain, they will simply request more. Having multiple validators addresses the node failure issue. Requiring multiple attestations ad- dresses the malicious validator issue. The attestation fee addresses the DDos issue. And the attesta- tion requests are issued as a hash of the(address | pepper | application string), so as to avoid address harvesting, and to allow for multiple keys per address. 2.1.4 Summary of Operations An alternative way of framing the protocol is in describing the roles and operations allowed to each node in the system. 5 Any user may: • requestverificationofapublickeyassociatedwithheraddress, bybroadcastingher [hash(address | optional appended string) -> public key] tuple to the verification pending queue A verified user may: • add a new public key by creating a[hash(address | optional appended string) -> public key] mapping • revoke any public key associated with their address • change any public key associated with their address A validator may: • compete with other validators for the right to write a block and send a secret message to the addresses on the verification pending queue, and validate the signed responses of the previous block’s verifications. Anybody may: • look up the public key for a given address hash (or address hash || string concatenation) in the verified user database. 2.2 Aggregating Reputation Signals through Encrypted EigenTrust Once there exists a decentralized mapping of phone numbers to public keys, it can be used to bootstrap a reputation system that helps users determine the trustworthiness of any new users they may transact with. A person’s cell phone contact list is a rough first-order proxy for a list of people in whom she has a certain level of trust. One can imagine refining this trust proxy through explicit signals (for example, a user may rate people in her contact list in an application-specific manner, or attest to whether a contact in their address book is a person or not), and implicit signals (for example, if a user makes a payment to somebody in her contact list). These signals can be maintained locally, on the user’s cell phone, without sharing them with anybody else. Such address-book based trust signals define a trust network that is both logically decentralized and functionally decentralized. No single entity stores or has visibility into the entire trust network; each user simply knows the people whom they trust, and the level to which they trust them. We describe below how to compute sybil-resistant, privacy-preserving aggregate reputation scores given this decentralized trust network. 2.2.1 EigenT rust EigenTrust [14] is a decentralized algorithm for computing global reputation scores, given pairwise local trust scores. The key intuition behind EigenTrust is that a person’s reputation score can be defined as the number of people who trust that person, weighted by their reputation scores. This recursive computation converges for all nodes to the principal eigenvector⃗t of the trust matrixT, where Tij is number between0 and 1, and whose magnitude is proportional to the relative level that nodei trusts node j3. In EigenTrust, the principal eigenvector ofT is computed using a distributed variant of the Power Method [20]. In the context of a social payments network, it would proceed as follows: The trust network Tij would be some variant of the payment network, whereTij would be nonzero if node i has paid node j, and node j is in the address book of nodei. Each node stores their own current ti, and has access to the values ofTij in row i and column j (the people with whom the node has interacted). The principle eigenvector⃗t would then be computed in an iterative fashion as follows. At 3An alternative way to frame the problem is to compute the stationary distribution of the ergodic Markov chain described by the trust network. 6 each iteration, each node send across theirti · Tij scores to each nodej that they’ve paid in the past. The nodes j wait to receive all of the scores from the nodes that have paid them in the past, and then compute their owntj, and then pass theirtj · Tjk along to the nodesk that they have paid. 2.2.2 Privacy-Preserving EigenT rust through Zero-Knowledge Proofs There are two differences between the algorithm we propose and the original EigenTrust algorithm. First, the simplified description above allows nodes to lie about their ownti. The original Eigen- Trust algorithm addresses this by relying on score managers to steward the computation ofti for each node. In the original scheme, each node has three score managers, assigned at random through a distributed hash table, who store theTij values for each node and compute and storeti for each node. While this addresses the dishonest node attack, it is not ideal in the social payments scenario, as it requires sharing transaction information with other peers in the network. We address this by having each peer perform the computation themselves, as per the simplified version, but also prove, to a high probability, to all adjacent nodes that they have performed the computation correctly. One can do so by constructing a zer
프로젝트로 돌아가기