News for hackers. Stuff that matters.
Re:Smart contracts on Bitcoin by DennisP on Thursday January 14, 2021 @03:58PM (#25782396)
Moving bitcoins to Stacks is easy, since Stacks reads the Bitcoin chain. But how do you move them from Stacks back to the Bitcoin main chain? Since Bitcoin clients aren't aware of Stacks, it's difficult to see how that would work without trusting someone to issue the correct transaction.

I looked over the Stacks site and didn't see a clear answer to this question.

Re:Smart contracts on Bitcoin by muneeb on Thursday January 14, 2021 @04:07PM (#25782541)
Muneeb here, Stacks co-founder. Great question. You are right that Clarity smart contracts have direct visibility into Bitcoin, so you can write a contract that has logic triggered by pure Bitcoin transactions.

Moving Bitcoin to Stacks is a bit more complicated and there are several ways:

a) Wrapped assets. Tokensoft + Anchorage (custodian) have a solution that they're calling xBTC where a "wrapped Bitcoin" is issued on the Stacks chain. Such wrapped assets exist on other chains like Ethereum as well with one main difference that xBTC is secured by Bitcoin itself.

b) There are more decentralized solutions similar to Keep network, where threshold signatures can be used to move the assets by a group of nodes.

c) The most decentralized way of doing this is by locking your BTC directly on BTC chain, using Clarity to monitor funds, and then having Clarity trigger release of funds on Bitcoin chain. This requires Clarity logic to trigger Bitcoin state changes. This is theoretically possible but at R&D stage currently.

Re:Smart contracts on Bitcoin by iso8859-1 on Thursday January 14, 2021 @05:08PM (#25783391)
Bitcoin to Stacks is supposed to be the easy part...

The question was about how you move Stacks to Bitcoin.

I take from this handwaving answer that it isn't actually possible.

Or let's rephrase the question in Bitcoin terms: While the BTC are locked up on the Bitcoin blockchain, which key is necessary to unlock them? Surely one controlled by Blockstack, no?

Re:Smart contracts on Bitcoin by jude- on Thursday January 14, 2021 @09:12PM (#25786110)
You'd need a STX-collateralized relay service that would trade your xBTC for real BTC. The collateral would be burnt over time if the service misbehaved, such as by not doing outstanding trades in a timely manner. The collateral itself would live in a Clarity contact so it could validate proofs that the service sent BTC to xBTC sellers.
Re:Smart contracts on Bitcoin by lacker on Thursday January 14, 2021 @04:41PM (#25783014)
There sure is a lot of different stuff named "xBTC"....
Re:Smart contracts on Bitcoin by everfree on Thursday January 14, 2021 @07:58PM (#25785495)
Thanks for joining this thread.

What exactly do you mean by "xBTC is secured by Bitcoin itself?"

Do you mean that Stacks writes out its own block hashes to the Bitcoin blockchain, or something?

Re:Smart contracts on Bitcoin by jude- on Friday January 15, 2021 @12:37PM (#25793543)
> Do you mean that Stacks writes out its own block hashes to the Bitcoin blockchain, or something?

Yes; the entire history of attempts of mining Stacks blocks, as well as the entire history cryptographic sortitions that select Stacks blocks (including forks), is written to the Bitcoin chain. See SIP-001 for details: https://github.com/stacksgov/sips/blob/main/sips/sip-001/sip...

Re:Smart contracts on Bitcoin by hanniabu on Friday January 15, 2021 @01:37AM (#25787739)
> c)

Is this fine with p2sh?

Re:Smart contracts on Bitcoin by lifty on Thursday January 14, 2021 @04:07PM (#25782552)
You have to trust the Stacks blockchain to be able to send the money back to Bitcoin.