MOONBIT doc
  • 🎯What is MOONBIT?
  • β›³Vision
  • Background
    • πŸ’‘Bitcoin Scaling Solutions
    • βš’οΈWhat is RGB?
    • πŸ› οΈWhat is RGB++?
  • About RGB++
    • βš–οΈRGB++ isomorphic bindings
    • βš™οΈBlockchain Enhanced Client-side Authentication
    • 🧲RGB++ Transaction Process
    • ⛓️Shared States and Masterless Contracts
  • Core Features
    • ✑️Simplified Issuance Process
    • πŸ•ŽFairness and Equal Opportunities
    • β™ŽSecure and Stable Infrastructure
  • Marketplace
    • πŸ’ΉFeature Introduction
    • πŸ“–Tutorial: How to Trade on Moonbit
  • Asset Categories
    • πŸͺ™RGBT
    • πŸ’°RGBN
    • πŸ’ΈSEAHOUSE
  • ☎️Contact US
Powered by GitBook
On this page
  1. About RGB++

Shared States and Masterless Contracts

A mediocre implementation of shared state.

Shared state has always been a challenge for UTXO systems, so here we discuss a mediocre implementation that does not take into account multiple people updating the shared state at the same time, and then move on to a solution that allows multiple people to manipulate the shared state at the same time, as would be the case in practice.

Consider the existence of a global state cell on the CKB that manages the state shared by multiple users. Typically, it could be a pledge contract for an algorithmic stablecoin, where users deposit volatile assets and receive a certificate of deposit. The global state is managed by a masterless contract, by which we mean that anyone can make changes to the state, subject to the constraints of the contract, without requiring the designated digital signature provider to do so. The implementation of a masterless contract is decisive for the decentralization and censorship resistance of the protocol.

A mediocre implementation in this context means that there is a risk that the Global-state cell is occupied by another user, so that CKB TX will not hold because the specified Global state utxo does not exist. The Bitcoin TX needs to be sent out and computed into the commitment before the CKB TX, and thus no subsequent validation is possible.

State Contention in Shared State and Solution

To solve the above problem, we introduce the Intent Cell as an intermediary. Users write deterministically the actions they wish to perform to the Intent Cell, which can interact with the global state cell through the collaboration of a third-party aggregator, batch-computing multiple parties’ intent and merging the results of the interaction into a standard shadow cell.

PreviousRGB++ Transaction ProcessNextSimplified Issuance Process

Last updated 1 year ago

⛓️