It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
OP_ENDIF
And a valid loop is quite similar: OP_WHILE OP_ENDWHILE
QuoteSend 2 Bitcoins to each address which send 1 Bitcoin to my addressThis can be splitted into:
1. You send me 1 BTC.
2. I send you back 2 BTC.
Let's see, how it would look like, purely transaction-wise, without any Script:
Code:+--------------------------------+
| Alice 1.01 BTC -> Bob 1.00 BTC |
+--------------------------------+
+--------------------------------+
| Bob 1.00 BTC -> Alice 2.00 BTC |
| Bob 1.01 BTC |
+--------------------------------+In practice, it can be done today, if you know, how to use something more than SIGHASH_ALL. No Turing-completeness is needed. First, let's assume that Bob has some funds, which he wants to send to Alice. He can craft this transaction, signed with SIGHASH_ANYONECANPAY:
Code:+--------------------------------+
| Bob 1.00 BTC -> Alice 2.00 BTC |
+--------------------------------+Obviously, it has negative fee, equal to -1.00 BTC. It simply creates coins out of thin air. However, it is not fully signed. It has ANYONECANPAY flag, which means, that "anyone can pay", meaning that "anyone" can "add more coins as inputs". So, Bob provides his signature, and sends this transaction into Alice (without using P2P Bitcoin network, because it would reject this transaction, because of "negative fee").
Then, Alice can grab hex bytes of this transaction, and add her input:
Code:+--------------------------------+
| Bob 1.00 BTC -> Alice 2.00 BTC |
| Any 1.01 BTC |
+--------------------------------+As you can notice, it can be anything: sent into Bob, sent into Alice, just anything at all. It does not matter, because Alice will not receive her 2 BTC, if she will not attach her coins. In practice, the most convenient way is to attach original Alice's coins there, without sending them to Bob at all. In this way, everything can be compressed into a single transaction, and serve the same purpose ("sign my transaction, and I will give you my coins"). Because what Bob can achieve in this contract, is to have his own coins signed with Alice's signature (yes, she can also use different sighashes than SIGHASH_ALL, but it would be unsafe for her).
QuoteBounty 50 merits for whoever answers this correctly.I have enough merits, I am more interested in doing that in practice, for example in testnet3 or testnet4. So, do you want to receive some test coins for sending some? As you can see above, I need Alice's address as a destination.
Edit: I am ready, I got some coins from Garlo Nicon for this experiment:
https://mempool.space/testnet4/tx/45b74f6032d6f5869326a7c4bca54efd7f6248c0d9782599b969f4913ec97046#vout=0
https://mempool.space/testnet/tx/9f523a213550f813e049c0ef9489e2739eada990e2e37e17caeb1ae4527390cd#vout=0