Cosmos Token Model
Cosmos Token Model
Cosmos Token Model
2 Sankalp Aggarwal
3 Tendermint, Berkeley, CA, USA
4 http://www.sunnya97.com
5 [email protected]
6 Abstract
7 This paper presents a novel token model for Proof of Stake based blockchains being pioneered by
8 the Cosmos Hub. We argue that general purpose currencies should not be used as staking tokens,
9 but rather we should use tokens whose primary utility is to be used for staking. We also present
10 mechanisms for allowing the blockchain’s transactions fees to be paid in a multitude of fee tokens,
11 which will improve the user experience of using the blockchain.
16 1 Introduction
17 Proof of Stake refers to the concept of using ownership of tokens in a blockchain as a sybil
18 resistance mechanism for determining participation in its consensus protocol. The Cosmos
19 Hub is a Proof of Stake based blockchain that uses Tendermint consensus and serves as a
20 backbone to the Cosmos ecosystem. The Cosmos Hub provides a number of innovations to the
21 field of Proof of Stake and cryptoeconomic design, including features such as skin-in-the-game
22 delegation, instant redelegation, delegation commitments, and efficient automatic reward
23 distribution. [1] This paper, however, will focus particularly on the Cosmos Hub’s token
24 model for Proof of Stake systems, which differs from most existing Proof of Stake proposals.
25 While this model being presented was designed for the Cosmos Hub, it is meant to serve
26 as an example for other Proof of Stake blockchains, both inside and outside of the Cosmos
27 ecosystem to emulate.
28 Tendermint Consensus
29 The Cosmos Hub uses Tendermint as its consensus algorithm.[12] Tendermint is a byzantine
30 fault tolerant consensus algorithm developed by Jae Kwon in 2014 to address the speed,
31 scalability, and environmental concerns of Proof of Work. [10] The economics of Cosmos Proof
32 of Stake are designed with a classical BFT algorithm (such as Tendermint) in mind due to its
33 design of involving all validators in the production of each block, a substantial difference from
34 Nakamoto consensus. [16] Unlike PBFT, from which it is heavily inspired, Tendermint also
35 has the ability to seemlessly change the leader on a per-block basis. This means validators in
36 Tendermint take turns producing blocks in a weighted round robin fashion. Furthermore,
37 its strict accountability for byzantine faults allows us to punish misbehaving validators and
38 provide economic security for the network. The safety and liveness guarantees of Tendermint
39 hold under that assumption that less than 1/3 of voting power is byzantine. Description of
40 Tendermint consensus algorithm and the proof of its correctness can be found in [4].
41 The Cosmos Hub uses Tendermint in its public Proof of Stake context. This works in the
42 following method as described by the original Tendermint whitepaper [10]:
© Sankalp Aggarwal;
licensed under Creative Commons License CC-BY
Tokenomics, International Conference on Blockchain Economics, Security and Protocols.
Leibniz International Proceedings in Informatics
Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany
XX:2 Cosmos Hub Token Model
43 “Validators are users with accounts that have coins locked in a bond deposit by posting
44 a bond transaction. We say that a validator has voting power equal to the amount of
45 the bonded coins.”
46 In such a system, the validator set is open and permissionless, which means that anyone
47 who owns some of the staking token in the system can bond their coins and become a validator.
48 In the Cosmos Hub, this staking token is known as an Atom. The limited resource of Atoms
49 acts as a sybil prevention mechanism. A single actor cannot create multiple validator nodes
50 in order to increase their voting power, as their voting power is determined by their total
51 number of atoms owned, not the number of validator nodes they control. Because all that
52 determines a validator’s voting power is their bonded stake and not reputation or real world
53 identity, validators can choose to be either anonymous or public.
54 One of the key innovations of the Tendermint whitepaper was the idea of using validator
55 “security deposits” which can be seized and burned by the protocol in a process known as
56 "slashing" if a validator is caught creating attributable byzantine faults that harm to the
57 well-functioning of the system, thus solving the Nothing-at-Stake problem suffered by first
58 generation Proof of Stake blockchains like NXT and BitShares 1.0 [2] [14]. These security
59 deposits are locked in a bonded account and when a staker wishes to unbond their staked
60 tokens, they are still bonded for the period of an “unbonding period”. During this unbonding
61 period, the validator doesn’t have any voting power, but proof of malicious activity from
62 past byzantine faults can still be submitted, and the validator can still be slashed.
63 The details of the slashing conditions which lay out the possible byzantine faults and
64 their respective punishments are out of scope of this paper.
66 The Cosmos Ecosystem is a partially-ordered network of blockchains called zones that run
67 concurrently and interoperate using light client-style proofs to create a multi-blockchain
68 ecosystem. It is termed an Internet of Blockchains as much like the traditional Internet
69 which connects otherwise isolated networks, Cosmos connects otherwise isolated blockchain
70 networks. These multiple blockchains can communicate using a protocol called Inter Block-
71 chain Communication (IBC), which can be thought of as the TCP/IP of Cosmos. [8] IBC
72 enables zones to create two-pegs between them and transfer coins between them, essentially
73 making them sidechains of each other. Using IBC, you could move a native token of Zone A
74 onto Zone B for use within the state machine of Zone B. Much like how Internet Service
75 Providers (ISPs) help route IP packets, Hubs are special blockchains that help zones route
76 IBC packets. [12]
77 The Cosmos Hub is one such hub to which zones can connect to and is secured by an open
78 and globally decentralized set of validators. Along with just providing routing for packets,
79 the Cosmos Hub also preserves the global invariance of the total amount of each token across
80 the zones, preventing zones from double spending other zones. [12]
81 Many ISPs, along with providing Internet connectivity, also offer a variety of additional
82 services such as web hosting. Similarly, the Cosmos Hub also provides hosted consensus.
83 While zones can connect to the Cosmos Hub with their own independent validator sets, zones
84 also have the opportunity to be validated by the Cosmos Hub validators and benefit from
85 the shared security of all the chains operated by the Cosmos Hub validators. [11]
86 Because the Cosmos Hub is responsible for the operation and consensus of many chains,
87 the security and cryptoeconomic design of the Hub is of paramount importance.
S. Aggarwal XX:3
To k e n o m i c s
XX:4 Cosmos Hub Token Model
133 some minimum exchange value enforced by its use value, it provides economic security to
134 the Proof of Stake by making sure there is real economic value at stake. This is done by
135 many Proof of Stake systems. For example, when switching to Casper, Ethereum plans to
136 use its existing fee token, Ether, as its staking token. [17] While there is some merit to the
137 conceptual simplicity of this model, it does lead to potential risks and issues.
138 In the single token model, the single token has utility beyond mere staking, thus there
139 will be a reasonably liquid amount of tokens that are not staked. The more utility that the
140 token has beyond staking, the more liquidity of that token is required for those purposes,
141 meaning a larger percentage of the tokens will not be staked. This weakens the security of
142 the system as it makes it easier to stealthily obtain enough tokens required to attack the
143 system.
144 For example, in a Proof of Work network, because electricity and computational power
145 have so many alternate utilities other than mining, the vast majority of these resources are
146 not used for mining and thus are "unaccounted for". For a Proof of Work blockchain using an
147 ASIC-resistant hashing, it would be possible for a large government to suddenly shift a lot of
148 its electric and computational resources to mining to attack the system. However, because
149 SHA-256 ASICs have little utility beyond Bitcoin mining (which is largely dominated by
150 ASICs), it is reasonable to assume that close to all existing SHA-256 ASICs are already
151 currently mining, and thus it is highly unlikely that any entity could suddenly start mining
152 and have over 50% of the hashrate, which is needed to take over the system [19]. Any attempt
153 to try to mass produce or buy up a majority of ASICs would take time and would also likely
154 send detectable signals into ASIC markets, allowing governance mechanisms to be able to
155 preemptively respond i.e. changing the hash function.
156 Let us imagine a hypothetical situation in which a large token holder (in industry terms,
157 a whale) owns 5% of the total supply of Ether in the Serenity Ethereum blockchain with
158 Casper. This whale could single handedly pull off a 33% attack if less than 15% of all Ether
159 was staked. But because Ether has so much utility outside of staking [17], it will likely be
160 very difficult to get 15% of Ether to be staked, causing an economic security risk.
180 more value. First, an increase in the value or amount of transaction fees going through the
181 network means a larger pool of fee rewards for all validators, thus increasing the value of the
182 transaction fees that are allocated to you. Second, you can increase your percentage share
183 of the staked Atoms, thus affording you a larger percentage share of the transaction fees
184 and block rewards. This can be done through buying more Atoms and staking them or by
185 decreasing the share of other validators by getting them slashed.
186 In the Cosmos Hub, there are block provisions given in Atoms. These are technically
187 analogous to block rewards but serve a different purpose. They are there in order to incentivize
188 Atom holders to stake. Because Atoms are given as block provisions to stakers, there is
189 a continuous inflation rate of Atoms. Atoms holders who do not stake are thus punished
190 through inflation as their percentage share of the total Atom supply decreases as they do
191 not receive any of the newly minted Atoms. This creates a significant incentive for Atom
192 holders to stake their Atoms as there is a continuous transfer of wealth from non-stakers to
193 stakers. The inflation of Atoms is denominated as a percentage of the total supply, and thus
194 the block provisions per block increases as the total supply of Atoms increases. We use the
195 term provisions rather than rewards because the function of the provisions is primarily to
196 punish non-stakers, not to reward stakers. The inflation rate targeting mechanism is based
197 on the percentage of staked Atoms. As the percentage of Atoms that are staked decreases,
198 the inflation rate increases, thus further incentivizing Atom holders to bond their stake.
199 Note that this effect could have been achieved with demurrage, in which Atoms that are
200 not staked begin to "decay" away (get burned). However, demurrage is more difficult to
201 implement technically and would likely have a non-negligible negative impact around user
202 experience, especially in the context of interchain transfers. For this reason, we choose the
203 route of using inflation rather than demurrage.
204 Because of inflation going to only stakers and the lack of alternate designed utility for the
205 Atom, it is reasonable to expect a large percentage of the total Atom supply will be staked.
206 This makes it far harder for the situation described at the beginning of this section to occur
207 in which a large whale stakes and gets over 33% of the bonded tokens. If anyone tries to buy
208 the amount of Atoms required to get 33% of the stake on the open market, the market for
209 Atoms would get progressively more illiquid causing the price of each successive Atom more
210 expensive, greatly increasing the cost required to make an attack feasible.
To k e n o m i c s
XX:6 Cosmos Hub Token Model
271 how would we get these values without the use of centralized oracle? One potential option is
272 to pull prices from an on-chain decentralized exchange, even one on a different chain by using
273 IBC. However, while this may be a possible strategy in the future, currently DEXs suffer
274 from a lack of liquidity allowing malicious attackers to cheaply game orderbooks causing
275 reported prices to not match the prices on off-chain exchanges (likely closer to the true price
276 of the asset). [18]
277 Thus we propose 2 possible mechanisms for determining the relative token valuations.
279 Option 1 is that we completely forgo trying to come to consensus on the relative values, but
280 rather let each block’s proposer use their localized view of how much they value each token
281 to order transactions when it’s their turn to propose. Each validator node has a personal
282 config file which lists their personal weighting of how much they value each token. These
283 weights are what the validator will use to determine transaction ordering when it is their
284 turn to be a proposer.
285 Let’s imagine a config file for the Hub in which two tokens, Dogecoin (DOGE) and
286 Photons (PHO), are whitelisted as fee tokens.
DOGE: 1
287
PHO: 1
288 Each validator can manually adjust these values to their liking (these values were just
289 chosen randomly as an example):
DOGE: 5
290
PHO: 3
291 As more tokens get whitelisted, they get added to the config file as such:
DOGE: 5
PHO: 3
292 BTC: 0
ETH: 0
DAI: 0
293 Then each validator can also adjust these new values as well:
DOGE: 5
PHO: 3
294 BTC: 5000
ETH: 0.2
DAI: 1
295 As these numbers are simply ratios, these values can be normalized to any value. However,
296 a common choice might be to normalize them to the the dollar value of the token.
297 Having such a config file allows validators to run a separate process like a cron job
298 that live updates the configuration file based on live market data pulled from their favorite
299 exchange’s API (or combining the data of multiple!). If the exchange API is unreachable,
300 the validator can set the config to fallback to the last available values, pull data from an
301 on-chain exchange, or even resort to a backup default config (such as one in which Atoms
302 have a weight of 1 and everything else has a weight of 0).
303 Note that a validator can also choose to set a MinimumGasCost in the config file, and
304 choose to drop transactions from the mempool that do not meet their MinimumGasCost.
To k e n o m i c s
XX:8 Cosmos Hub Token Model
319 In the chain, we store each of the values in an ordered list, along with their validator that
320 placed that vote.
323 Then, when a validator wishes to propose a block, they take the weighted median
324 (weighted by stake) of the votes for each fee token, to get the in-consensus value of each
325 token.
326 DOGE: W eightedM edian([(90, 0.1), (100, 0.1), (101, 0.3), (102, 0.2), (100000, 0.3)]) = 101.5
327 PHO: W eightedM edian([(0, 0.3), (0.39, 0.2), (0.4, 0.1), (0.41, 0.3), (0.45, 0.1)] = 0.395
328 At any point, any validator can send a transaction to update their vote. For example,
329 let’s say validator E, updates his vote:
330 E: DOGE = 99, PHO = 0.43
335 DOGE: W eightedM edian([(90, 0.1), (99, 0.3), (100, 0.1), (101, 0.3), (102, 0.2)]) = 100.5
336 PHO: W eightedM edian([(0.39, 0.2), (0.4, 0.1), (0.41, 0.3), (0.43, 0.3), (0.45, 0.1)] = 0.41
337 The medians would likewise be recalculated upon changing of a validators stake/voting
338 power.
339 The purpose of using weighted median, rather than a metric such as weighted average,
340 is it is not affected by outliers. Assuming that < 1/3 of the stake is voting in a byzantine
341 manner, the median value will always be between the values sent by correct processes.
342 As updating a vote requires sending an on-chain transaction, it is likely not feasible for a
343 validator to send an update on an overly-frequent basis. One possible option is to send an
344 update, only when your perceived value of a token changes by more than a certain percent
345 from your last vote.
S. Aggarwal XX:9
346 It is also important to note that this mechanism does require validators to agree upon
347 a unit to normalize around, as if they were all normalizing their weights around different
348 values, this mechanism would not work. One suggested proposal is that validators treat the
349 ATOM token as a value of 1, and the relative value of the fee tokens are normalized around
350 that.
351 A similar weighted median mechanism can also be used to gain consensus on a global
352 MinimumGasCost.
To k e n o m i c s
XX:10 Cosmos Hub Token Model
392 their transaction at the front of the block, and their non-negligible fee will be split
393 amongst all the validators.
394 The Cosmos Hub will initially use mechanism 1, but will likely shift towards mechanism
395 2 upon development of the software and approval from governance. It is encouraged that
396 chains looking to use Multi-Fee Tokens use the mechanism that is best suited for their use
397 case.
423 NEO
424 A common question received is how this staking token model differs than that employed by
425 the NEO blockchain. According to the NEO whitepaper [7]:
426 “NEO network has two tokens, NEO representing the right to manage NEO blockchain
427 and GAS representing the right to use the NEO Blockchain.”
428 At the surface, the NEO token seems similar to the Staking Only Token with GAS
429 serving as a separate Fee Token to pay fees in. However, upon further reading of the NEO
430 documentation, it becomes clear that the NEO model is very different.
431 Firstly, NEO is not actually required to be staked to become a validator. Rather it is
432 used as a mechanism to determine how many votes each NEO account gets. Each account
S. Aggarwal XX:11
433 can vote for as many validator candidates as they wish, and each validator candidate they
434 vote for recieves the number of votes equivalent to the amount of NEO in the voter’s account.
435 For example, if a voting account has 10 NEO, and votes for 4 validator candidates, each
436 candidate recieves 10 votes. According to the documentation, when declaring a validator
437 candidate, 1000 GAS will be charged to the candidate. This seems to be the only charge to
438 the candidate; at no point are any NEO tokens required to be staked. Therefore it does not
439 seem comparable to the staking token model proposed by the Cosmos Hub.
440 With regards to fee tokens, as mentioned earlier, the NEO blockchain only supports a
441 single Fee Token, GAS. Furthermore, the NEO blockchain uses a global MinimumGasCost for
442 transactions, however, there is no mechanism for validators to adjust this MinimumGasCost,
443 as this price is fixed at 1 GAS = 1 resource accounting unit (gas). A transaction that costs
444 5 gas, also costs 5 GAS tokens to be paid as its transaction fees. This means there is no
445 mechanism for transaction costs to adjust to changes in the market price of GAS. If the
446 market price for GAS was $0.01, a transaction that costs 100 GAS costs $1.00 in USD value.
447 However, if the market price of GAS increased to $1.00, that same transaction still has a
448 MinimumGasCost of 500 GAS but has a cost of $500.00 in USD terms. Without a mechanism
449 for validators to adjust the global MinimumGasCost, the volatility in USD value of GAS
450 token will cause massive user experience problems.
451 As can be seen, the NEO model differs significantly from the Cosmos Hub’s staking token
452 and multi-fee token model.
453 EOS
454 Another blockchain that seems to have a somewhat similar staking token model to the
455 Cosmos Hub model is EOS [13]. In EOS, each EOS token holder can stake their EOS tokens
456 in order to vote for block producers as well as receive resources such as CPU, NET, and
457 RAM, resource units that are used for making transactions on the blockchain.
458 However, like in NEO, the staking token EOS is not actually staked by the block producers,
459 and it is not slashable in the case of misbehavior. It is only used to distribute votes to "staked"
460 token holders. In EOS, the term staking does not necessarily imply being a validator or
461 contributing to consensus. Rather, staking your tokens means you’re putting your tokens in
462 a lockup period, during which they can be earning you either CPU, NET, or RAM resources
463 which can be used to pay for computational capacity, network capacity, and storage capacity
464 respectively. These resource units are not exactly tokens, as they are not transferable between
465 users. CPU and NET are only spendable by the original receiver of them, while RAM can be
466 bought and sold to other users, but only through the chains built-in Bancor-style marketplace.
467 [6]
468 These resources, went spend to make transactions, are not given to the block producers,
469 but are rather burned. But if validators are no longer being paid in transaction fees for the
470 contribution in maintaining the network, how are they being compensated? The premise of
471 the compensation of block producers is in that they are rewarded with block rewards in EOS
472 tokens, which have use value because of their necessity to earn resources which afford usage
473 of the EOS blockchain. Despite having more nuances and steps than the traditional single
474 token model, the EOS token seems to be more similar to a single token model that a staking
475 only token model.
To k e n o m i c s
XX:12 Cosmos Hub Token Model
476 6 Conclusion
477 The paper explains the token model of the Cosmos Hub, especially with regards to the
478 incentives and utilities of different tokens in the staking and fees mechanisms. The Atom
479 token acts as a pure staking token with high inflation and minimal utility outside of staking,
480 thus reducing liquidity of free Atoms on the open market and improving the security of
481 the staking system. We also present two designs for constructing a multi fee-token system,
482 which allows users to pay their transaction fees in a variety of whitelisted fee-tokens, which
483 will greatly improve user experience. As mentioned previously, while this token model was
484 originally designed for the Cosmos Hub, we believe that similar designs can be used in other
485 blockchain systems.
486 References
487 1 Sunny Aggarwal. Cosmos proof of stake. Crypto Economics Security Conference 2018,
488 2018. URL: https://github.com/cosmos/cosmos-academy/blob/master/presentations/
489 2018-10-10-cesc/cosmos-pos.pdf.
490 2 Et al. Whitepaper:nxt. 2013. URL: https://nxtwiki.org/wiki/Whitepaper:Nxt.
491 3 Lars Brünjes and Et al. Incentives and staking in cardano. 2018. URL: https://staking.
492 cardano.org/.
493 4 Ethan Buchman, Jae Kwon, and Zarko Milosevic. The latest gossip on BFT consensus. CoRR,
494 abs/1807.04938, 2018. URL: http://arxiv.org/abs/1807.04938, arXiv:1807.04938.
495 5 Vitalik Buterin. Evaluate alternative transaction fee market mechanisms. 8 2018. URL:
496 https://github.com/zcash/zcash/issues/3473.
497 6 EOSReal. Eos ram 101: Non-technical guidebook for beginners. 7 2018. URL: https://medium.
498 com/coinmonks/eos-ram-101-non-technical-guidebook-for-beginners-6f971322042e.
499 7 NEO Foundation. Neo whitepaper. URL: https://docs.neo.org/en-us/whitepaper.html.
500 8 Ethan Frey, Christopher Goes, and Others. The latest gossip on BFT consensus. 2018. URL:
501 https://cosmos.network/docs/spec/ibc/.
502 9 L.M Goodman. Tezos — a self-amending crypto-ledger white paper. 9 2014. URL: https:
503 //tezos.com/static/papers/white_paper.pdf.
504 10 Jae Kwon. Tendermint: Consensus without mining. 2014. URL: https://github.com/cosmos/
505 cosmos/blob/master/tendermint/main.pdf.
506 11 Jae Kwon and Sunny Aggarwal. Interchain scaling security models. Crypto Economics
507 Security Conference 2018, 2018. URL: https://github.com/cosmos/cosmos-academy/blob/
508 master/presentations/2018-10-10-cesc/interchain-scaling-models.pdf.
509 12 Jae Kwon and Ethan Buchman. Cosmos - a network of distributed ledgers. 2017. URL:
510 https://github.com/cosmos/cosmos/blob/master/WHITEPAPER.md.
511 13 Dan Larimer and Et al. Eos.io technical white paper v2. 3 2018. URL: https://github.com/
512 EOSIO/Documentation/blob/master/TechnicalWhitePaper.md.
513 14 Daniel Larimer, Charles Hoskinson, and Stan Larimer. Bitshares: A peertopeer polymorphic
514 digital asset exchange. 2013. URL: https://blog.bitmex.com/wp-content/uploads/2018/
515 06/173481633-BitShares-White-Paper.pdf.
516 15 Karl Marx. Das Kapital: A Critque of Political Economy. 1867.
517 16 Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. 2008. URL: https:
518 //bitcoin.org/bitcoin.pdf.
519 17 Anthony Sassano. Why ether is valuable. 2019. URL: https://medium.com/ethhub/
520 why-ether-is-valuable-2b4e39e01eb3.
521 18 Sam Town. The final frontier of crypto decentralization: Dexs
522 and the liquidity problem. 2018. URL: https://cryptoslate.com/
523 the-final-frontier-of-crypto-decentralization-dexs-the-liquidity-problem/.
S. Aggarwal XX:13
524 19 David Vorick. Choosing asics for sia. 6 2017. URL: https://blog.sia.tech/
525 choosing-asics-for-sia-b318505b5b51.
526 20 Josiah Wilmoth. Bitcoin miners are selling old asics for scrap metal as
527 price decline hastens obsolescence. 11 2018. URL: https://www.ccn.com/
528 bitcoin-miners-are-selling-old-asics-for-scrap-metal-as-price-decline-hastens-obsolescence/.
529 21 Ryan Zurrer. Keepers—workers that maintain blockchain
530 networks. 2017. URL: https://medium.com/@rzurrer/
531 keepers-workers-that-maintain-blockchain-networks-a40182615b66.
To k e n o m i c s