Skip to content

Instantly share code, notes, and snippets.

@A60AB5450353F40E
Last active August 28, 2023 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A60AB5450353F40E/59eee82c5d6e3d989166bb8eaf7826e9 to your computer and use it in GitHub Desktop.
Save A60AB5450353F40E/59eee82c5d6e3d989166bb8eaf7826e9 to your computer and use it in GitHub Desktop.

Along these lines: CashTokens enables trustless proof-of-stake sidechains run by sets of cashtoken holders. Withdrawal transactions can be processed on an interval by a vote of token holders + "enforced vote secrecy" https://github.com/bitjson/cashtokens/blob/master/examples.md#sealed-voting

Works just as well for a prediction market as it could work for a trustless mixing service, effectively like http://Tornado.cash, but doesn't have to be written in a blockchain VM language, you can just write the thing in Rust or whatever (the only mainchain consensus code is some simple covenants + CashTokens)

So more plainly: you can launch Zcash/monero clones as proof-of-stake sidechains, and deposit/withdraw BCH whenever

(and atomic swaps work between the chains)

The gist is that we can do the same withdrawal process as Drivechain: https://github.com/bitcoin/bips/blob/master/bip-0300.mediawiki, but instead of having miners vote, the cashtoken holders vote. Vote coordination is discouraged by the sealed voting idea from Truthcoin (page 43) https://bitcoinhivemind.com/papers/truthcoin-whitepaper.pdf

So there are 3 types of assets: BCH, sidechain "shares" (cashtokens), and sidechained-BCH (BCH that is locked in the covenant and currently being used on the sidechain). More info: https://drivechain.info/literature/index.html

An unlimited number of such sidechains can be created, they just need to grow a large enough shareholder base that a single person controls no more than 50% of the token. E.g. even if group of fraudsters owns >50% it's still secure because one of the groups members can profitably double-cross it. All that matters is determining whether a single rational actor has a majority stake. (Page 25 here https://bitcoinhivemind.com/papers/truthcoin-whitepaper.pdf)

-- Jason Dreyzehner on Telegram

PoW version:

I think we could use our Script + CashTokens to implement BIP300-like hashrate escrow, too.

Hashrate would opt in by using a simple one-time vote covenant (OTVC) address that requires bridge DAO input as sibling.

Bridge DAO could then burn and tally these one-time vote covenants and accumulate them in NFT's commitment. By "unpacking" the TXID of the vote covenant's input, the DAO can verify the vote is indeed coming from a coinbase TX, and extract the height from the input to verify belongs in the voting window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment