Smart contracts on Bitcoin
avc.com
avc.com
Sure it's the largest, but it seems ETH2 might now be the most secure. It (at current prices) has $2,400,000,000 staked in the network. Sure this is still in the league of nation states to corrupt, but the penalties for breaking the rules are _so much higher_.
Given that, and the fact that Ethereum is based around smart contracts, I find it hard to believe that this could compete with ETH2.
[1] https://blog.blockstack.org/realizing-web-3-proof-of-transfe...
so it results in rich get richer
In PoW, the same 'rich get richer' applies - miners can buy more mining rigs and thus it compounds the same? miners invest heavily in constantly innovating and investing back into the network
In PoS, is this not exactly the same, if not even more true? Stakers are by definition highly invested into the network The whole system could collapse overnight like a domino if something goes wrong
Could you elaborate on this, why is this more likely in PoS over PoW?PoW had decreased decentralization substantially to only happen in regions where electricity is the cheapest. PoS at least prevents this problem.
In theory, if and when proof of mining actually becomes the mainstream vehicle for global financial transactions, simply buying more mining rigs won't be enough. They will need to institutionalize and reinvest heavily into their infra. The mining rig that could find ten blocks yesterday may only be able to find one block tomorrow if the competition becomes fierce. Since it's a permissionless system, if one miner starts doing it and makes a lot of money AND Bitcoin gets accepted as a legitimate payment network, other companies will enter the space and the competition will accelerate. That can't happen with PoS.
> miners invest heavily in constantly innovating and investing back into the network In PoS, is this not exactly the same, if not even more true? Stakers are by definition highly invested into the network
The difference is in continuous investment vs. one time investment. With proof of work (again, assuming when these models actually work as designed), you will need to invest more and more into the infrastructure as a miner to stay profitable. As a result the entire network becomes more and more secure. But with proof of stake, the stakers do not have incentive to compete in this manner. With proof of stake, you can literally throw around money to gain influence over a network. With Proof of Work that's not enough because you have to "keep investing", so you need actual commitment to the future. That's much stronger security than a network made up of people who only care about the present.
> PoW had decreased decentralization substantially to only happen in regions where electricity is the cheapest. PoS prevents this problem.
This is like saying "Riding car is dangerous because people can get hit by a car and die. Walking prevents this problem." There's always a solution for every problem. Even the decentralization. The only reason why that hasn't happened is because the Bitcoin network is not worth that much when it comes to its value as a payment system. That doesn't mean there is no solution. For example, using certain clever hashing algorithm, multiple miners can specialize and only do things that each location is optimized for. Mining doesn't just involve hashing. You can generate revenue through including more transactions in a block, for example.
But can't you do the same with PoW. You just throw money at minners and buy their rigs or rent them for a good premium.
Bitcoin needs a huge factory. ETH2 needs a billion dollars. I feel like a billion dollars could probably buy the factory you're talking about.
ETH2 also takes time to add new stakers to the network, but perhaps not as long as building the factory.
If you did this with BTC you'd cause a huge drop it the value of the network, and therefore your investment in miners
If you did this with ETH2 your investment would be destroyed by slashing, and the network might survive
... also keep in mind the Bitcoin factories already exist. You just need to buy one or two, or perhaps hack some of the mining pools.
I prefer the ETH2 semantics.
What you don't get is what comes after that.
In PoS, once you invest a billion dollars, you're set for life. In PoW, you invest a billion dollars but still have to keep investing more and more in order to survive. If you're complacent, a new upstart miner with innovative technology could swoop in one day with 10x more efficient mining method (it could take many forms, such as a closed source bitcoin node that does things much more efficiently yet still fully follows the Bitcoin protocol, or it could be a closed source hardware that they don't sell outside of their own mining operations, like Apple does with their own chips) This way the PoW network as a whole will keep evolving because of competition. In a PoS network there is no competition once you invest the billion dollars and it's a complacent network compared to a PoW network where everyone is constantly competing and comes and goes (those who can't keep up will get left out and leave). If you join a PoS network where someone has a huge stake collectively, you're basically joining a feudalist society where you're being ruled by a king. If you join a PoW network you're being ruled by entities that keep competing to show their competency. it's like the presidential election is going on for every block.
> The whole system could collapse overnight like a domino if something goes wrong
IMO, these two things are one of the main points of tension which PoS uses to operate. The stakers have put up a significant amount of value, and it's in their interest to maintain that value by preventing things from going wrong.
Not only that, but they are actively pitted against each other -- it's in their interest to find any node that tries to violate the rules, and submit an attestation slashing the offender's stake for bad behavior.
There are also a number of incentives (such as the upcoming EIP-1559 upgrade) which are designed to align incentives so that cartel members are encouraged to break away for their own advantage.
It's also in their interest to never sell anyone enough tokens that they could become rival stakers, which makes the system vulnerable to node or network failures. Fewer stakers means fewer nodes to disrupt to trigger consensus failure.
This is not the security model, this is the consensus model. It's based on probabilistic finality, meaning that the probability that a transaction won't be reversed increases as more blocks are added on top. One major advantage of PoS is that it has "Absolute Finality" - after a certain amount of blocks, it's absolutely impossible to do a 51% attack. (See https://medium.com/mechanism-labs/finality-in-blockchain-con...)
Note that a higher hashrate does not mean more secure, it's a common falsehood. The security of bitcoin depends on the percentage of miners that are honest - this is mentioned the bitcoin whitepaper. Fortunately, the incentives align for the majority of miners to stay honest, and this is what the whitepaper predicted.
Consensus is the process through which the network agrees on state. Examples are Nakamoto consensus (e.g. Bitcoin), BFT (e.g. Tendermind) or GRANDPA+BABE (Polkadot).
In addition, the Bitcoin proof of work is pretty much a proof of stake scheme in practice, where the stake are physical (specialized hardware and access to cheap electric power). So most of the GP's complaints about proof of stakes can be applied to bitcoin as well (“With proof of stake, the stakers only need to make an investment once in the beginning, so it results in rich get richer”).
And the biggest difference between BTC and ETH when it comes to “security” isn't “proof of work“ vs “proof of stake”, it's the fact that Vitali Buterin is alive and that there is an official centralized stewardship of ethereum, which in practice have led them to actually hard-fork the ethereum blockchain.
It's just like any other fiat, and of course for such applications PoW is irrelevant.
Scalability properties are also very different. Eth2 tried the concepts of sharding between <pick a number> chains. That has issues around added complexity between the shards and contracts needing to execute on shards where other data/logic they need is already available (so gravitational pull towards a mega shard). Stacks has no shards and scales horizontally. FWIW, Eth2 seems to be doing a slow move away from the sharding concept towards layer-2 like scalability as well. They disabled code execution for shards and using them more for data availability in latest iterations.
Sorry, I'm not familiar with any blockchain layer model. Do you have a reference to the model this "layer-2" comes from? Clearly we're not talking about the OSI network model.
(I would argue that the terms are imprecise though -- some protocols are described as operating "on top of Ethereum", but have their own consensus etc. which can function without Eth, so they could also be viewed as layer 1s with a bridge.)
Remember the DAO? Man was that funny. I'm still shocked that that wasn't the end of this whole Bitcoin fad.
Let's not let big numbers obscure the fact that the model is fundamentally broken. You could spend a quadrillion dollars building a cryptocurrency and I could still get a faster and more secure system for $50 on eBay.
For using Bitcoin state on Ethereum, you'll need to implement Bitcoin SPV proofs. It's entirely possible but fairly complicated to do that given (a) Ethereum is a separate network that can fork independently from Bitcoin (Clarity contracts on Stacks fork with Bitcoin), and (b) Eth miners have no native visibility into Bitcoin state (Stacks miners have full visibility into Bitcoin state). Possible but more complicated. Further, any asset generation and transfers etc on such ERC20 asset would have nothing to with Bitcoin vs on Stacks all asset generation and transfers etc settle on Bitcoin and are secured by the Bitcoin main blockchain.
The lessons we learned from that deployment for 2+ years is that (a) it doesn't scale that well and (b) it's very hard to modify Bitcoin and get new changes accepted (for good reason), so you end up with very limited scripting.
To fix the two limitations of Stacks 1.0, we worked on Stacks 2.0 which has a separate blockchain (so scalability independent of Bitcoin) where settlements still happen on Bitcoin and, more importantly, a full smart contract language without modifying Bitcoin itself: https://clarity-lang.org
Definitely not a fan how you're trying to bend reality for marketing benefits.
Everything in cryptocurrency is so obtuse and unapproachable for even otherwise-technical people, it’s pretty incredible given it’s been around over a decade now.
And isn't it a two-way pegged sidechain?
If you spent decades working on video game graphics, would it surprise you that someone describing algorithms for sophisticated quantitative finance or high frequency trading use terminology you're not familiar with, including an abundance of words literally borrowed from the Greek language?
Information technology is an absolutely massive field that is finding more and more use cases every year, it shouldn't be a surprise that there are areas of it that you're not familiar with and would need to devote a substantial amount of time to become well versed.
As someone who has spent a decent amount of time understanding cryptocurrencies, it's not really all that much different from learning any other field. You can start with some Youtube videos, read a few blog posts, heck you can even spend a couple of weekends writing your first smart contract and deploy it to Ethereum to see how it works. My first side project on Ethereum was writing a decentralized poker game, I wrote a series of smart contracts based on the theory of Mental Poker [1] and deployed it to the test net, and then wrote a web front end for it that waited for a new block to get published, parsed it and displayed it. It was pretty cool, once you deploy your smart contract to the blockchain, it's kind of magical seeing a completely decentralized system of computers bring that code to life. Like once you deploy your code, that's it, it's entirely out of your hands from that point forward and there's this engine that takes it and keeps it chugging literally for as long as there are miners willing to operate the Ethereum network.
Everything is a mystery until you take the time to learn it.
Anyway at the time they received a lot of pushback from some Bitcoin core devs and some threatened to block them over their use of OP_RETURN. Wonder how sustainable Stacks approach is in comparison? Don't know if it works the same way at all - but assuming they write some data to the BTC chain to ensure validity, etc.
You can read some of the drama here - https://www.reddit.com/r/btc/comments/80ycim/a_few_months_af...
I'm mainly curious if the BTC core devs still are apprehensive towards these Layer 2 projects. It is one of the reasons why I thought smart contracts on BTC were a dead end, and why I ultimately sold a bunch of BTC for ETH years ago.
This was the primary reason why for Stacks 2.0, a hard design requirement was to make absolutely no changes to Bitcoin and to not put additional data in Bitcoin.
With Stacks thousands of STX transactions result in a single hash on Bitcoin (technically on the order of active miners on Bitcoin), so Stacks transactions automatically settle on Bitcoin every block.
What happens when they write something the rest of the stacks network disagrees with?
Source: https://blog.blockstack.org/realizing-web-3-proof-of-transfe...
Edit: typo
https://old.reddit.com/r/decred/comments/6wxueo/your_best_pi...
TLDR: Smart contracts on BTC were intentionally strangled because it would necessitate bigger blocks.
At the same time, BTC core devs were gearing up to start their sad push in creating artificial scarcity on a perfectly functional blockchain by reneging on the agreement they made to increase the block size.
They traded their ideals to get rich and all that momentum was lost. Instead of peer to peer cash, we're all left with a thousand useless ponzi schemes and a handful of promising coins that can't work together to actually achieve Satoshi's goal.
(I think I looked it up the last time I saw this argument too.)
(I also can't easily find it for BSV, the search turned up too many articles about how they're increasing their block size to 2 GB.)
What point are you making?
I think the chain was already too big for casual users at that point!
I always thought the argument that full nodes should be inexpensive to operate made a lot of sense. But keeping blocks small would obviously lead (and clearly did) to transaction costs high enough to price out most people that actually want to use it.
Wait for the lightning network is an insulting reason to kill the p2p cash use case, which in my opinion is the only thing that makes the "store of value" use case work.
Smart contracts are neat. Bitcoin is neat. Smart contracts on Bitcoin could have been a thing, but now it's too late. There is almost zero intersection between BTC maximalists and people who think smart contracts on BTC are a good idea.
Oh, that was gmax's fault.
Did you get scammed?
Oh, that was blockstream's fault. If they'd just did X, then the scam wouldn't have happened in the first place.
Did your friend tell you something secretive that "only he knows" and it's "not public knowledge"?
Well obviously the core devs are behind it.
The absurdity is great when the altcoiners are staring at Bitcoin's behemoth economy with jealous eyes amplifying the narratives they sometimes even know are totally false.
More insidious of course are the lies that are false but simple, where the factually verifiable truth is directly contrary but complex, like the foolish lie about gmax stealing credit, or Vitalik asserting that he was planning Ethereum until the core devs blocked him.
It's easy for outsiders to be infected via their usual lines and information feeds. And, of course, Bitcoin has no marketing department, so obviously defence thereof is a long, painstaking process of careful dismantling and debunking over a long period of time.
Thankfully, the actually helpful, intelligent, and ultra-competent people that are the safest to align with are people on whom these kinds of lies are basically completely ineffectual, so we tend to win, in that respect, just by default.
Perhaps it is too late for replicating existing use cases. However, the general idea of running EVM-like smart contracts secured by Bitcoin PoW (e.g. merge mined sidechains) is still quite attractive
As such, you should know more than anyone how heated the OP_RETURN drama got, and how ANYONE using the BTC chain for anything other than moving money from point A to point B is a complete non-started and will be unanimously opposed by the core development team.
Core devs may not agree with what some users do with the system (current specs/features).. but as the Ethereum miners showed with increase in block size, core devs' philosophical objections may not matter in the end
1. Network effects already on Ethereum
2. Bitcoin block time too slow and block size too low
3. Counterparty uses Bitcoin as a data layer, but Bitcoin itself cannot recognize Counterparty transactions, so Bitcoin consensus does not secure Counterparty transactions.
See https://twitter.com/vitalikbuterin/status/929804867568373760
See https://twitter.com/notgrubles/status/1187470076833697794
source: https://www.coindesk.com/developers-battle-bitcoin-block-cha...
Here is the commit where it was raised from 40 to 80: https://github.com/bitcoin/bitcoin/pull/5286/commits/a930658...
If you believe if was ever lowered, show me the commit.
The Coindesk articles contains the phrase "OP_RETURN was originally meant to store 80 bytes of extra data in a bitcoin transaction". How do they know what it was originally meant to do? If it meant to do it, why wasn't it in the source?
The commit that is referenced by this comment is "script: reduce OP_RETURN standard relay bytes to 40" https://github.com/bitcoin/bitcoin/commit/8175c790eb
There you can see that it was originally 80 bytes.
I recognize the commit where the limit was lowered, though I don't believe it was actually released before being raised again.
I can see how smart contracts might be useful in contracts that involve other assets that are directly connected in the same decentralized context (i.e., other bitcoin transactions or blockchain entities).
However, for anything else in the real world, they always (from what I've seen) require an "oracle" of some kind. True, that can be based on a consensus algorithm involving multiple parties in the real world, but it always ends up requiring trust that those real-world entities are playing by the rules. If we're relying on the good faith of real-world entities, how is a smart contract any better than a legal contract (a human would have to step in as the arbiter in either case)?
Of course not, and when they screw up, we lean on a robust (yet imperfect) legal system to intervene.
One of the advertised features of smart contracts is a reduced dependency on trust, so if they don't actually have that advantage (at least in relation to real-life interactions), then it's hard to say they're any better than traditional legal contracts for those use cases.
I would guess that hiring a contract developer to create a water-tight contract the computer is capable of understanding would be much more expensive than a lawyer.
This is in a similar vein to the fact that it's more expensive to have programmers create a perfect NLP app to translate something than it is to just hire a translator. Translating english into other languages is not a solved problem. Whether that other language is french or a smart contract does'nt seem that material.
It does seem like it will be much cheaper to make contracts in bitcoin that don't require translating thousand-line-english-documents into a smart contract.
However, you can already do that without a lawyer. If me and you sign a paper saying it's a contract that "I will pay you $200 for an item delivered on date X/Y, and if you're late I pay $20 less per day it's late", that's already legal and enforceable without a lawyer.
Coding that same thing in bitcoin would be harder than writing it on a paper still I think.
Smart-contracts are computers trying to be human. Most contracts are flawed and only really matter when things go wrong. I'd rather that a human be there when things go wrong to understand the human intent behind the contract than have a computer which does not know the human intent, but is able to enforce the (likely flawed) computational representation of that intent.
In other words, standard contracts work just fine (without any lawyers involved) when everything goes to plan. It's the failure cases that matter, and it's not hard to imagine a compromised lock (or an entire company's locks if they're connected to the internet for access to the blockchain) that no longer respect the smart contract. So you're back to calling your lawyer to help sort out the mess.
The part they say quietly is that the ledger supersedes the law and legal framework, and that’s clearly not how governments and their legal frameworks work.
If you use a smart contract you don't need to maintain any sort of backend at all. Your infrastructure costs are basically zero because they're baked into the cost of using the contract, which is paid on every transaction. You also get interoperability for free without having to build out any sort of API layer.
Smart contracts are not the solution to all problems but I think they have some really interesting use cases.
I have heard several stories by now of renters being defrauded by fake landlords. A smart contract could actually help. Decentralized would mean everybody can check who owns a property, not just the owner of some obscure property database.
Isn't there a public ledger of property ownership? In any case, there could be.
In my country, merely transferring property rights costs a lot of money. I know a friend paid 20k just for officials to make the entry in their book.
Blockchain could easily replace that.
Or the "property officials" could have a key and people could verify with the smart contract that some transfer has been signed by the right key.
Your understanding of smart contracts is correct - whenever smart contracts deal with stuff in the physical world you need to have an oracle.
In my experience over past half decade, there's been a lot of misleading information spread by people about smart contracts with schemes like claim to be a good use for smart contracts that suffer from oracle problems. A lot of this has come from naive people that just didn't other stand, but some has been spread by people looking to make others part with their money.
The way I think about smart contracts, is that if you need to trust someone in the real-world, by default you probably don't want or need a smart contract.
That said, there are a subset of such instances where smart contracts that depend on trust in real world entities have proven to be very useful. Wrapped tokens and stablecoins are an example of this - Tether being the most famous.
They are just now disclosing their finances to the feds, you might want to change your sales pitch...
Technically that might be the case but in the real world you have network effects, inertia, and all kinds of other reason why it might be desirable to go in the other direction.
The ease has to be examined from the perspective of the system as a whole and not just the one component.
The Bitcoin Core project was hijacked and socially engineered away from the lead developers many years ago by Adam Back's Blockstream. Today it is a Ponzi scheme designed to push people onto their "second layer" solutions to "solve" the problems they themselves introduced.
[1] https://newrepublic.com/article/160905/tether-cryptocurrency...
[2] https://medium.com/@johnblocke/r-bitcoin-censorship-revisite...
https://medium.com/@johnblocke/a-brief-and-incomplete-histor...
No sane person would build on top of bitcoin or use anything built on top of bitcoin. It was taken over then redesigned to be a disaster and now it is.
Until more people understand the history of Bitcoin Core (BTC) they will continue to be confused about the high fees and slow confirmation times.
[1] https://medium.com/@johnblocke/r-bitcoin-censorship-revisite...
edit: looks like you are getting downvoted too for telling the truth about Bitcoin Core.
The system's design is well-documented via the SIP process. See https://github.com/stacksgov/sips (you'll want to read SIP-001 and SIP-007 in particular).
ETC exists, if you don’t like ETH go use ETC, the community voted with their wallets, ETH won, give it a bone already
Isn't this the exact problem? That the blockchain isn't actually immutable and community will step in to revert transactions?
If you want to move slow and never break things, choose ETC.
But if all we cared about is the "right" thing to be done at the end, why bother with smart contracts? Why not use the courts?
that sounds awfully like the justification for bank bailouts.
When Bitcoin was a little more than a year old, it reverted five hours of transactions after a bug exploit.
Both blockchains have matured since then and don't do that anymore. An Ethereum cofounder's company lost over $100M in ETH, and the community refused its requests to restore funds with a fork.
So no, not a problem unless you are a fundamentalist.
If there is a decision to be made between two specific blockchains, it is important to point out that one of them is not trustworthy.
Fundamentally blockchains are about consensus, they have a mechanism to obtain consensus programatically but this programatic consensus can always be overriden if the participants decided to run a different version of the software. To be noted that the guys "in power" are the miners, the developers can only put forward a new version of the rules but the miners decide what they want to run.
It's easier to build more complex things on top of simpler primitives than vice versa. So a simpler base layer (say TCP/IP for the internet) opens the doors to more complex things on top (say http or JavaScript).
You don't want a Solidity bug (and there are many) to mess with the supply or ownership of Bitcoin. The limited/simple scripting language is there for a reason. It's easy to add complexity and more functionality at Bitcoin base layer: the decision to not do it is the hard (but in my view the right) choice.
Don’t know about this
Don’t like the idea of any other distributed ledger attracting capital away from Bitcoin purchases
Don’t know the Ethereum platform is different than any other “altcoin”
Don’t like Ethereum based on valid or fictional criticism
Don’t like WBTC
Don’t like renBTC in its current state
Know about all of this, don't mind it, are not interested in complex transactions, are not interested in turning their bitcoin into an interest bearing asset
The growth to the 1% has been pretty good and fast! Billions of $ of BTC on this stuff over just the last two quarters. Isn’t that how every startup pitch starts? “If we just get 1% of this market ....”
renBTC is by Republic Protocol, through their main product RenVM. RenVM allows holders of the REN token to stake 100,000 REN to create a "Darknode", which process all the minting, burning and storage of assets that go between chains. renBTC is Bitcoin to erc20 Ethereum. There are various other assets the Darknode holders process and earn. The amount Darknode holders earn in dollars has been increasing around 20% per month. The issues with RenVM and renBTC is that is actually hasn't reached that state. The darknodes do earn, but the current state does not use the darknodes for the decentralized storage of assets, instead, the Ren team has 12 keys stored around the world and requires collusion between the people on the Ren team to compromise. Now, some people call this is criticism, but this is still better than exchange cold storage which people already trust with billions of dollars of assets. For example, Gemini Exchange (Winklevoss Twins) brag about how their cold storage is 3 keys stored around the globe. lol, only three. People's concern is that while in this current state, the Ren protocol's geographically distributed team can be compromised by a government. Doubtful because nobody in one country has all the keys, and they are quickly speeding towards upgrading away to putting all processing on the darknodes. Anyway, for earning fees as a darknode its current state is quite unique, for users it is a stopgap solution (and not unique enough for BTC on Ethereum) as their bridge simply has more assets and doesn't require KYC or impose any limitations. Both the current and future iteration is using MPC cryptography for security. And again, their team is part of the mastermind behind WBTC. Darknode holders evangelize renAssets and get them into various other DeFi projects, which causes more people to want to mint and burn RenAssets, mostly renBTC so they can earn interest on their bitcoin. As you can see by this thread, many times renBTC is not mentioned at all. But it is the second largest Bitcoin on Ethereum. RenVM is not limited to minting assets onto Ethereum, they have or will be rolling out bridges to other chains as well, to Darknode holders delight.
there are competitors to renBTC such as tBTC, which aims to chisel at just the trustless BTC hegemony and not much else. Its growing decently.
even the defi community will admit that 85%? of the "lending" that's taking place is to make crypto people more money lol
In other words, you are trusting the Stacks blockchain to custody your bitcoins, just like with TBTC or RENBTC or any of the other decentralized Bitcoin bridges.
From their site:
> Like Bitcoin, Stacks is a layer-1 blockchain. Proof of Transfer connects it to Bitcoin with a 1:1 block ratio.
Compare that to the time Binance lost $500M in BTC and contemplated doing a chain revert because it would be way cheaper than $500M but didn't because it would break the illusion that BTC tx are irreversible.
BTC tx are reversible, it's just going to become prohibitively expensive for almost anyone to do soon.
Bitcoin had a bug that was required an organized chain reorg back when it was early as well, but it's not regarded as fatal to putting trust in the chain now (search for "bitcoin value overflow bug", was kinda interesting)
More recently, Parity, one of the main developers of one the Ethereum clients, had millions locked up due to mistake in their smart contract code. They complained loudly, tried to get another roll back, and finally gave up... The overwhelming concensus was that Ethereum is no longer alpha grade, there will be no take backs ever again.
Thank you for the education on the bitcoin reorg, I didn't actually know that and agree that it's orthogonal to the trust narrative now.
My broad point was that the trust is not in the code, it's in the community and their policies.
I can heartily agree with that.
That's why I think having the "layer 0" social consensus of a network aim for maximum clarity, so participants have as few points where there's three potential for surprise disagreement later.
Ethereum is very strongly "no abnormal state changes" starting with the Parity issue. I think there have been a few more similar cases of contract bugs, some even involving client devs, and any suggestion of a new fork has met with strong opposition from all ends of the community.
Another thing I think is useful for a blockchain is to have multiple independent clients... It helps prevent devs from having outsize voice in discussion (though the users and the node runners are always the final vote).
I think working out the meta structure of how to work these social level contracts is definitely something the whole cryptocurrency industry needs to work on.
I looked over the Stacks site and didn't see a clear answer to this question.
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.
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?
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?
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...
Is this fine with p2sh?
[0]: https://althea.net/
https://www.coinspeaker.com/first-ilo-launches-avalanche/
I think we'll see many more of these in the future.
Do you want to be inspired and be part of that ecosystem, or do you want to drone on about how you could do any example use case some other irrelevant way that nobody can interact with
* privacy technology (tornado cash, AZTEC)
* DeFi (MakerDAO, Uniswap, Compound, Augur, etc)
Most of them are interoperable with each other instead of trying to be unique and original, which has sparked something analogous to the Industrial Revolution over the last year.
For anyone else passing by, on the technical side, this is because of the "composability" concept coming to fruition in early 2020, the idea that outputs from one team's smart contracts can be used as the inputs for a different team's smart contracts.
The market can bear committing states to the bitcoin blockchain, and there hasn't been a standardized way to do that. I would therefore call it smart contracts on bitcoin.
From day one Bitcoin was designed to have low or no fees, it is only because Blockstream was able to wrestle control of the GitHub repo and stop the block size increase arbitrarily that high fees exists.
Bitcoin Cash (BCH) long ago took over the "Bitcoin" project as designed by Satoshi Nakamoto and described in his White Paper. Bitcoin Core (BTC) is a broken system designed to enrich developers of "Second Layer" solutions like this.
BTC has failed completely as Peer-to-Peer Digital Cash and today is push only by charlatans and scammers.
Bitcoin SV (BSV) long ago took over the "Bitcoin" project as designed by Satoshi Nakamoto and described in his White Paper.
How are miners supposed to be compensated, given that the block reward halves every few years?
>because Blockstream was able to wrestle control of the GitHub repo
Can you rebut these counter-claims made by one of the Core devs? https://news.ycombinator.com/item?id=25566420
>is a broken system designed to enrich developers of "Second Layer" solutions like this.
How are those developers being enriched? Lightning is free and open source.
A solved problem by Satoshi. The block reward covers miners expenses for the next 100 years or so, THEN, once the block size is large enough and transactions are in the millions, a fee of a few cents per transaction replaces the block reward.
> Can you rebut these counter-claims made by one of the Core devs?
Yes, easily. This article [1] shows what I am saying, Core devs are funded by Blockstream. [2] Greg Maxwell (nullc) is, "a very dangerous individual whose [actions] speak for themselves". Just read about his past, he is a master social engineer and manipulator.
[1] https://www.theblockcrypto.com/linked/60250/bitcoin-developm...
[2] https://www.reddit.com/r/btc/comments/74se80/wikipedia_admin...
> How are those developers being enriched? Lightning is free and open source.
Lightning does not work. It is a centralized "solution" to a decentralized problem. Sure, anyone can make a central database, hold Bitcoin and trade them, that is just an exchange, that is what Lightning is. What Blockstream is selling is not Lightning, their product is called Liquid.
https://taaalk.co/t/bitcoin-maxima-other-crypto-things
Transactions need to be expensive, like the guy you were replying to said. It is beyond obvious.
Lol, I think we all just learned everything we need to know about your POV.
No, it does not. It becomes insignificant in just a few decades (getting 32x smaller every 20 years). So a constant backlog of high fee paying transaction is important to long term security [1].
You clearly didn't read the linked comment because the article doesn't have anything to do with the arguments presented.
>Lightning does not work. It is a centralized "solution" to a decentralized problem. Sure, anyone can make a central database, hold Bitcoin and trade them, that is just an exchange, that is what Lightning is.
How is lightning centralized? You can transact with anyone you want, and you maintain a "tab" with them, which can ultimately be settled up on the blockchain. You can also route payments to anyone else on the network.
>What Blockstream is selling is not Lightning, their product is called Liquid.
Okay, how are they monetizing it?
[1] https://docs.matic.network/docs/contribute/matic-architectur...
Clarity contracts have direct visibility into Bitcoin state and can write logic against that.
The only practical application I can think of is atomic swaps, which can be accomplished any number of other, easier ways.
Just asking because, again, the value proposition in practical terms is a little unclear to me.
This would be paired with a STX-collateralized service that would ultimately let you trade your xBTC back for BTC. The service would put STX up as collateral, which would be depleted if the service quality degrades. The Clarity contract for the collateral would track the service's xBTC to BTC transfers, and would allow the service to post the BTC transactions it sends as proof of good service quality (thereby staving off depletion).
Other ideas come to mind:
* Proof of (attempted) mining a STX block. A Blockstack app could use a Clarity contract to determine if a user was also a miner, and offer them in-app perks for helping to secure the network.
* Backwards-compatibility with BNS 1.0. Stacks 1.0 implemented a naming service (BNS) on Bitcoin, and Clarity's access to Bitcoin state can be leveraged to allow users to prove that they are OGs -- i.e. that they registered a BNS name before Stacks 2.0 went live (or did something specific with it, like updated it to have a particular owner or have a particular content hash).
* Proof of payment to a particular address. Many organizations, including open-source projects, take BTC for donations. A Clarity contract could be written to identify Stacks users who donated to a particular organization earlier.
* Proof of payment channel. You could demonstrate to a Clarity contract that you have opened a payment channel with a particular amount to a particular address, and post collateral that will be slashed if your payment channel closed before a particular Bitcoin block height.
Same can also be potentially done on Bitcoin (BTC) with BIP-Tapscript.
From their site:
> Like Bitcoin, Stacks is a layer-1 blockchain. Proof of Transfer connects it to Bitcoin with a 1:1 block ratio.
The full protocol description can be found in https://github.com/stacksgov/sips (see SIP-001 and SIP-007 in particular).
This uses StarkWare's new Turing Complete programming language for generating STARK proofs (which are succinct zero knowledge proofs that have a trustless setup).
Also, it could, in theory, be attached to Ethereum too, and probably more trivial to do. These networks come with their own security guarantees, trade-offs & governance pitfalls, but unfortunately do not mention these on their home page of their shiny professionally designed website.
I also don't see a future for these things on Bitcoin, because as soon as bitcoin block rewards diminish, the miners would need to be paid from transaction fees. However, for the miners to be profitable, the transaction fees would need to increase an order of a magnitude - making solutions such as these potentially expensive and infeasible.
There were a few projects like this in the past, one from memory was called Counterparty. Not sure what happened to that. I guess the 10 minute block times and high fees might have been the culprit.
Conclusion: Anybody promoting this is just trying to sell their bag of STX tokens.
Several Bitcoin mining pools tried to attack the network in the past, but the majority of their hashpower vanished and new hashpower appeared to protect the network.
The fact that Bitcoin was able to sustain security for 12 years makes it so valuable (especially because the incentive to take over is worth so much (market cap of $0.7T).
Ethereum's new PoS might be better in the future, however we are still many years away from properly verifing that. However I don't think it is possible to theoretically design a system that is secure and cheap to sustain at the same time. I believe security comes from expensivness (miners energy waste and slow transactions).
I had a feeling that this would be the actual shift in use of computing. Unlike the e-commerce, cloud .. which are structurally similar to the previous world.
I'm not preaching for blockchains, it was just a feeling that it could be an actual paradigm shift.
But I also believe we are very very early, and it will take maybe 30 years to develop to start massively transforming industries.
from the very few I know, I didn't see governance and law in blockchain projects. What I perceived is a never ending shared network of operations that can basically replace companies.
But yes, there are other ways it can be conceived, and yours seems valid.
What is the root of trust of Stacks? Does it have auto-update? If I take over your domain, can I take all Stacks?
How can I independently verify how many mainnet coins have been locked as Stacks? How do I run a testnet node?
This is all described in SIP-001 (https://github.com/stacksgov/sips/blob/main/sips/sip-001/sip...).
> How many nodes are there?
Here's a sample: http://seed-0.mainnet.stacks.co:20443/v2/neighbors
> What is the root of trust of Stacks? Does it have auto-update? If I take over your domain, can I take all Stacks?
Root of trust is the history of cryptographic sortitions in the Bitcoin chain (again, see SIP-001). The chain can soft-fork to upgrade -- a direct and desirable consequence of Clarity being a decidable programming language. If you want to attack the chain, you'll need to mine a longer Stacks chain (or attack Bitcoin).
> How can I independently verify how many mainnet coins have been locked as Stacks? How do I run a testnet node?
See docs.blockstack.org
I'll check it out and play around, will never say never. I'm just generally skeptical of sidechains because why can't Eth just be a sidechain to BTC, or various incarnations of the same end like atomic swaps, BTC collateralization, etc?
I stopped reading after that.
Only needing some "dumb" storage media to store your application data and "cloud" files unlocks suddenly a user-centric way for everyone to store data. It also unlocks real competition on the infrastructure layer.
You don't make your own generator and make your own power, -- you don't buy power from say Dell because it needs "Dell electricity". Data should be like this too, ability to be owned and controlled purely by the user (as in you have solar panels + battery) or what most people would do: delegate the work to a power provider.
Ofc not real competition in the "power provider" case since there's physical stuff happening, but for data storage (and batch/"offline" computation and event/webhook handling) a user will be able to set up their own raspberry pi or just use say Amazon to store the encrypted data. :)
I find it fits 100% in to the world I'd want to live in. ^_^
What's is the ballpark transaction cost?
Also, I was curious what made it difficult to have smart contracts in bitcoin in the first place? I wasn't quite sure why others were not simply having done smart contracts like ethereum and hope to be better educated the solution here. thanks!
Bitcoin has limited scripting language (Bitcoin script) for security reasons. Having a general smart contract language could open up a larger attack surface area for Bitcoin.
The transaction costs will be low initially as they're a function of network traffic. The main thing here is to decouple scaling of transaction (as miroblocks on Stacks chain) from the scalability of Bitcoin (and Bitcoin is hard/impossible to change).
Thank you very much for your deep, original, well thought-out and never-heard-before contribution to the conversation.
The crazy thing is: bitcoin was ethereum.
The community killed scripting because it was antithetical to the thing that makes money in BTC: trust. The constant flow of n00bs coming in who got their transactions reversed by OP codes and said "BUT I THOUGHT BITCOIN TRANSACTIONS WERE IRREVERSIBLE!!?!?!!?!?!1111" was eroding trust in the ecosystem.
Really, I think the beginning of bitcoin jumping the shark was Satoshi Dice: https://www.coindesk.com/company/satoshidice.
Anyways, Bitcoin off-chain scripting won't replace Eth anymore than any other off-chain scripting system will replace Eth. If this kills Eth it will be because people don't want on-chain scripting, not because people want off-chain scripting on bitcoin (ergo, the meta problem is that on-chain scripting doesn't scale in every sense of the word scale; fees, tx speed, finality, etc).
Caveat emptor: it's entirely possible this company could work or take off. In crypto, sometimes truth is stranger than fiction.
Edit: Just to be extra clear, the problems with ethereum, to me at least, aren't actually on-chain scaling; that feels solvable. What feels unsolvable to me is two things: 1) turing completeness and 2) compilation malleability (if the compiler/machine can change but the code can't, guess what, old code's behavior becomes less predictable over time... computing systems with longevity gain minimal entropy over time).
Edit 2: The only rational way I can make sense of turing completeness and compilation malleability as features is if the ecosystem is engineering ecological behavior in, that is to say: old programs should become less valuable unless they accurately predicted the future. Maybe that's rational?
I never heard of all of this having happened. To my knowledge Bitcoin's scripting language was not trimmed, it was in fact extended over the years by various BIPs [1].
What's your source for these statements?
Edit for detail: In 2010 the "worst bug in bitcoin's history" was discovered, which let anybody spend ANY output on the chain, due to an obscure feature of the bitcoin scripting system allowing the signature script to simply "return true" before the actual script is executed. This was when OP_RETURN's semantics were changed to unconditionally fail the script if ever encountered rather than the short-circuiting behavior implied by its name and present in early versions. A quick emergency audit was simultaneously done and ALL opcodes that were unused at the time and moderately complex to review were "disabled" as a precaution.
It's not clear that the developers understood at the time that they would not be able to re-enable those opcodes for existing scripts without a hard-fork. The distinguishing between soft-forks and hard-forks were still being worked out back then. So large parts of script were in fact removed, but it was done as part of an emergency bug-fix and the permanent disabling may not have even been intentional.
The disabled opcodes weren't really that important to smart contracts though, at least not without additional primitives that bitcoin never had. There are various proposals to add these features in to segwit script or the upcoming taproot extension.
But to clarify that one bit (I think?) they're talking about -- the code is OP_RETURN. Originally it could return larger amounts of arbitrary data, which was used to effectively store external data on-chain. It was later reduced down to only allow 40 bytes, which would be enough for a hash, but not enough to store larger amounts of state.
This was what Vitalik Buterin and others were using for things like scripting and colored coins, and Vitalik cited (concerns that devs were threatening to constrain it / remove it as a major reason he started Ethereum.
---
Vitalik about OP_RETURN (wish I had link w/ more context) - https://twitter.com/vitalikbuterin/status/929808394487320577
F.
https://standardcrypto.wordpress.com/2020/04/30/a16z-struggl...
Still have not seen a use case for crypto currencies that is honest, legal, and not a waste. A lot of naivety and scamming as far as I can tell.
I am completely stumped as to why anybody who has programmed a computer and experienced how hard it is to get them right would think smart contracts are a better idea than plain old legal ones.
I am not saying that the current arrangements around private property, money, law, and power are good. I just do not see crypto currencies disrupting them. Nor smart contracts.
So, why?
This is because HN is diverse, and it can have large factions boosting something while other large factions are negative on it.