<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Babylon Chain on Medium]]></title>
        <description><![CDATA[Stories by Babylon Chain on Medium]]></description>
        <link>https://medium.com/@babylon_chain?source=rss-ba3c57f42454------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WH5tYbXL0Vb3bmjnJZz7zw.jpeg</url>
            <title>Stories by Babylon Chain on Medium</title>
            <link>https://medium.com/@babylon_chain?source=rss-ba3c57f42454------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:37:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@babylon_chain/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Censorship Resistance via Babylon]]></title>
            <link>https://medium.com/babylonlabs-io/censorship-resistance-via-babylon-ab342ac718f0?source=rss-ba3c57f42454------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab342ac718f0</guid>
            <dc:creator><![CDATA[Babylon Chain]]></dc:creator>
            <pubDate>Thu, 26 Jan 2023 06:43:31 GMT</pubDate>
            <atom:updated>2023-03-07T20:32:51.450Z</atom:updated>
            <content:encoded><![CDATA[<p>Babylon can help Cosmos zones regain their liveness and confirm transactions in the event of a censorship attack by a malicious quorum of validators.</p><p>Through its connection to Bitcoin, Babylon enables the PoS chain to operate as a rollup of Bitcoin. During such a <em>rollup mode</em>, the checkpoint of the transactions determines their order whereas data availability remains as the responsibility of the PoS validators. This architecture achieves the optimal resilience of 1/2 against censorship attacks.</p><h3>Censorship Resilience</h3><p>PoS blockchains such as Cosmos zones typically require validators holding over 2/3 of the stake to honestly follow the protocols for the inclusion of new transactions in the chain. When validators holding over 1/3 of the stake is adversarial, they can arbitrarily prevent the finalization of blocks, thus selectively <em>censor</em> transactions. For instance, the adversarial validators can engage in ransom attacks, during which they ask for bribes from users with time sensitive transactions (similar to the <a href="https://notes.ethereum.org/DD7GyItYQ02d0ax_X-UbWg?view">Validium ransom attack</a>).</p><p>Unfortunately, the 1/3-resilience against censorship is not a shortcoming of the design of Cosmos zones, but a <a href="https://arxiv.org/pdf/2010.06785.pdf">fundamental limitation</a> of the PoS protocols with the ability to <em>slash</em> misbehaving validators (e.g., validators that have signed conflicting blocks). This slashability guarantee discourages attackers from creating conflicting chains; however, results in the degradation of the censorship resilience from 1/2 as is the case for Bitcoin, to 1/3, as observed for Cosmos zones.</p><h3>Babylon for Censorship Resistance</h3><p>Babylon can help PoS chains with slashability guarantees (e.g., Cosmos zones) to close the gap and achieve the censorship resilience of 1/2. Towards this goal, Babylon connects PoS chains to Bitcoin, enabling them to operate in a <em>rollup mode</em>, where Bitcoin is used as an ordering service for the PoS transactions. During the rollup mode, the PoS validators are only responsible for validating the availability of the data within the PoS blocks, whereas the canonical sequence of blocks is determined by the order of their checkpoints on Babylon. The canonical Babylon chain is in turn constructed using the checkpoints of Babylon blocks on Bitcoin, the ultimate authority for the ordering of the PoS blocks.</p><h4>Entering the Rollup Mode</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HplhU9wnZLvtkG6E" /></figure><p>If a user of the PoS chain thinks that a certain transaction tx is censored by the PoS chain, it can prompt the chain to enter the rollup mode by sending a censorship complaint to Babylon (Figure 1). Censorship complaint is a Babylon transaction that contains the hash of the censored transaction tx.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3mO1WpS1eagGBq6R" /></figure><p>Upon observing a censorship complaint on Babylon, PoS validators wait until the checkpoint of the complaint becomes <em>k</em> deep in Bitcoin. By this point, if a validator has not yet seen tx become finalized within the PoS chain, it stops proposing new PoS blocks or signing new proposals (Figures 2). Instead, it sends a checkpoint for its view of the PoS chain to Babylon (Figure 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VyaU-d4ddPmUayD0" /></figure><p>Once the checkpoint of the censorship complaint becomes 2<em>k</em> deep in Bitcoin, if none of the checkpoints on Bitcoin attest to PoS blocks containing tx in their prefix, the validators (and the user) enter the rollup mode (Figure 3).</p><h4>During the Rollup Mode</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WuE_fq0p-BdnpUJe" /></figure><p>During the rollup mode, any validator can propose a bundle of PoS transactions (Figure 4). Upon receiving a bundle, each validator that entered the rollup mode signs the hash of the bundle if its transactions are available in the view of the validator. Bundle hashes that gather signatures from validators with over 1/2 of the stake are posted to Babylon. These hashes and the associated signatures are called <em>bundle checkpoints</em>. A bundle checkpoint is valid if it is accompanied by signatures from validators holding over 1/2 of the stake.</p><p>The signatures on the bundles are needed to prevent the adversary from posting arbitrary hashes to Bitcoin and pretending as if they are checkpoints of unavailable PoS transactions. <a href="https://babylonchain.substack.com/p/babylon-for-fast-stake-unbonding">Recall</a> that upon observing an unavailable checkpoint, the validators stop outputting new PoS blocks as part of the chain to prevent data availability attacks. Thus, without signatures, the adversary could post an arbitrary hash resembling an unavailable checkpoint, and stall the PoS chain. With signatures, the adversary has to corrupt over half of the validators in proportion to stake to obtain an unavailable checkpoint signed by these validators.</p><p>To construct the PoS chain during the rollup mode, users of the chain first identify the PoS checkpoints whose timestamps are within 2<em>k</em> blocks of the checkpoint of the censorship complaint on Bitcoin. They subsequently identify the longest PoS chain attested by these checkpoints. Finally, they attach bundles with valid checkpoints to the tip of this chain in the order their checkpoints appear on Babylon.</p><h4>Exiting the Rollup Mode</h4><p>Validators exit the rollup mode after observing T&gt;2<em>k</em> blocks building on the checkpoint of the censorship complaint on Bitcoin. Here, T is a protocol parameter representing the duration of the rollup mode. Upon observing these T blocks, both the validators and users of the PoS chain treat the last bundle added to their view of the chain as the new genesis block. This block is used as the anchor restart/bootstrap the PoS protocol.</p><h3>Limits of Censorship Resistance</h3><p>Via the rollup mode, the PoS chain mitigates censorship attacks as long as there are enough honest validators to sign the bundle hashes. This implies a censorship resilience of 1/2, matching the resilience of Bitcoin. Unfortunately, it is impossible to design a protocol that attains a resilience greater than 1/2 even with the help of Bitcoin unless all of the PoS block data is posted to Bitcoin, which is not feasible (cf. Theorem 4 of the paper). In the light of this impossibility result, Babylon’s design achieves the optimal resilience against censorship attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab342ac718f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/babylonlabs-io/censorship-resistance-via-babylon-ab342ac718f0">Censorship Resistance via Babylon</a> was originally published in <a href="https://medium.com/babylonlabs-io">BabylonLabs.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Babylon for Fast Stake Unbonding]]></title>
            <link>https://medium.com/babylonlabs-io/babylon-for-fast-stake-unbonding-ba14fd38a06?source=rss-ba3c57f42454------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba14fd38a06</guid>
            <dc:creator><![CDATA[Babylon Chain]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 18:12:37 GMT</pubDate>
            <atom:updated>2023-03-07T20:32:44.677Z</atom:updated>
            <content:encoded><![CDATA[<p>How does Babylon utilize Bitcoin security to dramatically reduce the stake unbonding time?</p><h3>Background</h3><p>Proof-of-Stake blockchains such as Cosmos zones allow fast finality for transactions but suffer from a long unbonding period (withdrawal delay) for stake with serious effects on user experience and liquidity of tokens. In the previous blog post, we identified long range attacks as the root cause of imposing a withdrawal delay. To mitigate these attacks, PoS chains often require external observers (e.g., major stake-holders of the protocol) to reach consensus on the finality of blocks containing withdrawal requests through off-chain communication. As this social consensus involve active participation of human actors, it can take <em>weeks</em>, resulting in a long withdrawal delay (Figure 1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lSSubZ9yvXhT5DlH" /></figure><h3>Checkpointing to Bitcoin as a solution</h3><p>Fortunately, it is possible to speed up and automate social consensus by using Bitcoin, the most secure blockchain in the world, as the modicum of agreement on the finality of withdrawal requests. For this purpose, weak subjectivity checkpoints on PoS blocks are replaced with actual checkpoints of these blocks on Bitcoin (Figure 2). The order of these checkpoints determine the canonical PoS chain. Once the checkpoint of a PoS block becomes sufficiently deep in Bitcoin (e.g., k=6 blocks deep), the checkpoint cannot be reverted, implying that the checkpoints of any attack chain would appear later on Bitcoin, and can subsequently be ignored. Thus, to grant withdrawal requests, it is sufficient for the checkpoint of the PoS block containing the request to appear earlier than conflicting checkpoints on Bitcoin, and be k-deep for a sufficiently large k. As this takes on the order of <em>hours</em> rather than weeks, the withdrawal delay can be reduced from weeks to hours using Bitcoin, (c.f., <a href="https://arxiv.org/pdf/2207.08392.pdf">paper</a> for technical details).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p4jI2lcc7IyRhPov" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*0r9MIVoXAP5SR4fD" /></figure><h3>Can we directly send checkpoints to Bitcoin?</h3><p>Let’s consider a Cosmos zone (which is a PoS blockchain) sending checkpoints to Bitcoin to mitigate long range attacks and reduce its withdrawal delay. The checkpointing can be realized by using the OP_RETURN opcode of Bitcoin that allows posting 80 bytes of arbitrary data within an unspendable Bitcoin transaction. Each checkpoint must include at least the hash of the PoS block (32 bytes) to be checkpointed as well as the signatures (each 32 bytes) that finalize the block. Here, the hash is used to identify the PoS block that is checkpointed. The signatures are needed to prevent the adversary from <em>sending arbitrary hashes and pretending like it is checkpointing a Cosmos block on Bitcoin</em> (We will see in the next section why this is a problem).</p><p>As each Cosmos block might contain a withdrawal request, the zone might have to send a new checkpoint for <em>every</em> new Cosmos block. Whereas the zone might have a new block every 10 seconds, there is a Bitcoin block only every 10 minutes, implying at least 60 blocks worth of data to be checkpointed at each Bitcoin block. Then, even if the zone is run by a single validator, this implies a total size of at least 3840 bytes to be checkpointed at every new Bitcoin block, requiring at least 48 OP_RETURN transactions per block, just for checkpointing a single Cosmos zone! At this point, we are not even considering a zone run by multiple validator, or checkpointing multiple PoS chains. In general, checkpointing Cosmos zones directly on Bitcoin might not be feasible due to three major reasons:</p><ul><li>It is necessary to checkpoint every Cosmos block containing a withdrawal request, which might be <em>all</em> of the blocks in a Cosmos zone.</li><li>It is necessary to post sufficiently many signatures with each checkpoint to prevent a weak adversary (that does not control many validators) from sending arbitrary hashes and pretending like it is checkpointing a Cosmos block on Bitcoin. Unfortunately, Tendermint signatures used by the consensus of Cosmos zones are not aggregable and take up a lot of space.</li><li>There might be many Cosmos zones or other PoS chains sending checkpoints. In this context, the limited space of the Bitcoin blocks implies a fundamental scalability problem for the checkpointing solution.</li></ul><p>To reduce the footprint of checkpoints and develop a scalable checkpointing solution that can support multiple Cosmos zones simultaneously, we need to aggregate checkpoints to fit them into the limited space offered by each Bitcoin block. Moreover, we need to make these checkpoints as compact as possible. This is where Babylon enters the game.</p><h3>Babylon Architecture</h3><p>Babylon is a PoS Cosmos zone that receives streams of checkpoints from multiple PoS chains as transaction data and posts a single checkpoint stream to Bitcoin on their behalf. The size of the checkpoints to Bitcoin from Babylon is minimized by using aggregate signatures for the Babylon validators and the frequency of these checkpoints is controlled by allowing the Babylon validators to change only once every epoch of many block times.</p><p>For illustration, the full Babylon architecture consists of three blockchains: client PoS chains (e.g., consumer Cosmos zones as specified in the figure of the <a href="https://babylonchain.io/blogs/f/babylon-bitcoin-security-for-all">first blog post</a>), Babylon and Bitcoin (Figure 3). To <em>minimize the trust on Babylon</em> to accurately checkpoint PoS blocks, validators of the respective PoS chains (we focus on one chain for clarity) download the Babylon blocks, and observe if their PoS checkpoint is contained in a Babylon block checkpointed by Bitcoin. This enables the PoS chains to detect discrepancies, for instance, if the Babylon validators create an unavailable block checkpointed by Bitcoin and lie about the PoS checkpoints being included in the unavailable block (Figure 7). The main components of the protocol are described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mGSPNeorBxBMVbDz" /></figure><p><strong>1) Checkpointing:</strong> Babylon proceeds in epochs during which the validator set of Babylon is fixed. Thus, only the last block of a Babylon epoch is checkpointed by Bitcoin. Checkpoint consists of the hash of the block and a <em>single</em> <a href="https://crypto.stanford.edu/~dabo/pubs/papers/BLSmultisig.html"><em>aggregate BLS signature</em></a> that corresponds to signatures from 2/3 of the validator set that has signed the block for finalization. Babylon checkpoints also contain the epoch number.</p><p>PoS blocks can be assigned the <em>timestamp</em> of a Bitcoin block through the Babylon checkpoints. For instance, the first two PoS blocks on Figure 3 are checkpointed by Babylon blocks that are in turn checkpointed by the Bitcoin block with timestamp t_3. Hence, these PoS blocks are assigned the Bitcoin timestamp t_3.</p><p><strong>2) Canonical PoS chain:</strong> Whenever there is a fork on the PoS chain, the fork whose first block has an earlier Bitcoin timestamp is adopted as the canonical PoS chain (Figure 4). If both forks have the same timestamp, the tie is broken in favor of the PoS block with the earlier checkpoint on Babylon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vh5Qg8LM9siJ1ude" /></figure><p><strong>3) Withdrawal rule:</strong> To withdraw its stake, a validator sends a withdrawal request to the PoS chain (Figure 4). A PoS block containing the withdrawal request is checkpointed by Babylon, which is then checkpointed by Bitcoin, and assigned the timestamp t_1. Once the Bitcoin block with timestamp t_1 becomes <em>k</em> deep, withdrawal is granted on the PoS chain. At this point, if the validators that have withdrawn their stake engage in a long range attack, the blocks on the attack chain (bottom chain on Figure 4) can only be assigned a Bitcoin timestamp that is later than t_1. This is because once the Bitcoin block with timestamp t_1 becomes k-deep, it cannot be reverted. Then, observing the order of these checkpoints on Bitcoin, PoS clients can distinguish the canonical chain from the attack chain, which is subsequently ignored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xcZV6SWrdko1Bwr6" /></figure><p><strong>4) Slashing rule:</strong> It is possible to slash the validators that have double signed conflicting PoS blocks if they have not withdrawn their stake at the time the attack is detected (Figure 5). The adversarial PoS validators know that if they wait until their withdrawal requests are granted to do a long range safety attack, they will not be able to confuse clients, which can look at Bitcoin to identify the canonical chain (Figure 4). Hence, they might fork the PoS chain as soon the blocks on the canonical PoS chain (top chain on Figure 5) are assigned a Bitcoin timestamp (e.g., t_2). These PoS validators then collaborate with adversarial Babylon validators and Bitcoin miners to fork Babylon and Bitcoin and replace the Bitcoin block with timestamp t_2 with another block of timestamp t_3. This changes the canonical PoS chain from the top chain to the bottom one in the view of a late-coming PoS client. Although this is a successful safety attack, it results in the slashing of the adversarial PoS validators’ stake as they have double-signed conflicting blocks (circled in red on Figure 5), yet have not withdrawn their stake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LYA0GxzvYICCnhCa" /></figure><p><strong>5) Stalling rule for unavailable PoS checkpoints:</strong> PoS validators have to stall, i.e., freeze their PoS chain, upon observing an <em>unavailable</em> PoS checkpoint on Babylon. Here, an unavailable PoS checkpoint is a hash signed by 2/3 of the PoS validators, that supposedly corresponds to a PoS block that <em>cannot</em> be observed. If the PoS validators do not stall upon observing an unavailable checkpoint, then the adversary can reveal a previously unavailable attack chain (shown in shaded green on Figure 6), and change the canonical chain in the view of the late-coming clients. This is because the checkpoint of the shaded chain that is revealed later appears earlier on Babylon.</p><p>Stalling rule above exposes the reason why we require the PoS block hashes sent as checkpoints to be signed by the PoS validator set. If these checkpoints were not signed, then any adversary would be able to send an arbitrary hash, and claim that it is the hash of an unavailable PoS block checkpointed on Babylon. Then, the PoS validators would have to stall for a checkpoint that does not have any unavailable PoS chain in its pre-image! Note that creating an unavailable PoS chain is hard: It requires corrupting at least 2/3 of the PoS validators so that they finalize PoS blocks with their signatures, yet withhold the data from the honest validators. However, in the hypothetical attack above, the adversary stalled the PoS chain without corrupting even a single validator. To prevent such attacks, we require PoS checkpoints to be attested by 2/3 of the PoS validators; so that Babylon will have unavailable PoS checkpoints only if indeed 2/3 of the PoS validators are corrupted. Such an attack is highly unlikely due to the cost of corrupting the PoS validators, and does not affect the other PoS chains or Babylon itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LjUQc9Oxej41qY1A" /></figure><p><strong>6) Stalling rule for unavailable Babylon checkpoints:</strong> PoS and Babylon validators have to stall upon observing an <em>unavailable</em> Babylon checkpoint on Bitcoin. Here, an unavailable Babylon checkpoint is a hash with an aggregate BLS signature by 2/3 of the Babylon validators, that supposedly corresponds to a Babylon block that <em>cannot</em> be observed. If the Babylon validators do not stall, then the adversary can reveal a previously unavailable Babylon chain (shown in shaded blue on Figure 6), thus changing the canonical Babylon chain in the view of the late-coming clients. Similarly, if the PoS validators do not stall, then the adversary can reveal a previously unavailable PoS attack chain (shown in shaded green on Figure 7) along with the previously unavailable Babylon chain, thus changing the canonical PoS chain in the view of the late-coming clients. This is because the shaded Babylon chain revealed later has an earlier timestamp on Bitcoin, and contains the checkpoint of the PoS attack chain revealed later.</p><p>Just like the stalling rule for unavailable PoS checkpoints, the rule above exposes the reason why we require the Babylon block hashes sent as checkpoints to be accompanied by an aggregate BLS signature attesting to signatures by 2/3 of Babylon’s validator. If Babylon checkpoints were not signed, then any adversary would be able to send an arbitrary hash, and claim that it is the hash of an unavailable Babylon block checkpointed on Bitcoin. Then, the PoS validators as well as the Babylon validators would have to stall for a checkpoint that does not have any unavailable Babylon or PoS chain in its pre-image! Creating an unavailable Babylon chain requires corrupting at least 2/3 of the Babylon validators. However, in the hypothetical attack above, the adversary stalled all chains in the system without corrupting even a single Babylon or PoS validator. To prevent such attacks, we require Babylon checkpoints to be attested by an aggregate signature; so that there will be unavailable Babylon checkpoints only if indeed 2/3 of its validators are corrupted. Such a data availability attack is highly unlikely due to the cost of corrupting the Babylon validators. Unfortunately, once it happens, it affects all PoS chains by forcing them to stall.</p><h3>Conclusion</h3><p>Babylon reduces the unbonding period of PoS chains from weeks to a few hours by enabling these chains to use Bitcoin as a timestamping service, akin to the role of social consensus. As checkpointing PoS blocks on Bitcoin directly is unfeasible due to lack of space within Bitcoin blocks, Babylon as a separate PoS chain aggregates the checkpoints sent by the PoS chains and posts them to Bitcoin on their behalf. Babylon architecture prevents long range attacks through its k-deep withdrawal rule for unbonding validators, and guarantees slashing of the adversarial stake in the event of short-range safety attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba14fd38a06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/babylonlabs-io/babylon-for-fast-stake-unbonding-ba14fd38a06">Babylon for Fast Stake Unbonding</a> was originally published in <a href="https://medium.com/babylonlabs-io">BabylonLabs.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WHY ARE UNBONDING PERIODS SO LONG ON PROOF OF STAKE?!]]></title>
            <link>https://medium.com/babylonlabs-io/why-are-unbonding-periods-so-long-on-proof-of-stake-d44e863c5cb8?source=rss-ba3c57f42454------2</link>
            <guid isPermaLink="false">https://medium.com/p/d44e863c5cb8</guid>
            <category><![CDATA[proof-of-stake]]></category>
            <category><![CDATA[bitcoin-security]]></category>
            <category><![CDATA[babylon-chain]]></category>
            <category><![CDATA[cosmos-ecosystem]]></category>
            <dc:creator><![CDATA[Babylon Chain]]></dc:creator>
            <pubDate>Sat, 21 Jan 2023 18:26:09 GMT</pubDate>
            <atom:updated>2023-03-07T20:32:32.208Z</atom:updated>
            <content:encoded><![CDATA[<h3>Proof-of-Stake blockchains such as Cosmos zones allow fast confirmation of transactions but very slow unbonding of stake, with repercussions on user experience and liquidity of the blockchain. Why?</h3><h3>Proof-of-Stake Chains and the Unbonding Period</h3><p>Proof-of-stake (PoS) blockchains have seen widespread interest due to their energy efficiency. To secure the system, PoS chains require the validators of the blockchain to <em>stake</em> tokens before they can propose or vote on blocks. This enables the PoS protocol to hold protocol violators accountable, and slash their staked, i.e., <em>bonded</em>, tokens as punishment. This gives another incentive for honest participation besides the block rewards.</p><p>In addition to energy efficiency, one important advantage of PoS chains is <em>fast</em> finality: transactions are confirmed fast, of the order of <em>seconds</em>. In contrast, stake unbonding is very slow, of the order of <em>weeks</em> (Table 1). Many PoS protocols require a lengthy unbonding period to elapse before a withdrawing validator can take back its staked funds. During the unbonding period, the validators cannot participate in the PoS protocol and <a href="https://help.p2p.org/en/articles/5344974-cosmos-atom-undelegation-period#:~:text=If%20you%20wish%20to%20stop,be%20able%20to%20withdraw%20them.">do not accrue any block rewards or interest on their stake</a>. They also cannot move the staked funds and use them for other purposes. The immobility of stake over a long unbonding period not only degrades user experience and creates financial friction, but also reduces the liquidity of the coins in the PoS system. Interestingly, Proof-of-Work chains are polar opposite: transactions are confirmed slowly but hash power can leave the network at will.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_DhjtfrinAWyPvJP" /></figure><p>Table 1: Unbonding period on different Proof-of-Stake blockchains such as <a href="https://help.p2p.org/en/articles/5344974-cosmos-atom-undelegation-period#:~:text=If%20you%20wish%20to%20stop,be%20able%20to%20withdraw%20them.">Cosmos zones</a>, <a href="https://github.com/runtimeverification/beacon-chain-verification/blob/master/weak-subjectivity/weak-subjectivity-analysis.pdf">PoS Ethereum</a> [<a href="https://babylonchain.substack.com/p/why-is-stake-unbonding-so-slow#footnote-1">1</a>], <a href="https://docs.avax.network/nodes/validate/staking">Avalanche</a>, Algorand and Cardano [<a href="https://babylonchain.substack.com/p/why-is-stake-unbonding-so-slow#footnote-2">2</a>]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*k-ew29XAMhzUR2hn" /></figure><h3>Can Liquid Staking Help?</h3><p>Liquid staking aims to alleviate the problem of stake being locked up in a PoS chain. To engage in liquid staking, users deposit their funds in an escrow that stakes these funds on behalf of the user. In return, the users receive a <em>tokenized</em> version of their funds, which they can trade freely in the market. For instance, by staking Eth in a liquid staking contract, the user gets a ‘staked Eth’ (‘stEth’ for short), which it can put up as collateral for borrowing and <a href="https://academy.moralis.io/blog/deep-dive-liquid-staking-and-its-benefits">yield farming</a>.</p><p>Despite enabling new opportunities in DeFi, liquid staking has its drawbacks:</p><ul><li>The stake underlying a liquid token can be slashed due to network problems, or adversarial actions by the validators that have the custody of the stake. Such events that are beyond the control of the owner of the liquid token, can nevertheless reduce, and in the worst case, destroy the value of the token altogether.</li><li>If liquid staking is handled by a smart contract, <a href="https://help.lido.fi/en/articles/5230603-what-are-the-risks-of-staking-with-lido">it can have bugs</a> leading to the theft of the staked funds.</li><li>The risks above might reflect in a price difference between the actual stake and the corresponding token. For instance, the price of stEth tokens offered by Lido has recently <a href="https://www.cnbc.com/2022/06/20/what-is-staked-ether-steth-and-why-is-it-causing-havoc-in-crypto.html">dropped as much as 8% of the Eth price</a> due to market volatility and under-collateralization of the positions backed by stEth.</li><li>Pooling of the stake deposited to large liquid staking services hurts the decentralization of the PoS chain, and reduces the sovereignty of the users over their funds. For instance, the largest liquid staking pool, Lido, holds <a href="https://www.coinbase.com/institutional/research-insights/research/monthly-outlook/liquid-staking-june-2022">32.1% market share of all the staked Ethereum in the Ethereum beacon chain</a>. This value is just below the 33% that would be sufficient for an adversary to <em>double-spend or stall the chain</em>. The risks such cartelization of stake implies for Ethereum continues to be a <a href="https://notes.ethereum.org/@djrtwo/risks-of-lsd">source of worry</a> for the community.</li></ul><h3>Why Is the Unbonding Period So Long?</h3><p>Risks of liquid staking underlines the importance of reducing the unbonding period itself rather than finding work-arounds for the liquidity problem. For this goal, we have to understand what purpose the unbonding period serves, and why it is so long in the first place. Thus, we first look into long range attacks, the reason why PoS chains such as Cosmos zones adopted long unbonding periods.</p><h4>Long Range Attacks on Proof-of-Stake Chains</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*0tymO9lfK_kdEnus" /></figure><p>Figure 1: The canonical chain. Old validators are shown in dark green, and the new ones are shown in blue. Upon withdrawing their stake, the old, dark green, validators are replaced with the new, blue ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/0*h-lKr7rPsBIkl_d1" /></figure><p>Figure 2: Long range attack on the canonical chain. After withdrawing their stake, old, dark green, validators, e.g., the founders of the chain, are corrupted by the adversary. They then build a conflicting chain that forks from the canonical chain at a past block. On the conflicting chain, they inaugurate a new, purple, set of validators that are under adversary’s controls. The two chains look equally valid to clients that observe the system at a later time.</p><p>Security of the Cosmos zones rely on their ability to hold protocol violators accountable, and slash their stake as punishment. For instance, if validators sign and finalize two conflicting blocks to cause confusion among the clients, they can be identified as protocol violators by showing the conflicting signatures as evidence, and can subsequently be slashed. However, once the validators unbond, i.e., withdraw their stake from the chain, they can no longer be punished for protocol violations. As a result, an <em>adversary can incentivize these old validators to stage a long range attack</em> (c.f. Figures 1 and 2). A prominent example of long range attacks is the <em>founders’ attack</em> described below.</p><p>Before the attack starts, founders of the chain, i.e., the initial validators, withdraw their stake. Then, using their old keys, they build a new chain that conflicts with the existing, <em>canonical</em> chain. The conflicting chain forks from the canonical chain at a past block, where the founders, i.e., the old validators, constituted a majority of the validator set (c.f. Figure 2). On the conflicting chain, these founders withdraw again, and transfer their voting power to new validators with different keys, that are in fact controlled by the adversary (which can be the founders themselves!). This enables the adversary to continue building on the conflicting chain after the supposed withdrawal of the founders.</p><p>Long range attacks pose a serious threat to security since they can confuse late-coming clients to adopt a chain different from the canonical one adopted by the earlier clients. Unfortunately, these attacks are inherent to PoS protocols, which suffer from the nothing-at-stake problem. This problem arises when the same stake can be used multiple times to produce multiple conflicting blocks, as is the case for a long range attack. In comparison, Proof-of-Work chains such as Bitcoin, are not vulnerable to nothing-at-stake or long range attacks since the attacker cannot use the ‘same’ computation to build multiple separate blocks.</p><h4>Mitigating Long Range Attacks: Social Consensus?</h4><p>For protection against long range attacks, many PoS chains ask new joining clients and validators to identify a <em>checkpoint</em> block on the canonical chain with the help of a <a href="https://v1.cosmos.network/resources/whitepaper#preventing-long-range-attacks"><em>trusted</em> source</a>. For example, the suggested sources for a bootstrapping Cosmos light client include trusted <a href="https://medium.com/tendermint/everything-you-need-to-know-about-the-tendermint-light-client-f80d03856f98">websites, Discord channels containing the list of checkpoint blocks, or the trusted peers used to download the client code</a>. Upon receiving a checkpoint block, clients can safely ignore conflicting chains built by old validators (c.f. Figure 3).</p><p>The reliance of the clients on an external trusted source is called <em>social consensus</em> to emphasize the <a href="https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity/">subjectivity</a> of the process that identifies the canonical, <em>correct</em> chain. Indeed, different peers might easily disagree about the canonical chain as there is no ground truth for the ‘correctness’ of the chain, unlike in Bitcoin, which always selects the chain with the most computational work as the ‘correct’ chain.</p><p>Although social consensus is a first step towards mitigating long range attacks, it comes with its own problems:</p><ul><li>Social consensus <a href="https://github.com/tendermint/tendermint/issues/4422">does not specify</a> how to identify the trusted peers. As these peers can be different for different validators, it is often difficult to quantify the trust placed on them.</li><li>In the case of a public trust source such as a website, social consensus exposes a single point of failure to potential attackers. What if the website that lists checkpoints gets hacked?</li><li>Social consensus introduces issues around transparency, and can lead to centralization of chain-wide decisions around strong players of the blockchain ecosystem.</li></ul><h4>How does the Unbonding Period Fit In All This?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FD0F1Wll9TrZ6ETj" /></figure><p>Figure 3: New joining client asks its peers for <em>weak subjectivity checkpoints</em> (the blocks with the green checkmarks) on the canonical chain. Upon observing the checkpoints, client can distinguish the conflicting attack chain (bottom) from the canonical chain (top).</p><p>Among the drawbacks of social consensus, the most serious one is its <em>dismal latency</em>: It can take days or weeks for all the trusted peers to agree on a checkpoint. This is due to the subjective and social aspect of the agreement process. For instance, the peers might be communicating via Telegram (c.f. Figure 3), where agreements on the chain would take much longer than, for example, the confirmation latency of a consensus protocol. That is why the last checkpoint on the canonical chain in Figure 3 is much older than the tip of the chain.</p><p>If the old validators can withdraw and create a conflicting chain while social consensus is still ongoing, the peers that should serve as the trusted source might fail to agree on the checkpoints. That is indeed why many PoS chain including Cosmos zones impose long unbonding periods. A long unbonding period means that the old validators must wait until social consensus terminates and a block is checkpointed on the canonical chain, before they can take back their staked funds. This in turn prevents the malicious validators from confusing the clients, as the clients would immediately identify the conflicting, malicious chain (bottom chain in Figure 3) as the one <em>without</em> the checkpoints. Old validators of course have the option to build a conflicting chain before taking their stake back. However, their stake might get slashed in this case due to double-signatures, and makes this attack highly unlikely in practice.</p><h3>Conclusion</h3><p>Long unbonding period degrades the user experience and the liquidity in a PoS system. Although <em>some</em> unbonding period is necessary to mitigate long range attacks, its length would be much shorter if social consensus could make decisions faster. Thus, in the next post, we will look into whether we can achieve a shorter unbonding period by replacing social consensus with a faster source of trust.</p><p>[<a href="https://babylonchain.substack.com/p/why-is-stake-unbonding-so-slow#footnote-anchor-1">1</a>] 13 days was calculated for 130,000 attesters with an average balance of 32 ETH to accurately model the targeted attester numbers of PoS Ethereum, using Table 1 in this <a href="https://github.com/runtimeverification/beacon-chain-verification/blob/master/weak-subjectivity/weak-subjectivity-analysis.pdf">weak subjectivity analysis</a>.</p><p>[2] Algorand and Cardano use key-evolving signatures, thus under an honest majority assumption, they can theoretically enable instant unbonding of stake. However, key-evolving signatures require bonded validators to willingly forget their old signing keys. This is not incentive-compatible as there might be a strong incentive for the validators to remember the old keys in case they later become useful. For this reason, Algorand still uses social consensus for checkpointing besides key-evolving signatures.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d44e863c5cb8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/babylonlabs-io/why-are-unbonding-periods-so-long-on-proof-of-stake-d44e863c5cb8">WHY ARE UNBONDING PERIODS SO LONG ON PROOF OF STAKE?!</a> was originally published in <a href="https://medium.com/babylonlabs-io">BabylonLabs.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Checkpointing Babylon to BTC]]></title>
            <link>https://medium.com/babylonlabs-io/checkpointing-babylon-to-btc-c329154426a8?source=rss-ba3c57f42454------2</link>
            <guid isPermaLink="false">https://medium.com/p/c329154426a8</guid>
            <category><![CDATA[babylon-chain]]></category>
            <category><![CDATA[cosmos-ecosystem]]></category>
            <category><![CDATA[checkpointing]]></category>
            <category><![CDATA[bitcoin-security]]></category>
            <dc:creator><![CDATA[Babylon Chain]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 08:03:54 GMT</pubDate>
            <atom:updated>2023-03-07T20:32:21.280Z</atom:updated>
            <content:encoded><![CDATA[<p>23 September 2022|Blogs</p><p>TL;DR</p><p>In a nutshell, Babylon implements the following mechanisms to checkpoint itself to BTC:</p><ol><li>An epoching mechanism that disables validator set rotation within an epoch.</li><li>BLS multi-signature to generate succinct and verifiable checkpoints for each epoch.</li><li>Independent vigilante relayer that submits checkpoints to BTC network via BTC OP_RETURN transactions.</li></ol><h4>Introduction</h4><p>Babylon implements a three-layer architecture (Fig 1 below) to help consumer zones obtain secure BTC (Bitcoin) timestamps. Sitting in the middle layer, Babylon acts as an aggregator: It accepts checkpointing data from consumer zones to its ledger while checkpointing its ledger to BTC, so that all the consumer zones’ checkpoints can have BTC timestamps indirectly. Babylon’s BTC checkpoints also protect Babylon itself from long-range attacks, so that the BTC timestamps it generates for the consumer zones are secured. In this post, we will demonstrate how Babylon checkpoints itself to BTC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7zoKa9KRQRRcvlHb" /></figure><h4>What Makes a Proper Checkpoint?</h4><p>For security purposes, conventional checkpoints such as block hash and state hash won’t work. This is because it is impossible to distinguish bogus checkpoints from valid checkpoints of a private fork generated by malicious Babylon validators. In other words, such checkpoints do not support the detection of long-range attacks.</p><p>Therefore, Babylon checkpoints must be verifiable: Anyone with the latest Babylon ledger (i.e., a synced Babylon full node) should be able to tell whether or not a checkpoint represents a ledger state committed by at least 2/3 (in terms of total stake) of the Babylon validators.</p><p>In addition, Babylon checkpoints must be succinct. This is because BTC network has extremely tight throughput and space constraints: an average of 5 transactions per second and an average transaction size of 300 bytes. Thus, to use BTC respectfully and efficiently, Babylon checkpoints must be both small and infrequent. Indeed, BTC already supports the upload of arbitrary data in a very constrained way via its OP_RETURN transaction type. This transaction supports a special transaction output with a size of up to 80 bytes, and this output will not be included in the BTC UTXO set. These 80 bytes can thus be used to carry arbitrary data without permanently inflating the UTXO set.</p><h4>A Succinct and Verifiable checkpoint</h4><p>An example of verifiable checkpoint is the lastCommit carried by every Babylon block, which is the list of Ed25519 commit signatures on its parent Babylon block, signed by the majority of Babylon validators. However, the size of lastCommit is in the order of kilobytes. One will need tens of OP_RETURN transactions to carry one lastCommit. This is not only expensive but is also vulnerable to transaction failures and pollution attacks.</p><p>To minimize the checkpoint size, Babylon requires every validator to register a BLS public key when it signs up. BLS signature has the desirable properties that 1) the signatures from any arbitrary signers can be aggregated into one 48-byte BLS multiSig without needing any group ceremony or coordination between the signers, and 2) the BLS multiSig can be verified by anyone who knows the BLS public key of the corresponding signers.</p><p>For a block that needs to be checkpointed, every Babylon validator uses its BLS private key to sign the commit hash of this block (carried by the next block as the lastCommitHash) and submits its signature as a special Babylon transaction via Tendermint. The signatures from at least 1/3 validators are then aggregated into one BLS multiSig. The BLS multiSig, plus some metadata (to be specified soon), forms a succinct and verifiable checkpoint for Babylon.</p><p>We note that 1/3+ validator power is sufficient for safety. When a Babylon full node observes a checkpoint at block height H that is conflicting with the block-H this node has:</p><ul><li>if the corresponding block is available, then all the Ed25519 signers of this block can be identified. By comparing them with the Ed25519 signers of the block-H that this node has, the 1/3 double-signers can be identified and slashed.</li><li>if the corresponding block is unavailable, then all the 1/3+ BLS-signed validators are adversarial. In this case, Babylon has less than 2/3 honest validators, so the full node can immediately stall to avoid losses.</li></ul><p>Now we have succinct and verifiable checkpoints for any block. The next question is: which blocks need to be checkpointed?</p><h4>Which Blocks to Checkpoint?</h4><p>In order to verify a checkpoint, one needs to know what the legitimate set of validators is, as well as their BLS keys. The only way to determine the legitimate validator set is to track every validator set rotation since the genesis. Therefore, whenever there is a validator set rotation, the corresponding block must be checkpointed. Furthermore, it is sufficient to only checkpoint such blocks because it also implicitly checkpoints all the previous blocks committed by this validator set.</p><p>In order to have a controllable checkpointing frequency, Babylon implements an epoching mechanism. Every epoch consists of M consecutive Babylon blocks. All requests in these blocks that could cause validator rotation (namely, staking and undelegate requests) are only processed with the last block of this epoch. This way, there will be no validator set rotation within an epoch. Consequently, it is sufficient to only checkpoint one block per epoch.</p><p>More specifically, the block we checkpoint is the first block of each epoch-E, BLS-signed by the validator set of epoch-(E-1). This is because this block carries the execution result of the last block of epoch-(E-1) and is committed by the new validator set. By asking the validators of epoch-(E-1) to sign the commit hash of this block, the validator set of epoch-(E-1) effectively acknowledges both the ledger state and the validator power transfer.</p><p>Thus, the checkpoint generated in Babylon contains:</p><ul><li>epoch number E-1, which indicates the validator set</li><li>commit hash of the first block of epoch-E</li><li>BLS multiSig on this commit hash, signed by 1/3+ validators of epoch-(E-1)</li><li>a binary bitmap indicating who in the validator set have signed</li></ul><p>Implementation-wise, inside a Babylon node, we introduce two new Cosmos modules to achieve epoching and the generation and maintenance of checkpoints (Figure 2). In particular, the Epoching module wraps the Staking module to control validator set rotation. The Epoching module also handles bond release of the undelegate requests upon BTC finalization (to be covered in a separate post).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9UbybCW7oPLuKHIM" /></figure><h4>Submit the Checkpoint</h4><p>We implement a vigilante relayer to submit the checkpoints to BTC. A vigilante relayer is an independent program that reads the checkpoints from a Babylon node, packages them into BTC OP_RETURN transactions, and submits them to the BTC network using its own Bitcoin. The relayer can optionally attach a Babylon account to the first half checkpoint to claim Babylon rewards.</p><p>We call the relayer “vigilante” because it voluntarily contributes to the security of Babylon system. Indeed, one honest and live vigilante throughout the network is enough to guarantee successful and secure Babylon checkpoints to BTC.</p><p>In summary, the checkpointing submission sub-system of Babylon node and the vigilante submitter towards BTC are illustrated below in Figure 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yA-XcB4CU6ETMNOw" /></figure><h4>Comparison with Other Checkpointing Techniques</h4><p>Besides OP_RETURN transaction, BTC has another transaction type that could be used for secure checkpointing, which is called the taproot transaction. The input UTXO of such a transaction belongs to a Schnorr group public key, and the transaction is only valid if enough members (according to a pre-set threshold) in the group have signed this transaction with their own Schnorr private key. A ceremony is needed to create all the keys and the threshold. A new ceremony is also needed whenever the group composition changes.</p><p>Validators of the checkpointing chain can conduct such a ceremony on BTC and register their public Schnorr keys on the checkpointing chain. This way, any data about the checkpointing chain carried by a valid BTC taproot transaction reflects the consensus between these validators. Protocol Lab’s Pikachu protocol uses this technique to checkpoint Filecoin to BTC. Cosmos zone Nomic uses this technique to securely manage the Bitcoins that back up its nBTC token.</p><p>Utilizing Taproot transaction is as secure as Babylon’s checkpointing mechanism. It is also an elegant solution because only checkpoints committed by the majority of the checkpointing chain’s validators will appear in BTC ledger. When implemented appropriately, the interlinked Taproot transactions will form an ordered chain of checkpoints, allowing fast retrieve of all the checkpoints without scanning the BTC ledger.</p><p>On the other hand, Babylon made a different design choice that favours simplicity, liveness, and flexibility.</p><ul><li>Using OP_RETURN transaction and BLS multiSig does not require any ceremony, which could otherwise be cumbersome for Babylon, since Babylon has a short undelegation period and may have high validator rotation rate.</li><li>To generate the checkpoints, Babylon validators only need to submit on-chain BLS signature transactions rather than signing BTC transactions. This low-complexity design can hopefully improve the likelihood of timely checkpoint generation. Moreover, with Tendermint’s potential upgrade that supports signature customization, we could use the consensus to force the generation of the BLS signatures. This way, BLS multiSig checkpoint is guaranteed to be immediately available for every committed block. Such enforcement is unlikely to be possible if the checkpoints are generated on BTC. Indeed, when there is no Taproot checkpoint on BTC, one can hardly tell whether it is due to inactive validators or issues with BTC.</li><li>By decoupling the generation of the checkpoints from their submission to the parent chain (BTC), Babylon minimizes its dependency on the parent chain. The minimum dependency also allows Babylon to design contingency plans in case the parent chain encounters with issues or makes unfavourable upgrades.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c329154426a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/babylonlabs-io/checkpointing-babylon-to-btc-c329154426a8">Checkpointing Babylon to BTC</a> was originally published in <a href="https://medium.com/babylonlabs-io">BabylonLabs.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interchain Timestamping for Mesh Security]]></title>
            <link>https://medium.com/babylonlabs-io/interchain-timestamping-for-mesh-security-6121f1e422bf?source=rss-ba3c57f42454------2</link>
            <guid isPermaLink="false">https://medium.com/p/6121f1e422bf</guid>
            <category><![CDATA[cosmos-ecosystem]]></category>
            <category><![CDATA[interchain-security]]></category>
            <category><![CDATA[babylon-chain]]></category>
            <category><![CDATA[bitcoin-security]]></category>
            <category><![CDATA[cosmos]]></category>
            <dc:creator><![CDATA[Babylon Chain]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 23:55:38 GMT</pubDate>
            <atom:updated>2023-03-07T20:31:44.849Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>The Cosmos blockchain network has become widely recognized for its well-designed architecture, which enables sovereign blockchains to interact safely and efficiently with one another using the Inter-Blockchain Communication (IBC) protocol. However, a key limitation of this approach is that each individual blockchain, especially those that are new, may be relatively small and therefore have potential security limitations. This contrasts with for example Ethereum where there is only one single large blockchain providing security to all the projects built within it. Because of the interconnected nature of the Cosmos chains, insecurity of one chain will propagate to other chains, thus weakening the overall security of the ecosystem.</p><p>An analogy for this would be considering Ethereum as a 19th-century empire that provides protection to its inhabitants, in exchange for taxation (gas fees) and the forbiddance of sovereignty. Under this analogy, Cosmos would in turn be a network of present-day countries that may rule as they wish and collect their own taxes, but do not have the same level of security as that of a grand empire.</p><p>The formation of NATO has been one solution to this, whereby independent countries have formed a mutual defense alliance in the event of an attack on any individual member. Similarly, the idea of Mesh Security has been recently introduced, whereby different Cosmos chains share security with one another.</p><p>What is the mechanism by which security can be shared across blockchains? One method currently proposed is cross-staking: validators validate across multiple blockchains using the same stake. By sharing validators, honest behavior is incentivized which in turn increases security. This is because poor performance as a validator on any given blockchain would result in slashing not only on that blockchain but on others as well.</p><p>In this article, we will present an alternative and yet complementary approach to Mesh Security: <strong>interchain timestamping. </strong>This method shares security between blockchains with their entire validator sets, rather than between subsets of validators, thus further realizing the analogy of entire countries securing each other. This entails timestamping blocks on any given blockchain by posting their headers on another blockchain. This increases security significantly as the reordering of transactions on one blockchain now requires not only forking of that blockchain but also reordering the timestamps present on another blockchain.</p><p>In this paper, we will show that interchain timestamping is an effective method for sharing security while still maintaining the sovereignty of smaller blockchains. We will also show that it is readily available to be implemented, as IBC already provides such timestamps which can be utilized. Interchain timestamping is therefore a practical approach that supports the vision of Mesh Security. Outside of the Cosmos network, it can support other Proof-of-Stake blockchains that are IBC-compatible.</p><p>Let’s dive in!</p><p><strong>An Example of a Double-Spend Attack</strong></p><p>Consider that a malicious party (who we’ll call John) wishes to send 1M tokens from the fictional “Rugpull Chain” to Osmosis. John uses IBC, which works by locking up the 1M RUG tokens on the Rugpull Chain and minting the equivalent amount of RUG tokens on Osmosis. John then swaps the 1M RUG tokens on Osmosis for 10,000 OSMO tokens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/0*sn7iNxTZiiQEFCDF.png" /></figure><p>John sends 1M RUG tokens to Osmosis using IBC and swaps them for OSMO tokens.</p><p>Unfortunately, John is the Founder of Rugpull Chain and therefore has a very large amount of tokens staked. He creates an alternative past blockchain history (“fork”) of Rugpull Chain that states that he had never actually sent the 1M RUG tokens to Osmosis. Since he has a large number of tokens staked, he’ll likely be able to be chosen as a validator and in turn have this malicious fork approved. He’s now gotten the OSMO tokens without paying anything at all!</p><p>A fork is created, stating that he had never sent the RUG tokens to Osmosis.</p><p>The result is that John has signed both the original block as well as the new block that states he never sent the RUG tokens to Osmosis. This will be noticed by the network and he will be subject to a slashing penalty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/0*RyijN96756x7rTfp.png" /></figure><p>John is subject to a slashing penalty for double signing.</p><p>However, Rugpull’s total amount staked may be relatively low if it is a smaller blockchain, meaning that the slashing penalty may be outweighed by the amount of OSMO tokens gained. That means that additional security is required in order to increase the cost of corruption for blockchain systems.</p><p><strong>Interchain Timestamping Explained</strong></p><p>It turns out that it’s actually possible to prove that John had sent the 1M RUG tokens from Rugpull Chain to Osmosis, through what’s referred to as interchain timestamping. Rugpull Chain could timestamp their blocks by putting the block headers onto another larger chain, such as Osmosis itself. Therefore, when John creates a new fork that says he had never actually sent the RUG tokens to Osmosis, it would be disproven as the original transaction was timestamped</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/0*t9KKzDi6xTwkdpIA.png" /></figure><p>When John creates a new fork on Rugpull Chain to reverse the original transaction, it’s unsuccessful because a timestamp already proves that he had sent RUG tokens to Osmosis.</p><p>John originally was able to use his stake on Rugpull Chain to say that he hadn’t sent the RUG tokens. However, to reverse the timestamp that’s posted on Osmosis, he would need a large enough stake on Osmosis in order to reverse the timestamp there as well. Due to Osmosis (or whichever specific chain is chosen) being a much larger blockchain, the cost to fork it will be significantly higher than the cost to fork Rugpull Chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/0*lkBO1pbv8ofOC8wz.png" /></figure><p>John now needs to stake tokens on Osmosis as well in order to reverse the previously posted timestamp. This significantly increases the potential slashing penalty.</p><p><strong>How Cross Staking Protects Against this Attack</strong></p><p>We explained earlier that a proposed mechanism for Mesh Security is cross-staking, whereby validators validate across multiple blockchains using the same stake denominated in a native chain’s token. This results in slashing not only on the native chain, but on others as well. In the example above, a validator stakes their OSMO tokens on the native Osmosis chain, but can simultaneously cross-stake them on Rugpull. This increases the cost of attack for John, because he now has to acquire OSMO tokens in order to attack Rugpull, which would result in these tokens being slashed as well.</p><p><strong>Drawbacks of Cross-Staking</strong></p><p>However, cross-chain staking has several potential drawbacks.</p><ol><li>Larger blockchains may have validators that become prominent validators across multiple blockchains, thereby increasing validator centralization and reducing the sovereignty of smaller blockchains. This should be avoided, as decentralization and sovereignty are core to the Cosmos ecosystem. One potential method of mitigation is the limitation of validator voting power on any given blockchain (e.g. a cap of 10%). This, however, significantly reduces the benefits of shared security (See <a href="https://informal.systems/2022/11/04/replicated-vs-mesh-security/"><em>Replicated Security vs. Mesh Security</em></a> by Informal Systems for an analysis).</li><li>Even if a validator acts honestly on the native chain, it is possible that they can act maliciously on another chain that they are cross-staking on. Slashing on each of the chains provides some protection against this, but not all attacks are slashable, such as stalling attacks.</li><li>Cross-staking takes advantage of existing shared validator infrastructure where a validator company already stakes on multiple Cosmos chains (using the chains’ respective native tokens). Certain blockchains may not in fact share many common validators, rendering this approach less effective.</li></ol><p><strong>Interchain Timestamping vs. Cross-Staking</strong></p><p>Let us compare interchain timestamping with cross-staking with regard to the above drawbacks of cross-staking:</p><ol><li>In the interchain timestamping solution, the interchain timestamps are only used to resolve forks on Rugpull in case the Rugpull validators attack the Rugpull chain. If the Rugpull chain does not fork, then Osmosis validators cannot attack Rugpull. Thus, the sovereignty of Rugpull is preserved.</li><li>Osmosis validators can collude with Rugpull validators to attack the Rugpull chain under interchain timestamping. However, to do that, the Osmosis validators have to fork the Osmosis chain as well. Thus, Osmosis validators cannot act honestly on Osmosis while participating in an attack on Rugpull. Thus, interchain timestamping provides a stronger level of security via “fate coupling”.</li><li>Since the interchain timestamps are as secure as any other transactions on the Osmosis ledger, interchain timestamping automatically borrows the security of the entire Osmosis validator set, and not just a subset of the validators who choose to cross-stake.</li></ol><p>Cross-staking leverages existing Cosmos infrastructure in terms of shared validators across multiple Cosmos chains. It turns out that interchain timestamping can also leverage an existing infrastructure: IBC!</p><p><strong>Interchain Timestamping is already here</strong></p><p>IBC works by relying on light clients between blockchains. Light clients only store relevant parts of a blockchain, in contrast to a full Node which runs the entirety of the blockchain. Parties known as <em>relayers</em> pass on the IBC transactions from one blockchain to another, and rely on block headers and transaction proof in order to ensure authenticity.</p><p>What’s interesting to note is that this IBC process already automatically creates a timestamp that’s included in the block header, and this works for both intrachain and interchain transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/0*-xK7kV6es2TEOIkW.png" /></figure><p>The bottom line is that interchain timestamps already exist between any two chains which are connected through IBC. Using these timestamps to provide mesh security is a matter of adding the capability to the clients to utilize these timestamps.</p><p>Cross-staking is done by validators and they are incentivized to cross-stake across chains because they earn yields on both chains. Interchain timestamping is done effectively by IBC relayers so they should be appropriately incentivized. In fact, proper incentivization of IBC relayers, in general, is an important problem under active investigation in the Cosmos ecosystem. This additional role of IBC providing security via timestamping can provide additional incentives to maintain this important piece of infrastructure in Cosmos.</p><p><strong>BTC Timestamping: Protecting Against Unslashable Attacks</strong></p><p>In this article, we described <em>slashable attacks</em> and how to increase their costs via interchain timestamping on another Cosmos chain.. This is effective for short-range attacks whereby a small number of blocks of recency are targeted.</p><p><a href="https://blog.positive.com/rewriting-history-a-brief-introduction-to-long-range-attacks-54e473acdba9">Long-range attacks</a> on PoS blockchain systems should also be of concern. These can be done via a few different techniques, but the general principle is that a malicious party has removed their stake already (“unbonded”), making the attack <em>unslashable</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Oer9kCJtiNJc0aWF.png" /></figure><p>It turns out that this can also be solved through timestamping, albeit a different type. PoS network transactions can in fact be bundled together and timestamped to Bitcoin in intervals, preventing non-slashable long-range attacks. PoS blockchains are in effect inheriting Bitcoin’s Proof-of-Work security as any malicious party would now need to change the timestamp that was sent to the Bitcoin network by creating a new Bitcoin fork (hint: very hard to do).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/0*H-8kICwnNNYpKZBH" /></figure><p>Unslashable attacks (where the stake is unbonded) can be prevented by sending timestamps to Bitcoin. To alter this timestamp, one would have to create a longer BTC fork.</p><p>Bitcoin timestamping could also theoretically be used for increasing the economic security of short-range slashable attacks by requiring a Bitcoin timestamp before confirming all transactions. However, because of Bitcoin’s slow confirmation, this will add significant confirmation latency, as compared to interchain timestamping on another Cosmos chain. So a good combination is to use Bitcoin security to protect against long-range unslashable attacks, and use interchain timestamping on other Cosmos chains to increase the economic costs of short-range slashable attacks.</p><p>If you’d like to learn more about Bitcoin timestamping for PoS blockchains, please check out our blog post titled <a href="https://babylonchain.io/blogs/f/checkpointing-babylon-to-btc"><em>Checkpointing Babylon to BTC</em></a><em>.</em></p><p><strong>Conclusion</strong></p><p>In this article, we showed that <strong>interchain staking</strong> is a complementary alternative to Mesh Security that enables the sharing of security between blockchains while maintaining their sovereignty.</p><p>By timestamping transactions from any given blockchain to a larger chain, any potential attack would not only need to reorder transactions on the smaller chain, but would also need to reorder the timestamps on both blockchains. This significantly increases the cost of the attack and complements Mesh Security, as security is not solely shared between validators, but between the entire blockchains as well. Smaller blockchains in particular benefit from this.</p><p>It turns out that IBC already automatically creates timestamps, meaning that interchain timestamping is therefore readily available. It may also be used to support other Proof-of-Stake blockchains outside of the Cosmos network, assuming that they are IBC-compatible.</p><p>Proof-of-Stake blockchains must take utmost care in securing their networks and we recommend reviewing the above solutions and considering how they could support one’s own blockchain projects.</p><p>If you are interested in learning more about how Babylon security could be of help to your network, please feel free to <a href="https://babylonchain.io/contact">contact us</a> at any time and we’d be happy to talk.</p><p>Follow us on:</p><p><a href="https://twitter.com/babylon_chain">https://twitter.com/babylon_chain</a></p><p><a href="http://babylonchain.io/">Babylonchain.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6121f1e422bf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/babylonlabs-io/interchain-timestamping-for-mesh-security-6121f1e422bf">Interchain Timestamping for Mesh Security</a> was originally published in <a href="https://medium.com/babylonlabs-io">BabylonLabs.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>