Interactions between Bitcoin and Alts

Constantly, the experts talk about correlation between the assets. In addition, at least within Ethereum, there exists synthetic assets that model other assets such as Bitcoin, called WBTC. On a completely separate note, there are alto “cross-chain bridges” that allow one to move assets between the two chains. I did love that he started off the lecture by stating “All the altcoins and Bitcoin, in a sense, compete with each other”. After spending any amount of time on reddit or cryptotwitter, at least the participants see the rivalry.

What this lecture covers:

  • Mining attacks
  • Merge Mining
  • Atomic Cross Chain Swaps
mine-2269513_1280
mining

Mining Attacks

The first topic was mining attacks. The implication was that a larger miner or mining pool in a large network can destroy a small altcoin that used the same hashing puzzle. The lecturer then brings up examples where it occurred in 2012 and 2013. Interestingly, searching “mining attacks” into Google didn’t shows this type of mining attack. Instead it brought up web mining where public machines are hijacked into mining for a coin for another malicious actor. Additionally, there are records where attacks due to holes in container configurations on cloud infrastructure have been perpetrated.

Narrowing the search to find out about CoiledCoin had me stumble on 51% attacks instead. This seems to be what the lecturer was talking about. The actual attack meant that a mining entity on Bitcoin could direct their resources to another altcoin that used the same mining puzzle. This entity would then mine blocks that end up disrupting the network such as mining blocks that reversed (thereby unwinding history) and mining empty blocks. This was so disruptive that users of the network went elsewhere and the altcoin ceased to exist. 51% attacks are not just in the past, a fairly modern one was against ETC. This article from Coindesk dials more into it. In Jan 2019, Chinese blockchain security firm SlowMist and American company Coinbase detected at 51% attack. Coinbase ended up halting all ETC trades for some time in addition to alerting the ETC moderators. Additionally CZ, from Binance, suggested launching such an attack to re-org Bitcoin in May 2019 as stated in the Coindesk article. I suppose it’s less of an attack and more of a suggestion on how to fix the 7,000 BTC that were stolen. As quickly as this topic was discussed, the lecturer jumped to merge mining

Merge Mining

I described earlier a bit about merge mining.  Simple idea is that a miner could mine two coins at the same time without decreased efficiency where one coin is a major coin like Bitcoin while the other would be an altcoin. This is one way to mitigate the bootstrapping problem by not forcing a miner to choose which coin to support. Thus every puzzle attempt for Bitcoin can also be a puzzle attempt for the altcoin as well. The altcoin effectively uses the Coinbase ScriptSig in Bitcoin header to host the altcoin merkl root. Because this tag is ignored by Bitcoin, anything can be reasonably filled there. This mechanism can hopefully work for other coins and chains. It’s not all rainbows and unicorns though with merge mining for these altcoins. While it’s easy to get adoption you run the risk for 51% attacks like CoiledCoin as well as miners could just not validate transactions. From there we jump to a topical topic, cross chain atomic swaps.

Cross chain atomic swaps

This topic seems hard and yet it’s not too bad. As mentioned different cryptocurrencies are sometimes on different networks as well as different blockchains. Thus, the state of blockchains and balances aren’t necessarily well known easily. Prior to oracles (ways to get real world information onto a blockchain) on Ethereum, it wasn’t easy to correctly know the price of USD and even now some of those oracles are only updated per hour. Wouldn’t it be cool if there was an algorithm/process that facilitated moving or trading coins between chains?

Without this technology, you could think about a central exchange. How do they do this? If two people were trading one for Bitcoin and the other for ethereum, the central exchange may just give each party an IOU, temporary agreement to pay you back. The reason this works is that users have already deposited their funds to the exchange and thus they expect the exchange to correctly move the funds on its own internal ledger and settle it correctly. Cross atomic swaps lets you do it a bit more trustlessly.

Thus, you want a paradigm where the transaction succeeds or fails but in no way should any party lose their coins. This is also known as atomic. As an example, let’s say Adam has 1 BTC and Betsy has 2 LTC and they decide to trade regardless of price issues. If Adam were to send one BTC to Betsy, it’s possible that Betsy can just run away and not pay Adam back or vice versa. That would not be good.

Welcome the Tier Nolan protocol which is what the lecturer is describing. This solution involves cryptographic commitments and time-locked deposits. The link I just put is to Bitcoin Talk. It always surprises me the depth of information found there. Interestingly the lecturer also makes an appears as socrates1024.

  1. Alice generates a secret x, and the hash of x (hashx).
  2. Alice then creates a pair of transactions, DepositA and RefundA
    1. The first is called a “DepositA” which does not get published yet. This transactions deposits her Bitcoin so that the Bitcoin can be spent in 1 of 2 ways.
      1. If Bob takes it, Bob must publish the secret value x. This is the way to protocol will happen if the protocol completes.
      2. The second way requires a signature from both Alice and Bob. Alice generates the deposit transaction but she keeps it unpublished. She then generates that other called RefundA.
    2. This second one is called RefundA which she has to get Bob’s signature on it. Once Bob signs RefundA, she publishes DepositA but doesn’t publish RefundA. It is timelocked to some time in the future known as T+2.
  3. Bob similarly creates a pair of transaction, DepositB and RefundB.
    1. DepositB does not get published but it can be spent in 1 of 2 ways.
      1. Alice can claim the Bitcoin at T+1, which reveals X to Bob
      2. Bob can get his Bitcoin refund at T + 2.
    2. He creates RefundB and gets Alice’s signature on it
    3. Once Alice sign’s RefundB, he publishes DepositB but doesn’t publish RefundB. It it timelocked to T+1.

So it’s like a well synchronized dance between two parties. The names of each of the transactions aptly indicate what they do. The Deposit transactions are internally locking the respective funds until a certain time. I wrote this out such that Alice claims Bob’s coins at T + 1 and Bob claims Alice’s tokens at T + 2. If Alice didn’t claim Bob’s coins at T+ 1 then essentially the transaction is rolled back. This is where that Refund transaction comes into play. Bob can reclaim his tokens at T + 1 and then Alice can claim her tokens at T + 2.

CrossAtomic

 

As of 2015, the lecturer that this has not been seen in the wild. he brings up good points that it is a bit complex as well as slow. One has to wait for the block times per chain. Additionally, denial of service is an unfortunately repercussion, since while atomic, there may be extra transaction fees and loss of time. Fast forward to 2020, things have changed. I’ll list some of the projects pushing and implementing the change, maybe I can go into some of them later.

    1. Polkadot
    2. JellySwap
    3. Many centralized exchanges got into this via creating their own chains that still need to interact with main cryptocurrency chain, ex Binance

 

PHP Code Snippets Powered By : XYZScripts.com