Can someone explain how this person hacked bitcoin? I'm trying to fill a few gaps in my understanding how this transaction happened! 

It all started with this article

In short, some vigilante/miner was able to scoop up all of the BCH sitting in segwit addresses (namely, the ones for which the public keys were revealed by the owners spending BTC from the same addresses.

See this Transaction that was created, miner
Bitcoin Cash Block Explorer

Step by Step Breakdown


Miner scoops public key of this address 3P9dyU9ga3aJorHAUqKBFCX2NdyuHEVgx1
(this is a P2SH P2WPKH address see this bitcoin block explorer )

Question: what is that public key? Do you see any keys? 
("3" is a multisig address &amp; requires 3 addresses, so there must be 3 public keys, right?)
The article didn't explain how and what raw transaction he created using only public keys.
This is the most frustrating part. The article claims that miner created a segwit node and mined on top of that.

How is that even possible? (Bcash doesnt have segwit activated. However even if he mined using his segwit node, his node will not allow him to create a valid transaction because segwit requires a witness or sign with private key of public key of address 3P9dyU9ga3aJorHAUqKBFCX2NdyuHEVgx1.)




However, this article claims 


The miner just created a scriptsig (the article didn't explain what "apply a particular hash" means).
Now it's easy, the miner just has to assign a BCH output (address starting with 1)
it gets even more stupid. The article says after making that raw transaction he mined it ..... without broadcasting it. How does that work?

3.1 If you are not broadcasting it then whats the point? How will that transaction go through to the new address/wallet created by miner (in this case 1C4TafndKYFoGkeoHfQAWkZzEYLum31txf)?

3.2 If the miner is mining his own block and then not broadcasting it, wouldn't it get orphaned? So what is going on here?
Question: what is that public key? do you see any keys? ("3" is a multisig address &amp; requires 3 address? so there must be 3 public keys right?)


No. An address beginning with a 3 is a P2SH address. This does not mean it is a multisig address or requires any number of keys to sign the transaction. Rather it just means that there is some script (it can be any script, not necessarily a multisig script) that needs to be included in the input that spends the P2SH output. That script will dictate the other items in the input.

For a P2SH nested Segwit output (P2SH-P2WPKH and P2SH-P2WSH), the script that the address refers to (known as the redeem script) is of the form OP_0 &lt;20 byte hash&gt; or OP_0 &lt;32 byte hash&gt;. When a segwit node sees this script in an output or as a redeem script, it knows that it should look in the newly defined witness are of a transaction to get the rest of the data it needs to verify the transaction.

However for a non-segwit node, they will mark the transaction as valid (but not standard) because for a non-segwit node, those redeem scripts don't specify that a signature is needed. This makes these outputs anyone-can-spend to non-segwit nodes.

Since Bitcoin Cash does not implement segwit, all of their nodes are non-segwit nodes. Thus in order to spend from the P2SH nested segwit outputs, you only need to provide the redeem script. However the redeem scripts are protected by a hash; given only a P2SH output, you cannot figure out the redeem script unless you already know it. Redeem scripts are revealed when the output is spent from.

What the miner did here was that they found as many redeem scripts as they could. The redeem scripts of the P2SH outputs used were all redeem scripts that had been revealed on the Bitcoin network because they had been used as an input in a transaction. So the miner took all of those revealed redeem scripts and checked to see which ones had corresponding outputs on the Bitcoin Cash network. Those that did could then be spent by the miner as the miner then knew the redeem script.


  it gets even more stupid ????????????????????? Article says after making that raw transaction he mined it ..... without broadcasting it ?????? what


A transaction does not need to be broadcast before it is mined. A miner can include whatever transactions he wants, and that includes transactions not broadcast to the public. Once the block is mined, the transaction will then be broadcast with the block.