PROPOSAL: Smart Bitcoin Exchange (SBX) — A "Smart" Bailout Plan
Author(s): Shomari (nyusternie) • (join us)
Source: https://gitlab.com/bchplease/sbx/-/blob/master/PROPOSAL.md
Last updated: Thursday, July 7th 2022
↳ https://sbx.cash
Introducing a distributed Proof-of-Stake (dPOS) network of SmartBCH stakeholders tasked with effectively managing the SmartBCH bridge using a suite of trustless, Free and Open Source Software (FOSS) smart contracts. This Federation of XHedge Validators will voluntarily run the newly developed SBX Manager on their respective network of nodes, offering a wide selection of decentralized Bitcoin Cash & SmartBCH services, namely:
- Cross-chain coin transfers — eg. $BCH to $SBCH to $WETH to $WAVAX
- Cross-chain NFT minting & burning — eg. BAYC, CryptoPunks, Clementine's, etc.
- Gas Stations — ie. gas-free SEP-20 & SEP-721 (meta) transactions
- Price Oracles
- Token Mining
- and more...
A "Smart" Bailout Plan
↳ https://docs.sbx.cash/bailout
This is an emergency proposal to mint a NEW $SBX token to fully "socialize" the outstanding debt of the ~101K $BCH (valued at ~$10M) currently "locked" and made unavailable by the "original" SmartBCH Treasury's custodian.
$SBX (Bailout) holders will receive a share of ALL exchange fees (0.1%),
PAID OUT DAILY, until the (Bailout) contract expires.
SBX Featured Resource Links
↳ https://docs.sbx.cash (documentation)
↳ https://canvas.sbx.cash (lean canvas)
↳ https://plan.sbx.cash (business plan)
↳ https://flipstarter.sbx.cash (mvp + bootstrapping campaign)
↳ https://gitlab.com/bchplease/sbx (open-source code)
Disclaimer
This alpha project is very early in its lifecycle. It will evolve rapidly over the coming weeks and months. Until we achieve our first mature release, we are not committed to preserving backwards compatibility. Buttons may be moved or removed in future versions.
Please take note! — We wanted to get this software in your hands as quickly as possible, so it's releasing before it's "complete". Bug reports and feedback on future directions are appreciated and encouraged! That said, we have LOTS planned and many new features are on the way.

Introduction
THE PROBLEM
Since its inception, the trust & security of the SmartBCH sidechain has laid in the hands of a single, for-profit company. Not only does that violate the very fabric of a decentralized network, it diminishes the confidence of the Builders who need to invest their time, money and talent into this nascent network during its incubation period.
Did you know? — There are currently ~101K $BCH being held by the "original" custodian of the SmartBCH treasury. In simple terms, $10M would be the total "Bailout" required to restore the SmartBCH sidechain 100% back to whole.
THE SOLUTION
The SmartBCH developers have brilliantly (pun intended) built-in a trustless Proof-of-Stake network of XHedge Validators directly into the protocol. These Validators have the most incentive and technical capability of managing the responsibility of custody for the network's assets; until a permanent solution is ready to be deployed on Mainnet.
TL;DR — The goal of this initiative is to create a Federation of XHedge Validators (scalable to at least 100+ participating nodes) connected over a low-latency, decentralized, P2P communications network with the responsibility of managing the SmartBCH Cross-chain Asset Bridge.
This proposal aims to accomplish ALL of the following:
- Organize a working group of developers to build a Smart Bitcoin Exchange (SBX).
- Coordinate with active Validators to safely deploy the all-NEW SBX Manager.
- Coordinate with the current $SBCH Treasury custodian to safely transfer the "escrowed" $BCH into the Exchange's treasury.
- Work with current DEXs (and other service providers) to integrate with the new network for decentralized $BCH <=> $SBCH asset exchanges.

Smart Bitcoin Exchange (SBX)
!! WARNING !! WARNING !! WARNING !!
This project is still under active development and MUST be regarded as ALPHA software. It will evolve rapidly over the coming weeks and months. However, until we achieve our first "beta" release, we are not committed to preserving backwards compatibility. Buttons may be moved or removed in future versions.
!! USE AT YOUR OWN RISK !!
SmartBCH currently utilizes a network of Validators to vote on each block in the network. As this network of Validators currently holds 50% of the voting power (the other 50% is held by miners), they are the MOST incentivized and technically capable group to engage in this scheme.
A suite of smart contracts will be deployed to manage the Exchange:
↳ SHA_Matrix_Exchange.cash (CashScript)
↳ SHA_Matrix_Exchange.sol (Solidity)
↳ SHA_Matrix_Treasury.sol (Solidity)
↳ SHA_Matrix_Gov.sol (Solidity)
↳ SBX.sol (Solidity)
↳ Bailout.sol (Solidity)
Did you know? — The Bailout contract will be active during the daily ~$10M debt repayments. The contract will automatically expire after the full debt is repaid and/or ALL "escrowed" $BCH are released from the former SmartBCH Treasury custodian and deposited into the SBX Treasury.
SHA-Matrix Exchange ($BCH)
This is a CashScript contract to "lock" the $BCH that has been minted as $SBCH within the SmartBCH sidechain.
SHA-Matrix Exchange ($SBCH)
This is a Solidity contract that effectively manages the network of trustees overseeing the Exchange.
SHA-Matrix Treasury
This is a Solidity contract that serves as a Multi-tenant Secure Assets Vault for the Exchange's (Solidity) contracts. By separating the Treasury, it allows the Exchange's contracts to be upgraded with bug fixes and new features, while guaranteeing that assets ALWAYS remain SAFU!
SHA-Matrix Gov
[ see the documentation ]
$SBX
[ see the documentation ]
Bailout
This is a Solidity contract that manages the Treasury for the (Bailout) funds. This includes both the funds recovered from currently "locked" $BCH, plus the revenue generated from fees paid to the Exchange.
Did you know? — The Owner of each of these (Solidity) contracts will be a Covenant of the TOP 15 Validators (by rating). The Owner of the CashScript contract will be a Covenant of the TOP 9 Validators (by rating). Rankings are updated each epoch (2016 blocks).
Part I: Exchange Overview
The Smart Bitcoin Exchange (SBX) provides a (temporary) decentralized solution for the resposiblity of managing the sidechain's treasury. Eventaually, the SHA-Gate contract will be deployed to Mainnet and perform the task of bridging $BCH <=> $SBCH.
To establish trust in the network, participants will be limited to the active pool of XHedge Validators. These Validators possess the MOST incentive to secure the financial safety of the sidechain.
Treasury
The exchange's Treasury is a smart contract (SHA_Matrix_Treasury.sol) that manages vaults for ANY form of crypto asset:
- SEP-20
- SEP-721
- SEP-1155
- and more..
Validators
The active XHedge Validators provide the highest level of trust & security for the exchange.
Part II: SHA-Matrix
As an alternative to the SHA-Gate v2 contract provided from the SmartBCH team, the SHA-Matrix is a community-run network of "trusted" individuals & teams with the technical capabilities to manage the responsibilities of the Exchange.
Part III: Discussion of Exchange Design
The ideal goal of the SBX would be to serve as central Clearing House and a point of "trust" for the many independently run Services in the Bitcoin Cash and SmartBCH communities.
Communications
We propose that "on-chain" is always the preferred means of trustless & transparency. We propose an "on-chain" protocol to manage the transparent (at times encrypted) communications of the Validators participating in the exchange.
OrbitDB will also be used as a low-latency, peer-to-peer channel for specific tasks.
SBX Manager
A new Free and Open Source Software (FOSS) Manager will be developed to be run by the participating Validators.

Safety & Security
One of the main goals of the SHA-Matrix is to dramatically increase the number of participants involved in the protection of the SmartBCH sidechain.
Validators will be weighted and scored based on their:
- Number of votes
- Up-time reliability
- Peer ranking
Number of votes
This number will be retrieved from the XHedge contract.
Up-time reliability
Validators will be penalized during any server downtime.
Peer ranking
Validators will rank each other, based on "off-chain" assessments determined by each time. Low-ranked Validators will be subject to additional (authoritative) restrictions by the network.
Miner Participation
This exchange is based on Proof-of-Stake (POS) and therefore is independent of the Proof-of-Work (POW) network of miners currently securing Bitcoin Cash.
Exchange Integration
SmartBCH already has several mature Decentralized Exchanges (DEXs) running on Mainnet. We aim to work with their teams to offer "native" integration to the SBX, with the help of:
- REST-based API services
- Custom software implementations
- Governance planning & design
3rd-parties Using the Exchange
SBX is an open protocol that is available to be used by anyone without permission.
Fees
[ see the documentation ]
Free and Open Source Software (FOSS)
In the spirit of full transparency, it's critical that the source code protecting the network be available to anyone and everyone who partipates in the network.
License
MIT