3

I was looking into omni protocol and couldn't quite figure out some things. I'd really appreciate your opinions. I tried to look into all the bitcoin stachexchange answers, but nothing that much related to what I am asking.

At first, I thought that Omni was a whole new blockchain(they forked it from bitcoin), and then added some more code to implement contracts so that assets could be transferred.

At second, I read that omni does write data to bitcoin blockchain itself.

Question 1) why is not the omni a new blockchain at all if they forked it from bitcoin ? we can see that on github.

Question 2) let's assume, it's not a new blockchain - then this means that my second thought is correct. How does it write data to bitcoin blockchain ? I can think of one way: P2SH Scripts, but wanted to make sure.

Question 3) if the omni is not a new blockchain at all, then how does its explorer work ? I guess, their explorer fetches all their related P2SH Scripts from bitcoin itself . right ?

4

Question 1) why is not the omni a new blockchain at all if they forked it from bitcoin ? we can see that on github.

As Murch said, Omni uses Bitcoin as its immutable database. So Omni is like a separate blockchain, since the contents of Omni transactions embedded in the Bitcoin blockchain are not relevant to Bitcoin nodes. If there's an invalid Omni transaction, then BTC nodes would still accept it.

Omni doesn't have a directly-connecting peer-to-peer network. It relies on data pushes on Bitcoin.

Question 2) let's assume, it's not a new blockchain - then this means that my second thought is correct. How does it write data to bitcoin blockchain ? I can think of one way: P2SH Scripts, but wanted to make sure.

They could use P2SH - I have a website that uses P2SH to embed data in the blockchain, and it works perfectly. However, currently Omni uses bare OP_RETURN scripts. Most likely, they never thought about using P2SH when they first designed it so they might not afford a breaking change (for Omni, not for BTC) introducing P2SH data pushes. P2SH pushes - are actually currently more feasible.

Question 3) if the omni is not a new blockchain at all, then how does its explorer work ? I guess, their explorer fetches all their related P2SH Scripts from bitcoin itself . right ?

Omni has its own software - a fork of Bitcoin Core. They listen to the Bitcoin network and update their blockchain. If they pulled data from P2SH every time, that would be a waste of computing resources.

So every time a new Omni update on Bitcoin occurs, they update their blockchain, then use their blockchain as their data source.

15
  • 1
    @NikaKurashvili Your transaction doesn't go to omni nodes. Your transactions is processed by the Bitcoin network. Once it is included in a block, the omni nodes which receive the new block write the new transaction, if it's valid, to their database. This saves Omni from needing to have its own network miners.
    – MCCCS
    Jan 12 at 17:49
  • 1
    @NikaKurashvili No no, your wallet creates your Omni transaction and adds it to a your new Bitcoin transaction's OP_RETURN (those two transactions are constructed at the same time since the Bitcoin transaction too needs to follow the Omni specification). The Bitcoin nodes receive and Bitcoin miners accept your transaction. Every time a new block is accepted, Omni nodes, who connect to Bitcoin nodes, also receive the block and scan it for Omni transaction. Valid ones are added to their Omni blockchain.
    – MCCCS
    Jan 12 at 18:17
  • 1
    @NikaKurashvili Yes, exactly! It's Bitcoin's job to determine the accepted, immutable order of transactions. The rest is handled by Omni, which doesn't have a separate network but they just listen for new Bitcoin blocks. (So yes, 100% of what you said)
    – MCCCS
    Jan 12 at 18:22
  • 1
    Because Ethereum didn't exist when Omni was created.
    – MCCCS
    Jan 12 at 18:25
  • 1
    @NikaKurashvili 1 is correct, that's why Omni Core shows the Bitcoin balance as well. 2 because that's what the specification requires. (And the destination address is called the reference). 546 satoshis is used since it's the smallest amount while Bitcoin considers it to be a standard transaction and
    – MCCCS
    Jan 12 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.