13 votes
Accepted

Bitcoin and Smart Contracts

Bitcoin has a scripting language built into it, which allows the creation of many kinds of smart contracts. Examples are atomic swaps, Lightning payment channels and zero-knowledge contingent payments ...
Andrew Poelstra's user avatar
7 votes
Accepted

Does bitcoin have the potential to be subject to a hard fork where miners are forced to choose which fork they will accept, like Etherum?

Yes, Bitcoin could also be subjected to a hardfork. In fact, there are members of the Bitcoin community that feel so strongly that the blocksize should be increased that they are proposing to do just ...
Murch's user avatar
  • 75.2k
7 votes

Why does every "defi" thing only support garbagecoins and never Bitcoin?

Bitcoin is pushing most use cases and applications to second layers (e.g Lightning, sidechains) because blockchains don't scale. Most "DeFi" apps use the blockchain for transactions, filling ...
Michael Folkson's user avatar
6 votes
Accepted

What are some interesting applications of Taproot "smart contracts"?

I think it's important to note first that BIP341-BIP342 are improvements to the Bitcoin script "framework" more than they are improvements to the smart contracting "functionality". ...
Pieter Wuille's user avatar
5 votes
Accepted

When does Ardor smart contracts come into effect and how does it work compared to Ethereum, EOS, and Lisk?

First off, Lisk doesn't have full turing-complete smart contracts so there isn't much of a comparison on that front. Key shortcomings of existing frameworks like Ethereum can be summarized by five ...
demetriuss's user avatar
4 votes
Accepted

How is a node selected to run Smart Contract in Ethereum

A node that runs a smart contract will be paid with GAS. This is incorrect. The miner who mines the block containing the transaction interacting with a contract is the one who is paid with ETH, which ...
Raghav Sood's user avatar
4 votes
Accepted

Do payment channels have an address? And where are their transactions actually being written to?

The payment channel between Alice and Bob is encoded as a 2-2 multisig Adress the balance of that Adress is the capacity of the channel. A channel is opened by sending funds to that multisig Adress ...
Rene Pickhardt's user avatar
4 votes

Is it cryptologically possible to create a smart contract which SAFELY gives me "altcoin interest" on my Bitcoins?

Lots of things called "decentralized" or "defi" are scams, and I vigorously encourage you to stay away from them. Some of them are real, or useful, and have varying degrees of ...
Pieter Wuille's user avatar
4 votes
Accepted

Can smart contracts be set up on a side chain or 2nd layer solution?

Yes. Given that many applications for smartcontracts would have vastly diverging blockspace and interaction frequency requirements from the payment usecase, segregating such usecases onto sidechains ...
Murch's user avatar
  • 75.2k
3 votes

Smart Contracts on Bitcoin's blockchain

I would like to explain a bit the smart contract situation in bitcoin, as a "smart contract platform" is not a fixed wording in bitcoin world. As such your question is not clear. Bitcoin already has ...
pebwindkraft's user avatar
  • 5,086
3 votes
Accepted

Token vs contract - are they the same?

On ethereum, all tokens are contracts, but not all contracts are tokens. ERC20 is a specific type of contract that is recognized by everyone to be a token contract. It has a base definition and ...
Raghav Sood's user avatar
3 votes

Purpose of token standard interfaces when implement smart contract

It's a standard. ALL those ERC20 based tokens have (at least) the same attribute names, the same method names. So I do automaticly know that I need to call the method "transfer" when I want to ...
hardfork's user avatar
  • 2,117
3 votes
Accepted

bitcoin smartcontract feature

there is no such improvement planned for the protocol, only the expected BIP are listed in https://github.com/bitcoin/bips/blob/master/README.mediawiki. but you should understand why in bitcoin only ...
Badr Bellaj's user avatar
  • 1,151
3 votes

What are some interesting applications of Taproot "smart contracts"?

Taproot would improve the privacy and fungibility of Bitcoin transactions. It seems Smart contract payments, Lightning payments, and sophisticated multi-signature smart contract payments all look the ...
Gokul Alex's user avatar
3 votes
Accepted

What will happen on creating a transaction with negative amount?

Every (full) node in the network verifies all rules. Negative transaction amounts are not valid. If a transaction would contain such a transfer, the transaction would be invalid and ignored by the ...
Pieter Wuille's user avatar
3 votes

Is it possible to build complex Apps with Bitcoin Script?

Bitcoin script is not a general purpose programming language like Java. far from it. It was explicitly made too simple to support general purpose programming. The operations that can be included are ...
RedGrittyBrick's user avatar
2 votes

Size of Blockchain for huge smart contracts database

Yes. But smart use of smart contacts means you don't need to put all the data on the blockchain. You can keep the actual data offline or only shared between actual participants. Lightning Network is ...
Jannes's user avatar
  • 6,344
2 votes

Issue transaction without being online

The blockchain does not contain yet-to-be-published transactions to publish them based on conditions. The blockchain is the structure that transactions are published to. There is no such thing as a "...
Jestin's user avatar
  • 8,812
2 votes

What is the status of smart contracts in bitcoin?

Are contracts described here already available for use? Yes. Some of them are admittedly kind of arbitrary. For example, you can trustlessly sell someone a solution to a Sudoku. What does that mean? ...
Nick ODell's user avatar
  • 29.4k
2 votes
Accepted

Are Ethereum Tokens issued in an ICO similar to stocks on a stock market?

Tokens, in general, are not the same as shares in that they do not provide ownership stake or voting rights in the corporation. Typically, they are simply vehicles with which to conduct transactions ...
Dr.Plastics's user avatar
2 votes

Conditional based Crypto based on Smart Contracts

Yes, but with some very strict limitations. You can store encrypted data in the block chain. This is expensive, hard, and strongly discouraged, but it is possible to place the encrypted data in ...
David A. Harding's user avatar
2 votes

How to store private data in blockchain and smart contract

If I've understood correctly, I don't think you need block-chain technology to achieve what you want. This is exactly what asymmetric public key encryption is designed for. A simply encrypts some ...
James Crosswell's user avatar
2 votes
Accepted

Ardor Lightweight Contracts: (Almost) trustless way with new Phased Transaction type?

One idea how to solve it works like this: The sender submits the contract trigger transaction as phased with a reveal secret approval model based on the hash of a secret it generates. The contract ...
lyaffe's user avatar
  • 1,495
2 votes

Simple, default, "hello world" smart contract for an auction? (winner wins, all the rest gets refunded)

If Bitcoin has smart contracts, I would like to see how to create a simple "hello world" auction - winner wins, those who didn't win get refunded. Your question isn't clear about the details of how ...
chytrik's user avatar
  • 18.3k
2 votes
Accepted

Decode script return different value from my relative timelock

decodescript has this behavior because integers in Bitcoin are little endian. So decodescript is telling you what number the script interpreter would use when it processes your script.
Ava Chow's user avatar
  • 70.4k
2 votes

can the buyers or sellers in smart contract be the miner also?

Can the buyers or sellers in the smart contracts be the miner also? Yes. Like someone be the player and also be the verifier? In Bitcoin, everyone verifies. All players are also verifiers. There ...
RedGrittyBrick's user avatar
2 votes

Bitcoin smart contract for wallet income distribution based on specific conditions?

I think this question is based on a false premise. The lightning network is not a platform for building novel smart contracts. It is a payment network built on top of the smart contract functionality ...
Pieter Wuille's user avatar
1 vote
Accepted

Could Taproot or Graftroot enable the execution of complex scripts?

First, how is the script structured in the tree? Does each path represent a different execution outcome? If so, how are the potential outcomes defined? The taproot email doesn't specify how the ...
David A. Harding's user avatar
1 vote
Accepted

Template of a DAO?

If are are asking about Ethereum's popular DAO concept, the Ethereum Foundation website has a tutorial on creating a simple DAO application on https://www.ethereum.org/dao. Hope this helps!
mango's user avatar
  • 351
1 vote

Aborting a three-way swap

a) If Bob aborts before step 2, then Alice will not reveal s. 6T will elapse and Alice will get her BTC back. If Bob aborts after step 2, then Alice will not reveal s, as she has no incentive to do so ...
dionyziz's user avatar
  • 1,012

Only top scored, non community-wiki answers of a minimum length are eligible