In the discussion about sidechains and L2s (see
this thread and
this thread) I got the following idea:
There are already working "L2s" or "sidechains" for Bitcoin. They use often a codebase with a turing complete smart contract language/virtual machine, compatible with Ethereum/EVM/Solidity. However, what I don't like, and what also reduces the acceptance by Bitcoin maximalists, is the premined token all these L2s use.
What if we build a similar model on an existing, reasonably decentralized altcoin chain like Litecoin or Dogecoin? There are also other possible alternatives among the few decentralized altcoins (for example, Dash, Ravencoin, Namecoin, Peercoin, Slimcoin, Gapcoin ...). The problem with smaller coins however is that they could be attacked easier. Monero wouldn't work because it doesn't allow scripting and we need at least a language like Bitcoin Script.
Bitcoin and Litecoin users could then transact
BTC on the Litecoin chain for a fee of 0.01 cent or so
OK, let's see the general concept:
Step 1:
An
auxiliary currency is started on the altcoin's (e.g. Litecoin's) chain, which allows transactions to contain turing-complete smart contracts. The currency is strictly distributed via 1:1 proof-of-burn minting, i.e. in the case of LTC you need to burn 1 LTC to get one of these auxiliary tokens. An example is the Counterparty EVM version which until now never left alpha state.
Step 2:
A smart contract is set up on LTC with this auxiliary currency, which manages a
dynamic federation (like on BEVM, Nomic or Stacks).
Basically, the smart contract creates incentives for a 2-way peg.
The system works the following way:
- On the Bitcoin chain, federation members create multisig addresses where users can send their BTC to.
- On the Litecoin chain, the federation members have to deposit a certain amount of the auxiliary currency as a security deposit.
- If 1 BTC is sent by an user (let's call her Alice) to one of the multisig addresses, the federation members create a proof for this on the LTC chain. If Alice sends 1 BTC address, and the federation has proven that, Alice is thus allowed to create a sBTC (sidechain Bitcoin) on the Litecoin chain.
- If the federation members don't create the proof immediately after Alice's BTC transaction has been confirmed, their security deposit will be slashed regularly for 10% (e.g.) until they create it.
- Alice can now transact her sBTC on the LTC network. After some payments, her sBTC are owned by Bob and Charlie.
- Bob needs mainchain BTC. So he burns the sBTC.
- The federation members vote now if his sBTC are legitimate - their ancestry needs to go back to Alice's BTC deposit.
- If 66% of the federation members vote positively, Bob gets BTC on the main chain. He pays a fee to the federation for the peg-out, incentiving the federation members to behave well.
- If any user sees a federation member misbehaves, e.g. voting for a peg-out of an illegitimate sBTC, or stealing BTC sent to the multisig address, he can submit a proof on the chain (like on an Optimistic Rollup). If the proof is correct, after it is confirmed with enough confirmations the federation member gets slashed his entire security deposit.
- The federation members change each X blocks. If a member don't want to participate anymore, it can leave the federation at any time. The security deposit however will only get unlocked if more time has passed and no user has submitted a proof that this member has not misbehaved.
Thoughts?
I purposefully started that thread in the altcoin forum as an experiment if technical discussion is still possible here (or again).
Constructive participants with any signature are welcome and good contributions will get merited.