Bitcoin's Mathematical Problem Programster's Blog

If mining for bitcoins is about solving math problems/hashes why are miners focusing so much on graphics cards rather than CPUs?

submitted by Lvl1NPC to NoStupidQuestions [link] [comments]

What is Bitcoin Mining? (The Math Problem Behind Mining)

What is Bitcoin Mining? (The Math Problem Behind Mining) submitted by WebSwiftSEO to CryptocurrencyVideos [link] [comments]

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/vM6Z1z3M4i

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/vM6Z1z3M4i submitted by -en- to newsbotbot [link] [comments]

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/0JiBP7Gj5n

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/0JiBP7Gj5n submitted by -en- to newsbotbot [link] [comments]

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/cp5Qn14k4t

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/cp5Qn14k4t submitted by -en- to newsbotbot [link] [comments]

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/jg1jqWArv5

@WIRED: The first step to solving bitcoin's electricity-guzzling problem is understanding the math behind the mining https://t.co/jg1jqWArv5 submitted by -en- to newsbotbot [link] [comments]

Does Bitcoin mining do useful math problems, or is it just intentionally difficult problems?

Seems like all that computational power could be useful for some high end academic math stuff... If not that is like the most wasteful thing ever
submitted by Oooopss to Bitcoin [link] [comments]

Genesis Mining math problem ? /r/Bitcoin

Genesis Mining math problem ? /Bitcoin submitted by BitcoinAllBot to BitcoinAll [link] [comments]

The largest supercomputer network in the world (by far) is solely used to mine bitcoin, which means its solving arbitrary, artificial math problems. Why can't we make the arbitrary "problems" its solving something actually useful to humans?

submitted by SnideOctopus to AskReddit [link] [comments]

Since bitcoin mining is based on solving math problems, and numbers go on to infinity, can an infinite number of bitcoins be produced (theoretically)?

I was reading about mining in an ELI5 thread and this occurred to me
submitted by Commietory to Bitcoin [link] [comments]

Theoretical math problem: When will BCASH mine all blocks since they used their EDA? /r/Bitcoin

Theoretical math problem: When will BCASH mine all blocks since they used their EDA? /Bitcoin submitted by BitcoinAllBot to BitcoinAll [link] [comments]

ELI5: So what are the "super difficult math problems" that computers have to solve to mine bitcoin like?

submitted by mine-mine- to explainlikeimfive [link] [comments]

That explains it

That explains it submitted by MattloKei to suspiciouslyspecific [link] [comments]

Technical: Taproot: Why Activate?

This is a follow-up on https://old.reddit.com/Bitcoin/comments/hqzp14/technical_the_path_to_taproot_activation/
Taproot! Everybody wants it!! But... you might ask yourself: sure, everybody else wants it, but why would I, sovereign Bitcoin HODLer, want it? Surely I can be better than everybody else because I swapped XXX fiat for Bitcoin unlike all those nocoiners?
And it is important for you to know the reasons why you, o sovereign Bitcoiner, would want Taproot activated. After all, your nodes (or the nodes your wallets use, which if you are SPV, you hopefully can pester to your wallet vendoimplementor about) need to be upgraded in order for Taproot activation to actually succeed instead of becoming a hot sticky mess.
First, let's consider some principles of Bitcoin.
I'm sure most of us here would agree that the above are very important principles of Bitcoin and that these are principles we would not be willing to remove. If anything, we would want those principles strengthened (especially the last one, financial privacy, which current Bitcoin is only sporadically strong with: you can get privacy, it just requires effort to do so).
So, how does Taproot affect those principles?

Taproot and Your /Coins

Most HODLers probably HODL their coins in singlesig addresses. Sadly, switching to Taproot would do very little for you (it gives a mild discount at spend time, at the cost of a mild increase in fee at receive time (paid by whoever sends to you, so if it's a self-send from a P2PKH or bech32 address, you pay for this); mostly a wash).
(technical details: a Taproot output is 1 version byte + 32 byte public key, while a P2WPKH (bech32 singlesig) output is 1 version byte + 20 byte public key hash, so the Taproot output spends 12 bytes more; spending from a P2WPKH requires revealing a 32-byte public key later, which is not needed with Taproot, and Taproot signatures are about 9 bytes smaller than P2WPKH signatures, but the 32 bytes plus 9 bytes is divided by 4 because of the witness discount, so it saves about 11 bytes; mostly a wash, it increases blockweight by about 1 virtual byte, 4 weight for each Taproot-output-input, compared to P2WPKH-output-input).
However, as your HODLings grow in value, you might start wondering if multisignature k-of-n setups might be better for the security of your savings. And it is in multisignature that Taproot starts to give benefits!
Taproot switches to using Schnorr signing scheme. Schnorr makes key aggregation -- constructing a single public key from multiple public keys -- almost as trivial as adding numbers together. "Almost" because it involves some fairly advanced math instead of simple boring number adding, but hey when was the last time you added up your grocery list prices by hand huh?
With current P2SH and P2WSH multisignature schemes, if you have a 2-of-3 setup, then to spend, you need to provide two different signatures from two different public keys. With Taproot, you can create, using special moon math, a single public key that represents your 2-of-3 setup. Then you just put two of your devices together, have them communicate to each other (this can be done airgapped, in theory, by sending QR codes: the software to do this is not even being built yet, but that's because Taproot hasn't activated yet!), and they will make a single signature to authorize any spend from your 2-of-3 address. That's 73 witness bytes -- 18.25 virtual bytes -- of signatures you save!
And if you decide that your current setup with 1-of-1 P2PKH / P2WPKH addresses is just fine as-is: well, that's the whole point of a softfork: backwards-compatibility; you can receive from Taproot users just fine, and once your wallet is updated for Taproot-sending support, you can send to Taproot users just fine as well!
(P2WPKH and P2WSH -- SegWit v0 -- addresses start with bc1q; Taproot -- SegWit v1 --- addresses start with bc1p, in case you wanted to know the difference; in bech32 q is 0, p is 1)
Now how about HODLers who keep all, or some, of their coins on custodial services? Well, any custodial service worth its salt would be doing at least 2-of-3, or probably something even bigger, like 11-of-15. So your custodial service, if it switched to using Taproot internally, could save a lot more (imagine an 11-of-15 getting reduced from 11 signatures to just 1!), which --- we can only hope! --- should translate to lower fees and better customer service from your custodial service!
So I think we can say, very accurately, that the Bitcoin principle --- that YOU are in control of your money --- can only be helped by Taproot (if you are doing multisignature), and, because P2PKH and P2WPKH remain validly-usable addresses in a Taproot future, will not be harmed by Taproot. Its benefit to this principle might be small (it mostly only benefits multisignature users) but since it has no drawbacks with this (i.e. singlesig users can continue to use P2WPKH and P2PKH still) this is still a nice, tidy win!
(even singlesig users get a minor benefit, in that multisig users will now reduce their blockchain space footprint, so that fees can be kept low for everybody; so for example even if you have your single set of private keys engraved on titanium plates sealed in an airtight box stored in a safe buried in a desert protected by angry nomads riding giant sandworms because you're the frickin' Kwisatz Haderach, you still gain some benefit from Taproot)
And here's the important part: if P2PKH/P2WPKH is working perfectly fine with you and you decide to never use Taproot yourself, Taproot will not affect you detrimentally. First do no harm!

Taproot and Your Contracts

No one is an island, no one lives alone. Give and you shall receive. You know: by trading with other people, you can gain expertise in some obscure little necessity of the world (and greatly increase your productivity in that little field), and then trade the products of your expertise for necessities other people have created, all of you thereby gaining gains from trade.
So, contracts, which are basically enforceable agreements that facilitate trading with people who you do not personally know and therefore might not trust.
Let's start with a simple example. You want to buy some gewgaws from somebody. But you don't know them personally. The seller wants the money, you want their gewgaws, but because of the lack of trust (you don't know them!! what if they're scammers??) neither of you can benefit from gains from trade.
However, suppose both of you know of some entity that both of you trust. That entity can act as a trusted escrow. The entity provides you security: this enables the trade, allowing both of you to get gains from trade.
In Bitcoin-land, this can be implemented as a 2-of-3 multisignature. The three signatories in the multisgnature would be you, the gewgaw seller, and the escrow. You put the payment for the gewgaws into this 2-of-3 multisignature address.
Now, suppose it turns out neither of you are scammers (whaaaat!). You receive the gewgaws just fine and you're willing to pay up for them. Then you and the gewgaw seller just sign a transaction --- you and the gewgaw seller are 2, sufficient to trigger the 2-of-3 --- that spends from the 2-of-3 address to a singlesig the gewgaw seller wants (or whatever address the gewgaw seller wants).
But suppose some problem arises. The seller gave you gawgews instead of gewgaws. Or you decided to keep the gewgaws but not sign the transaction to release the funds to the seller. In either case, the escrow is notified, and if it can sign with you to refund the funds back to you (if the seller was a scammer) or it can sign with the seller to forward the funds to the seller (if you were a scammer).
Taproot helps with this: like mentioned above, it allows multisignature setups to produce only one signature, reducing blockchain space usage, and thus making contracts --- which require multiple people, by definition, you don't make contracts with yourself --- is made cheaper (which we hope enables more of these setups to happen for more gains from trade for everyone, also, moon and lambos).
(technology-wise, it's easier to make an n-of-n than a k-of-n, making a k-of-n would require a complex setup involving a long ritual with many communication rounds between the n participants, but an n-of-n can be done trivially with some moon math. You can, however, make what is effectively a 2-of-3 by using a three-branch SCRIPT: either 2-of-2 of you and seller, OR 2-of-2 of you and escrow, OR 2-of-2 of escrow and seller. Fortunately, Taproot adds a facility to embed a SCRIPT inside a public key, so you can have a 2-of-2 Taprooted address (between you and seller) with a SCRIPT branch that can instead be spent with 2-of-2 (you + escrow) OR 2-of-2 (seller + escrow), which implements the three-branched SCRIPT above. If neither of you are scammers (hopefully the common case) then you both sign using your keys and never have to contact the escrow, since you are just using the escrow public key without coordinating with them (because n-of-n is trivial but k-of-n requires setup with communication rounds), so in the "best case" where both of you are honest traders, you also get a privacy boost, in that the escrow never learns you have been trading on gewgaws, I mean ewww, gawgews are much better than gewgaws and therefore I now judge you for being a gewgaw enthusiast, you filthy gewgawer).

Taproot and Your Contracts, Part 2: Cryptographic Boogaloo

Now suppose you want to buy some data instead of things. For example, maybe you have some closed-source software in trial mode installed, and want to pay the developer for the full version. You want to pay for an activation code.
This can be done, today, by using an HTLC. The developer tells you the hash of the activation code. You pay to an HTLC, paying out to the developer if it reveals the preimage (the activation code), or refunding the money back to you after a pre-agreed timeout. If the developer claims the funds, it has to reveal the preimage, which is the activation code, and you can now activate your software. If the developer does not claim the funds by the timeout, you get refunded.
And you can do that, with HTLCs, today.
Of course, HTLCs do have problems:
Fortunately, with Schnorr (which is enabled by Taproot), we can now use the Scriptless Script constuction by Andrew Poelstra. This Scriptless Script allows a new construction, the PTLC or Pointlocked Timelocked Contract. Instead of hashes and preimages, just replace "hash" with "point" and "preimage" with "scalar".
Or as you might know them: "point" is really "public key" and "scalar" is really a "private key". What a PTLC does is that, given a particular public key, the pointlocked branch can be spent only if the spender reveals the private key of the given public key to you.
Another nice thing with PTLCs is that they are deniable. What appears onchain is just a single 2-of-2 signature between you and the developemanufacturer. It's like a magic trick. This signature has no special watermarks, it's a perfectly normal signature (the pledge). However, from this signature, plus some datta given to you by the developemanufacturer (known as the adaptor signature) you can derive the private key of a particular public key you both agree on (the turn). Anyone scraping the blockchain will just see signatures that look just like every other signature, and as long as nobody manages to hack you and get a copy of the adaptor signature or the private key, they cannot get the private key behind the public key (point) that the pointlocked branch needs (the prestige).
(Just to be clear, the public key you are getting the private key from, is distinct from the public key that the developemanufacturer will use for its funds. The activation key is different from the developer's onchain Bitcoin key, and it is the activation key whose private key you will be learning, not the developer's/manufacturer's onchain Bitcoin key).
So:
Taproot lets PTLCs exist onchain because they enable Schnorr, which is a requirement of PTLCs / Scriptless Script.
(technology-wise, take note that Scriptless Script works only for the "pointlocked" branch of the contract; you need normal Script, or a pre-signed nLockTimed transaction, for the "timelocked" branch. Since Taproot can embed a script, you can have the Taproot pubkey be a 2-of-2 to implement the Scriptless Script "pointlocked" branch, then have a hidden script that lets you recover the funds with an OP_CHECKLOCKTIMEVERIFY after the timeout if the seller does not claim the funds.)

Quantum Quibbles!

Now if you were really paying attention, you might have noticed this parenthetical:
(technical details: a Taproot output is 1 version byte + 32 byte public key, while a P2WPKH (bech32 singlesig) output is 1 version byte + 20 byte public key hash...)
So wait, Taproot uses raw 32-byte public keys, and not public key hashes? Isn't that more quantum-vulnerable??
Well, in theory yes. In practice, they probably are not.
It's not that hashes can be broken by quantum computes --- they're still not. Instead, you have to look at how you spend from a P2WPKH/P2PKH pay-to-public-key-hash.
When you spend from a P2PKH / P2WPKH, you have to reveal the public key. Then Bitcoin hashes it and checks if this matches with the public-key-hash, and only then actually validates the signature for that public key.
So an unconfirmed transaction, floating in the mempools of nodes globally, will show, in plain sight for everyone to see, your public key.
(public keys should be public, that's why they're called public keys, LOL)
And if quantum computers are fast enough to be of concern, then they are probably fast enough that, in the several minutes to several hours from broadcast to confirmation, they have already cracked the public key that is openly broadcast with your transaction. The owner of the quantum computer can now replace your unconfirmed transaction with one that pays the funds to itself. Even if you did not opt-in RBF, miners are still incentivized to support RBF on RBF-disabled transactions.
So the extra hash is not as significant a protection against quantum computers as you might think. Instead, the extra hash-and-compare needed is just extra validation effort.
Further, if you have ever, in the past, spent from the address, then there exists already a transaction indelibly stored on the blockchain, openly displaying the public key from which quantum computers can derive the private key. So those are still vulnerable to quantum computers.
For the most part, the cryptographers behind Taproot (and Bitcoin Core) are of the opinion that quantum computers capable of cracking Bitcoin pubkeys are unlikely to appear within a decade or two.
So:
For now, the homomorphic and linear properties of elliptic curve cryptography provide a lot of benefits --- particularly the linearity property is what enables Scriptless Script and simple multisignature (i.e. multisignatures that are just 1 signature onchain). So it might be a good idea to take advantage of them now while we are still fairly safe against quantum computers. It seems likely that quantum-safe signature schemes are nonlinear (thus losing these advantages).

Summary

I Wanna Be The Taprooter!

So, do you want to help activate Taproot? Here's what you, mister sovereign Bitcoin HODLer, can do!

But I Hate Taproot!!

That's fine!

Discussions About Taproot Activation

submitted by almkglor to Bitcoin [link] [comments]

My college essay on Bitcoin and computers. First Draft. Thought you all might like this.

I always thought computers were simple. At their fundamental level, they are just 1s and 0s. An invisible dance of yes’s and no’s running through a sheet of silicon at billions of times per second. Computers are amazing and unique machines that will forever be apart of our lives. Our sheer dependence on computers motivated me to research the topic? As my understanding of this concept grew, so did my curiosity. I started researching computers as much as I could. I would spend hours a day browsing Youtube and reading articles just to satisfy my interest. That’s why when my dad first brought up the topic of bitcoin during my freshman year, I wasn’t surprised to hear his enthusiasm. I had learned much about this currency over my couple years of research, but I knew very little about how to actually make money off it. He had been tracking the price for a few months and was considering buying a few, just to see what would happen. Little did either of us know; the price of this virtual coin would multiply nearly 30 times in just a few short months.
A few weeks passed and eventually he brought up the topic of buying bitcoin again. His initial interest inspired me to look more into currency and how it worked. I told my dad there was another way to make money off of bitcoins: Bitcoin miners. These impressive and powerful computers are precisely optimized to earn these coins, and I knew I could make one. I explained how this was my once in a lifetime opportunity, like how he explained to me that he missed out on investing in Apple in the 80s. “It could be a money-printing machine,” I joked. With our excitement peaked, we decided to split the $2,000 investment 50/50, and I started the buying process.
I started the process by buying the parts of the machine. I had learned that like Legos, a computer consists of simple components to make the whole. However, unlike an ordinary everyday computer, ours would have a concentrated task. Mining bitcoin is not a complicated process for a computer to do. In essence, by completing simple math problems as quickly as possible, a computer process’ bitcoin transactions from around the world and is rewarded in a tiny fraction of a coin. As more and more transactions take place, the higher the demand for processing, and the higher the reward.
I was lucky enough to know how to build the computer. However, what I was not prepared for was the constant troubleshooting and maintenance I would have to give to this project. Sometimes the computer would simply turn off randomly, sometimes a part was not detected, and other times it merely just ran at half its optimized rate. I learned how to fix issues where there was no logical reason for the problem. Like a calculator, I always thought a computer could never mess up. My hundreds of hours of troubleshooting and blind hope quickly changed my view. I put a vast amount of free time into the project, knowing that potential it had. After lots of hard work, long nights, and determination, I had finally completed my dream project.
I was proud of what I had created. The computer was placed in my room and was like a pet. The loud but rhythmic fans helped me fall asleep, and the heat kept me warm during the winter. From school, I would monitor the machine, and if it had run into an error, I would simply restart it from my phone. My plan was working, and in a little over half a year, our investment should turn into profit. In only a few months, we were already halfway to making our money back. We were lucky because the price of bitcoin itself had doubled since we started, going from nearly $10,000 to $20,000 in a few short months, but as I looked at my account, I had no bitcoin. A few days earlier, hackers had stolen $64 million dollars from the company I mined with.
I felt like a victim. I had done everything right. I built the computer perfectly, I managed everything, I put the time in, and I put the effort in. I was robbed, and I was discouraged. Forced with no other option, we restarted our operation. Bitcoin was still increasing in price, we thought, so there was no reason to stop now. Our operation had restarted and was going well, but for the first time since we started, the price of bitcoin was not doing so well. The bubble was about to burst. It began with my hack, which made national news and hurt the price. Although the price recovered in a few weeks, it was going down again, fast. Believing it would improve, my dad and I decided to hold and not sell. A month later, Bitcoin was back to $8,000 per coin. The fad was over, and we couldn’t even make a profit over our cost of electricity. Again, I was robbed. I did nothing wrong and still lost almost everything. I decided to put the computer in a box and wait a few months; however, the wait was worthless. The coin plateaued at about $10,000, and it simply was not sustainable to continue mining. A year later, we sold the computers for parts and managed to make back about half our initial investment. It was over.
I had lost over $1,000 and months of time and effort. However, as I moved on and started to reflect on the experience, I was the winner. I learned so much about computers and how they operate. In the end, I had learned many skills, from patience and compassion to planning and researching. I had learned not only to build a computer but to manage systems and multitask. I learned countless lessons and gained essential and unique skills that I hope will carry me throughout life. This unique experience has taught me to always keep trying at what I believe in. There’s always an award for doing whatever I think is right. I hope to bring these beliefs and lessons with me throughout life, as I learn and grow from what I was taught. Whenever people ask me what computers are, I always laugh and explain how a computer is just a bunch of simple lego bricks working together to do complicated tasks. However, inside I still have trouble answering this simple question. It is merely just parts working together, but a computer is so much more complicated and beautiful than that. Honestly, I still don’t understand them.
submitted by NetgearX6S4000 to Bitcoin [link] [comments]

Don't blindly follow a narrative, its bad for you and its bad for crypto in general

I mostly lurk around here but I see a pattern repeating over and over again here and in multiple communities so I have to post. I'm just posting this here because I appreciate the fact that this sub is a place of free speech and maybe something productive can come out from this post, while bitcoin is just fucking censorship, memes and moon/lambo posts. If you don't agree, write in the comments why, instead of downvoting. You don't have to upvote either, but when you downvote you are killing the opportunity to have discussion. If you downvote or comment that I'm wrong without providing any counterpoints you are no better than the BTC maxis you despise.
In various communities I see a narrative being used to bring people in and making them follow something without thinking for themselves. In crypto I see this mostly in BTC vs BCH tribalistic arguments:
- BTC community: "Everything that is not BTC is shitcoin." or more recently as stated by adam on twitter, "Everything that is not BTC is a ponzi scheme, even ETH.", "what is ETH supply?", and even that they are doing this for "altruistic" reasons, to "protect" the newcomers. Very convenient for them that they are protecting the newcomers by having them buy their bags
- BCH community: "BTC maxis are dumb", "just increase block size and you will have truly p2p electronic cash", "It is just that simple, there are no trade offs", "if you don't agree with me you are a BTC maxi", "BCH is satoshi's vision for p2p electronic cash"
It is not exclusive to crypto but also politics, and you see this over and over again on twitter and on reddit.
My point is, that narratives are created so people don't have to think, they just choose a narrative that is easy to follow and makes sense for them, and stick with it. And people keep repeating these narratives to bring other people in, maybe by ignorance, because they truly believe it without questioning, or maybe by self interest, because they want to shill you their bags.
Because this is BCH community, and because bitcoin is censored, so I can't post there about the problems in the BTC narrative (some of which are IMO correctly identified by BCH community), I will stick with the narrative I see in the BCH community.
The culprit of this post was firstly this post by user u/scotty321 "The BTC Paradox: “A 1 MB blocksize enables poor people to run their own node!” “Okay, then what?” “Poor people won’t be able to use the network!”". You will see many posts of this kind being made by u/Egon_1 also. Then you have also this comment in that thread by u/fuck_____________1 saying that people that want to run their own nodes are retarded and that there is no reason to want to do that. "Just trust block explorer websites". And the post and comment were highly upvoted. Really? You really think that there is no problem in having just a few nodes on the network? And that the only thing that secures the network are miners?
As stated by user u/co1nsurf3r in that thread:
While I don't think that everybody needs to run a node, a full node does publish blocks it considers valid to other nodes. This does not amount to much if you only consider a single node in the network, but many "honest" full nodes in the network will reduce the probability of a valid block being withheld from the network by a collusion of "hostile" node operators.
But surely this will not get attention here, and will be downvoted by those people that promote the narrative that there is no trade off in increasing the blocksize and the people that don't see it are retarded or are btc maxis.
The only narrative I stick to and have been for many years now is that cryptocurrency takes power from the government and gives power to the individual, so you are not restricted to your economy as you can participate in the global economy. There is also the narrative of banking the bankless, which I hope will come true, but it is not a use case we are seeing right now.
Some people would argue that removing power from gov's is a bad thing, but you can't deny the fact that gov's can't control crypto (at least we would want them not to).
But, if you really want the individuals to remain in control of their money and transact with anyone in the world, the network needs to be very resistant to any kind of attacks. How can you have p2p electronic cash if your network just has a handful couple of nodes and the chinese gov can locate them and just block communication to them? I'm not saying that this is BCH case, I'm just refuting the fact that there is no value in running your own node. If you are relying on block explorers, the gov can just block the communication to the block explorer websites. Then what? Who will you trust to get chain information? The nodes needs to be decentralized so if you take one node down, many more can appear so it is hard to censor and you don't have few points of failure.
Right now BTC is focusing on that use case of being difficult to censor. But with that comes the problem that is very expensive to transact on the network, which breaks the purpose of anyone being able to participate. Obviously I do think that is also a major problem, and lightning network is awful right now and probably still years away of being usable, if it ever will. The best solution is up for debate, but thinking that you just have to increase the blocksize and there is no trade off is just naive or misleading. BCH is doing a good thing in trying to come with a solution that is inclusive and promotes cheap and fast transactions, but also don't forget centralization is a major concern and nothing to just shrug off.
Saying that "a 1 MB blocksize enables poor people to run their own" and that because of that "Poor people won’t be able to use the network" is a misrepresentation designed to promote a narrative. Because 1MB is not to allow "poor" people to run their node, it is to facilitate as many people to run a node to promote decentralization and avoid censorship.
Also an elephant in the room that you will not see being discussed in either BTC or BCH communities is that mining pools are heavily centralized. And I'm not talking about miners being mostly in china, but also that big pools control a lot of hashing power both in BTC and BCH, and that is terrible for the purpose of crypto.
Other projects are trying to solve that. Will they be successful? I don't know, I hope so, because I don't buy into any narrative. There are many challenges and I want to see crypto succeed as a whole. As always guys, DYOR and always question if you are not blindly following a narrative. I'm sure I will be called BTC maxi but maybe some people will find value in this. Don't trust guys that are always posting silly "gocha's" against the other "tribe".
EDIT: User u/ShadowOfHarbringer has pointed me to some threads that this has been discussed in the past and I will just put my take on them here for visibility, as I will be using this thread as a reference in future discussions I engage:
When there was only 2 nodes in the network, adding a third node increased redundancy and resiliency of the network as a whole in a significant way. When there is thousands of nodes in the network, adding yet another node only marginally increase the redundancy and resiliency of the network. So the question then becomes a matter of personal judgement of how much that added redundancy and resiliency is worth. For the absolutist, it is absolutely worth it and everyone on this planet should do their part.
What is the magical number of nodes that makes it counterproductive to add new nodes? Did he do any math? Does BCH achieve this holy grail safe number of nodes? Guess what, nobody knows at what number of nodes is starts to be marginally irrelevant to add new nodes. Even BTC today could still not have enough nodes to be safe. If you can't know for sure that you are safe, it is better to try to be safer than sorry. Thousands of nodes is still not enough, as I said, it is much cheaper to run a full node as it is to mine. If it costs millions in hash power to do a 51% attack on the block generation it means nothing if it costs less than $10k to run more nodes than there are in total in the network and cause havoc and slowing people from using the network. Or using bot farms to DDoS the 1000s of nodes in the network. Not all attacks are monetarily motivated. When you have governments with billions of dollars at their disposal and something that could threat their power they could do anything they could to stop people from using it, and the cheapest it is to do so the better
You should run a full node if you're a big business with e.g. >$100k/month in volume, or if you run a service that requires high fraud resistance and validation certainty for payments sent your way (e.g. an exchange). For most other users of Bitcoin, there's no good reason to run a full node unless you reel like it.
Shouldn't individuals benefit from fraud resistance too? Why just businesses?
Personally, I think it's a good idea to make sure that people can easily run a full node because they feel like it, and that it's desirable to keep full node resource requirements reasonable for an enthusiast/hobbyist whenever possible. This might seem to be at odds with the concept of making a worldwide digital cash system in which all transactions are validated by everybody, but after having done the math and some of the code myself, I believe that we should be able to have our cake and eat it too.
This is recurrent argument, but also no math provided, "just trust me I did the math"
The biggest reason individuals may want to run their own node is to increase their privacy. SPV wallets rely on others (nodes or ElectronX servers) who may learn their addresses.
It is a reason and valid one but not the biggest reason
If you do it for fun and experimental it good. If you do it for extra privacy it's ok. If you do it to help the network don't. You are just slowing down miners and exchanges.
Yes it will slow down the network, but that shows how people just don't get the the trade off they are doing
I will just copy/paste what Satoshi Nakamoto said in his own words. "The current system where every user is a network node is not the intended configuration for large scale. That would be like every Usenet user runs their own NNTP server."
Another "it is all or nothing argument" and quoting satoshi to try and prove their point. Just because every user doesn't need to be also a full node doesn't mean that there aren't serious risks for having few nodes
For this to have any importance in practice, all of the miners, all of the exchanges, all of the explorers and all of the economic nodes should go rogue all at once. Collude to change consensus. If you have a node you can detect this. It doesn't do much, because such a scenario is impossible in practice.
Not true because as I said, you can DDoS the current nodes or run more malicious nodes than that there currently are, because is cheap to do so
Non-mining nodes don't contribute to adding data to the blockchain ledger, but they do play a part in propagating transactions that aren't yet in blocks (the mempool). Bitcoin client implementations can have different validations for transactions they see outside of blocks and transactions they see inside of blocks; this allows for "soft forks" to add new types of transactions without completely breaking older clients (while a transaction is in the mempool, a node receiving a transaction that's a new/unknown type could drop it as not a valid transaction (not propagate it to its peers), but if that same transaction ends up in a block and that node receives the block, they accept the block (and the transaction in it) as valid (and therefore don't get left behind on the blockchain and become a fork). The participation in the mempool is a sort of "herd immunity" protection for the network, and it was a key talking point for the "User Activated Soft Fork" (UASF) around the time the Segregated Witness feature was trying to be added in. If a certain percentage of nodes updated their software to not propagate certain types of transactions (or not communicate with certain types of nodes), then they can control what gets into a block (someone wanting to get that sort of transaction into a block would need to communicate directly to a mining node, or communicate only through nodes that weren't blocking that sort of transaction) if a certain threshold of nodes adheres to those same validation rules. It's less specific than the influence on the blockchain data that mining nodes have, but it's definitely not nothing.
The first reasonable comment in that thread but is deep down there with only 1 upvote
The addition of non-mining nodes does not add to the efficiency of the network, but actually takes away from it because of the latency issue.
That is true and is actually a trade off you are making, sacrificing security to have scalability
The addition of non-mining nodes has little to no effect on security, since you only need to destroy mining ones to take down the network
It is true that if you destroy mining nodes you take down the network from producing new blocks (temporarily), even if you have a lot of non mining nodes. But, it still better than if you take down the mining nodes who are also the only full nodes. If the miners are not the only full nodes, at least you still have full nodes with the blockchain data so new miners can download it and join. If all the miners are also the full nodes and you take them down, where will you get all the past blockchain data to start mining again? Just pray that the miners that were taken down come back online at some point in the future?
The real limiting factor is ISP's: Imagine a situation where one service provider defrauds 4000 different nodes. Did the excessive amount of nodes help at all, when they have all been defrauded by the same service provider? If there are only 30 ISP's in the world, how many nodes do we REALLY need?
You cant defraud if the connection is encrypted. Use TOR for example, it is hard for ISP's to know what you are doing.
Satoshi specifically said in the white paper that after a certain point, number of nodes needed plateaus, meaning after a certain point, adding more nodes is actually counterintuitive, which we also demonstrated. (the latency issue). So, we have adequately demonstrated why running non-mining nodes does not add additional value or security to the network.
Again, what is the number of nodes that makes it counterproductive? Did he do any math?
There's also the matter of economically significant nodes and the role they play in consensus. Sure, nobody cares about your average joe's "full node" where he is "keeping his own ledger to keep the miners honest", as it has no significance to the economy and the miners couldn't give a damn about it. However, if say some major exchanges got together to protest a miner activated fork, they would have some protest power against that fork because many people use their service. Of course, there still needs to be miners running on said "protest fork" to keep the chain running, but miners do follow the money and if they got caught mining a fork that none of the major exchanges were trading, they could be coaxed over to said "protest fork".
In consensus, what matters about nodes is only the number, economical power of the node doesn't mean nothing, the protocol doesn't see the net worth of the individual or organization running that node.
Running a full node that is not mining and not involved is spending or receiving payments is of very little use. It helps to make sure network traffic is broadcast, and is another copy of the blockchain, but that is all (and is probably not needed in a healthy coin with many other nodes)
He gets it right (broadcasting transaction and keeping a copy of the blockchain) but he dismisses the importance of it
submitted by r0bo7 to btc [link] [comments]

[ Bitcoin ] Technical: Taproot: Why Activate?

Topic originally posted in Bitcoin by almkglor [link]
This is a follow-up on https://old.reddit.com/Bitcoin/comments/hqzp14/technical_the_path_to_taproot_activation/
Taproot! Everybody wants it!! But... you might ask yourself: sure, everybody else wants it, but why would I, sovereign Bitcoin HODLer, want it? Surely I can be better than everybody else because I swapped XXX fiat for Bitcoin unlike all those nocoiners?
And it is important for you to know the reasons why you, o sovereign Bitcoiner, would want Taproot activated. After all, your nodes (or the nodes your wallets use, which if you are SPV, you hopefully can pester to your wallet vendoimplementor about) need to be upgraded in order for Taproot activation to actually succeed instead of becoming a hot sticky mess.
First, let's consider some principles of Bitcoin.
I'm sure most of us here would agree that the above are very important principles of Bitcoin and that these are principles we would not be willing to remove. If anything, we would want those principles strengthened (especially the last one, financial privacy, which current Bitcoin is only sporadically strong with: you can get privacy, it just requires effort to do so).
So, how does Taproot affect those principles?

Taproot and Your /Coins

Most HODLers probably HODL their coins in singlesig addresses. Sadly, switching to Taproot would do very little for you (it gives a mild discount at spend time, at the cost of a mild increase in fee at receive time (paid by whoever sends to you, so if it's a self-send from a P2PKH or bech32 address, you pay for this); mostly a wash).
(technical details: a Taproot output is 1 version byte + 32 byte public key, while a P2WPKH (bech32 singlesig) output is 1 version byte + 20 byte public key hash, so the Taproot output spends 12 bytes more; spending from a P2WPKH requires revealing a 32-byte public key later, which is not needed with Taproot, and Taproot signatures are about 9 bytes smaller than P2WPKH signatures, but the 32 bytes plus 9 bytes is divided by 4 because of the witness discount, so it saves about 11 bytes; mostly a wash, it increases blockweight by about 1 virtual byte, 4 weight for each Taproot-output-input, compared to P2WPKH-output-input).
However, as your HODLings grow in value, you might start wondering if multisignature k-of-n setups might be better for the security of your savings. And it is in multisignature that Taproot starts to give benefits!
Taproot switches to using Schnorr signing scheme. Schnorr makes key aggregation -- constructing a single public key from multiple public keys -- almost as trivial as adding numbers together. "Almost" because it involves some fairly advanced math instead of simple boring number adding, but hey when was the last time you added up your grocery list prices by hand huh?
With current P2SH and P2WSH multisignature schemes, if you have a 2-of-3 setup, then to spend, you need to provide two different signatures from two different public keys. With Taproot, you can create, using special moon math, a single public key that represents your 2-of-3 setup. Then you just put two of your devices together, have them communicate to each other (this can be done airgapped, in theory, by sending QR codes: the software to do this is not even being built yet, but that's because Taproot hasn't activated yet!), and they will make a single signature to authorize any spend from your 2-of-3 address. That's 73 witness bytes -- 18.25 virtual bytes -- of signatures you save!
And if you decide that your current setup with 1-of-1 P2PKH / P2WPKH addresses is just fine as-is: well, that's the whole point of a softfork: backwards-compatibility; you can receive from Taproot users just fine, and once your wallet is updated for Taproot-sending support, you can send to Taproot users just fine as well!
(P2WPKH and P2WSH -- SegWit v0 -- addresses start with bc1q; Taproot -- SegWit v1 --- addresses start with bc1p, in case you wanted to know the difference; in bech32 q is 0, p is 1)
Now how about HODLers who keep all, or some, of their coins on custodial services? Well, any custodial service worth its salt would be doing at least 2-of-3, or probably something even bigger, like 11-of-15. So your custodial service, if it switched to using Taproot internally, could save a lot more (imagine an 11-of-15 getting reduced from 11 signatures to just 1!), which --- we can only hope! --- should translate to lower fees and better customer service from your custodial service!
So I think we can say, very accurately, that the Bitcoin principle --- that YOU are in control of your money --- can only be helped by Taproot (if you are doing multisignature), and, because P2PKH and P2WPKH remain validly-usable addresses in a Taproot future, will not be harmed by Taproot. Its benefit to this principle might be small (it mostly only benefits multisignature users) but since it has no drawbacks with this (i.e. singlesig users can continue to use P2WPKH and P2PKH still) this is still a nice, tidy win!
(even singlesig users get a minor benefit, in that multisig users will now reduce their blockchain space footprint, so that fees can be kept low for everybody; so for example even if you have your single set of private keys engraved on titanium plates sealed in an airtight box stored in a safe buried in a desert protected by angry nomads riding giant sandworms because you're the frickin' Kwisatz Haderach, you still gain some benefit from Taproot)
And here's the important part: if P2PKH/P2WPKH is working perfectly fine with you and you decide to never use Taproot yourself, Taproot will not affect you detrimentally. First do no harm!

Taproot and Your Contracts

No one is an island, no one lives alone. Give and you shall receive. You know: by trading with other people, you can gain expertise in some obscure little necessity of the world (and greatly increase your productivity in that little field), and then trade the products of your expertise for necessities other people have created, all of you thereby gaining gains from trade.
So, contracts, which are basically enforceable agreements that facilitate trading with people who you do not personally know and therefore might not trust.
Let's start with a simple example. You want to buy some gewgaws from somebody. But you don't know them personally. The seller wants the money, you want their gewgaws, but because of the lack of trust (you don't know them!! what if they're scammers??) neither of you can benefit from gains from trade.
However, suppose both of you know of some entity that both of you trust. That entity can act as a trusted escrow. The entity provides you security: this enables the trade, allowing both of you to get gains from trade.
In Bitcoin-land, this can be implemented as a 2-of-3 multisignature. The three signatories in the multisgnature would be you, the gewgaw seller, and the escrow. You put the payment for the gewgaws into this 2-of-3 multisignature address.
Now, suppose it turns out neither of you are scammers (whaaaat!). You receive the gewgaws just fine and you're willing to pay up for them. Then you and the gewgaw seller just sign a transaction --- you and the gewgaw seller are 2, sufficient to trigger the 2-of-3 --- that spends from the 2-of-3 address to a singlesig the gewgaw seller wants (or whatever address the gewgaw seller wants).
But suppose some problem arises. The seller gave you gawgews instead of gewgaws. Or you decided to keep the gewgaws but not sign the transaction to release the funds to the seller. In either case, the escrow is notified, and if it can sign with you to refund the funds back to you (if the seller was a scammer) or it can sign with the seller to forward the funds to the seller (if you were a scammer).
Taproot helps with this: like mentioned above, it allows multisignature setups to produce only one signature, reducing blockchain space usage, and thus making contracts --- which require multiple people, by definition, you don't make contracts with yourself --- is made cheaper (which we hope enables more of these setups to happen for more gains from trade for everyone, also, moon and lambos).
(technology-wise, it's easier to make an n-of-n than a k-of-n, making a k-of-n would require a complex setup involving a long ritual with many communication rounds between the n participants, but an n-of-n can be done trivially with some moon math. You can, however, make what is effectively a 2-of-3 by using a three-branch SCRIPT: either 2-of-2 of you and seller, OR 2-of-2 of you and escrow, OR 2-of-2 of escrow and seller. Fortunately, Taproot adds a facility to embed a SCRIPT inside a public key, so you can have a 2-of-2 Taprooted address (between you and seller) with a SCRIPT branch that can instead be spent with 2-of-2 (you + escrow) OR 2-of-2 (seller + escrow), which implements the three-branched SCRIPT above. If neither of you are scammers (hopefully the common case) then you both sign using your keys and never have to contact the escrow, since you are just using the escrow public key without coordinating with them (because n-of-n is trivial but k-of-n requires setup with communication rounds), so in the "best case" where both of you are honest traders, you also get a privacy boost, in that the escrow never learns you have been trading on gewgaws, I mean ewww, gawgews are much better than gewgaws and therefore I now judge you for being a gewgaw enthusiast, you filthy gewgawer).

Taproot and Your Contracts, Part 2: Cryptographic Boogaloo

Now suppose you want to buy some data instead of things. For example, maybe you have some closed-source software in trial mode installed, and want to pay the developer for the full version. You want to pay for an activation code.
This can be done, today, by using an HTLC. The developer tells you the hash of the activation code. You pay to an HTLC, paying out to the developer if it reveals the preimage (the activation code), or refunding the money back to you after a pre-agreed timeout. If the developer claims the funds, it has to reveal the preimage, which is the activation code, and you can now activate your software. If the developer does not claim the funds by the timeout, you get refunded.
And you can do that, with HTLCs, today.
Of course, HTLCs do have problems:
Fortunately, with Schnorr (which is enabled by Taproot), we can now use the Scriptless Script constuction by Andrew Poelstra. This Scriptless Script allows a new construction, the PTLC or Pointlocked Timelocked Contract. Instead of hashes and preimages, just replace "hash" with "point" and "preimage" with "scalar".
Or as you might know them: "point" is really "public key" and "scalar" is really a "private key". What a PTLC does is that, given a particular public key, the pointlocked branch can be spent only if the spender reveals the private key of the given private key to you.
Another nice thing with PTLCs is that they are deniable. What appears onchain is just a single 2-of-2 signature between you and the developemanufacturer. It's like a magic trick. This signature has no special watermarks, it's a perfectly normal signature (the pledge). However, from this signature, plus some datta given to you by the developemanufacturer (known as the adaptor signature) you can derive the private key of a particular public key you both agree on (the turn). Anyone scraping the blockchain will just see signatures that look just like every other signature, and as long as nobody manages to hack you and get a copy of the adaptor signature or the private key, they cannot get the private key behind the public key (point) that the pointlocked branch needs (the prestige).
(Just to be clear, the public key you are getting the private key from, is distinct from the public key that the developemanufacturer will use for its funds. The activation key is different from the developer's onchain Bitcoin key, and it is the activation key whose private key you will be learning, not the developer's/manufacturer's onchain Bitcoin key).
So:
Taproot lets PTLCs exist onchain because they enable Schnorr, which is a requirement of PTLCs / Scriptless Script.
(technology-wise, take note that Scriptless Script works only for the "pointlocked" branch of the contract; you need normal Script, or a pre-signed nLockTimed transaction, for the "timelocked" branch. Since Taproot can embed a script, you can have the Taproot pubkey be a 2-of-2 to implement the Scriptless Script "pointlocked" branch, then have a hidden script that lets you recover the funds with an OP_CHECKLOCKTIMEVERIFY after the timeout if the seller does not claim the funds.)

Quantum Quibbles!

Now if you were really paying attention, you might have noticed this parenthetical:
(technical details: a Taproot output is 1 version byte + 32 byte public key, while a P2WPKH (bech32 singlesig) output is 1 version byte + 20 byte public key hash...)
So wait, Taproot uses raw 32-byte public keys, and not public key hashes? Isn't that more quantum-vulnerable??
Well, in theory yes. In practice, they probably are not.
It's not that hashes can be broken by quantum computes --- they're still not. Instead, you have to look at how you spend from a P2WPKH/P2PKH pay-to-public-key-hash.
When you spend from a P2PKH / P2WPKH, you have to reveal the public key. Then Bitcoin hashes it and checks if this matches with the public-key-hash, and only then actually validates the signature for that public key.
So an unconfirmed transaction, floating in the mempools of nodes globally, will show, in plain sight for everyone to see, your public key.
(public keys should be public, that's why they're called public keys, LOL)
And if quantum computers are fast enough to be of concern, then they are probably fast enough that, in the several minutes to several hours from broadcast to confirmation, they have already cracked the public key that is openly broadcast with your transaction. The owner of the quantum computer can now replace your unconfirmed transaction with one that pays the funds to itself. Even if you did not opt-in RBF, miners are still incentivized to support RBF on RBF-disabled transactions.
So the extra hash is not as significant a protection against quantum computers as you might think. Instead, the extra hash-and-compare needed is just extra validation effort.
Further, if you have ever, in the past, spent from the address, then there exists already a transaction indelibly stored on the blockchain, openly displaying the public key from which quantum computers can derive the private key. So those are still vulnerable to quantum computers.
For the most part, the cryptographers behind Taproot (and Bitcoin Core) are of the opinion that quantum computers capable of cracking Bitcoin pubkeys are unlikely to appear within a decade or two.
So:
For now, the homomorphic and linear properties of elliptic curve cryptography provide a lot of benefits --- particularly the linearity property is what enables Scriptless Script and simple multisignature (i.e. multisignatures that are just 1 signature onchain). So it might be a good idea to take advantage of them now while we are still fairly safe against quantum computers. It seems likely that quantum-safe signature schemes are nonlinear (thus losing these advantages).

Summary

I Wanna Be The Taprooter!

So, do you want to help activate Taproot? Here's what you, mister sovereign Bitcoin HODLer, can do!

But I Hate Taproot!!

That's fine!

Discussions About Taproot Activation

almkglor your post has been copied because one or more comments in this topic have been removed. This copy will preserve unmoderated topic. If you would like to opt-out, please send a message using [this link].
[deleted comment]
[deleted comment]
[deleted comment]
submitted by anticensor_bot to u/anticensor_bot [link] [comments]

All you need to know about Yield Farming - The rocket fuel for Defi

All you need to know about Yield Farming - The rocket fuel for Defi
Source
It’s effectively July 2017 in the world of decentralized finance (DeFi), and as in the heady days of the initial coin offering (ICO) boom, the numbers are only trending up.
According to DeFi Pulse, there is $1.9 billion in crypto assets locked in DeFi right now. According to the CoinDesk ICO Tracker, the ICO market started chugging past $1 billion in July 2017, just a few months before token sales started getting talked about on TV.
Debate juxtaposing these numbers if you like, but what no one can question is this: Crypto users are putting more and more value to work in DeFi applications, driven largely by the introduction of a whole new yield-generating pasture, Compound’s COMP governance token.
Governance tokens enable users to vote on the future of decentralized protocols, sure, but they also present fresh ways for DeFi founders to entice assets onto their platforms.
That said, it’s the crypto liquidity providers who are the stars of the present moment. They even have a meme-worthy name: yield farmers.

https://preview.redd.it/lxsvazp1g9l51.png?width=775&format=png&auto=webp&s=a36173ab679c701a5d5e0aac806c00fcc84d78c1

Where it started

Ethereum-based credit market Compound started distributing its governance token, COMP, to the protocol’s users this past June 15. Demand for the token (heightened by the way its automatic distribution was structured) kicked off the present craze and moved Compound into the leading position in DeFi.
The hot new term in crypto is “yield farming,” a shorthand for clever strategies where putting crypto temporarily at the disposal of some startup’s application earns its owner more cryptocurrency.
Another term floating about is “liquidity mining.”
The buzz around these concepts has evolved into a low rumble as more and more people get interested.
The casual crypto observer who only pops into the market when activity heats up might be starting to get faint vibes that something is happening right now. Take our word for it: Yield farming is the source of those vibes.
But if all these terms (“DeFi,” “liquidity mining,” “yield farming”) are so much Greek to you, fear not. We’re here to catch you up. We’ll get into all of them.
We’re going to go from very basic to more advanced, so feel free to skip ahead.

What are tokens?

Most CoinDesk readers probably know this, but just in case: Tokens are like the money video-game players earn while fighting monsters, money they can use to buy gear or weapons in the universe of their favorite game.
But with blockchains, tokens aren’t limited to only one massively multiplayer online money game. They can be earned in one and used in lots of others. They usually represent either ownership in something (like a piece of a Uniswap liquidity pool, which we will get into later) or access to some service. For example, in the Brave browser, ads can only be bought using basic attention token (BAT).
If tokens are worth money, then you can bank with them or at least do things that look very much like banking. Thus: decentralized finance.
Tokens proved to be the big use case for Ethereum, the second-biggest blockchain in the world. The term of art here is “ERC-20 tokens,” which refers to a software standard that allows token creators to write rules for them. Tokens can be used a few ways. Often, they are used as a form of money within a set of applications. So the idea for Kin was to create a token that web users could spend with each other at such tiny amounts that it would almost feel like they weren’t spending anything; that is, money for the internet.
Governance tokens are different. They are not like a token at a video-game arcade, as so many tokens were described in the past. They work more like certificates to serve in an ever-changing legislature in that they give holders the right to vote on changes to a protocol.
So on the platform that proved DeFi could fly, MakerDAO, holders of its governance token, MKR, vote almost every week on small changes to parameters that govern how much it costs to borrow and how much savers earn, and so on.
Read more: Why DeFi’s Billion-Dollar Milestone Matters
One thing all crypto tokens have in common, though, is they are tradable and they have a price. So, if tokens are worth money, then you can bank with them or at least do things that look very much like banking. Thus: decentralized finance.

What is DeFi?

Fair question. For folks who tuned out for a bit in 2018, we used to call this “open finance.” That construction seems to have faded, though, and “DeFi” is the new lingo.
In case that doesn’t jog your memory, DeFi is all the things that let you play with money, and the only identification you need is a crypto wallet.
On the normal web, you can’t buy a blender without giving the site owner enough data to learn your whole life history. In DeFi, you can borrow money without anyone even asking for your name.
I can explain this but nothing really brings it home like trying one of these applications. If you have an Ethereum wallet that has even $20 worth of crypto in it, go do something on one of these products. Pop over to Uniswap and buy yourself some FUN (a token for gambling apps) or WBTC (wrapped bitcoin). Go to MakerDAO and create $5 worth of DAI (a stablecoin that tends to be worth $1) out of the digital ether. Go to Compound and borrow $10 in USDC.
(Notice the very small amounts I’m suggesting. The old crypto saying “don’t put in more than you can afford to lose” goes double for DeFi. This stuff is uber-complex and a lot can go wrong. These may be “savings” products but they’re not for your retirement savings.)
Immature and experimental though it may be, the technology’s implications are staggering. On the normal web, you can’t buy a blender without giving the site owner enough data to learn your whole life history. In DeFi, you can borrow money without anyone even asking for your name.
DeFi applications don’t worry about trusting you because they have the collateral you put up to back your debt (on Compound, for instance, a $10 debt will require around $20 in collateral).
Read more: There Are More DAI on Compound Now Than There Are DAI in the World
If you do take this advice and try something, note that you can swap all these things back as soon as you’ve taken them out. Open the loan and close it 10 minutes later. It’s fine. Fair warning: It might cost you a tiny bit in fees, and the cost of using Ethereum itself right now is much higher than usual, in part due to this fresh new activity. But it’s nothing that should ruin a crypto user.
So what’s the point of borrowing for people who already have the money? Most people do it for some kind of trade. The most obvious example, to short a token (the act of profiting if its price falls). It’s also good for someone who wants to hold onto a token but still play the market.

Doesn’t running a bank take a lot of money up front?

It does, and in DeFi that money is largely provided by strangers on the internet. That’s why the startups behind these decentralized banking applications come up with clever ways to attract HODLers with idle assets.
Liquidity is the chief concern of all these different products. That is: How much money do they have locked in their smart contracts?
“In some types of products, the product experience gets much better if you have liquidity. Instead of borrowing from VCs or debt investors, you borrow from your users,” said Electric Capital managing partner Avichal Garg.
Let’s take Uniswap as an example. Uniswap is an “automated market maker,” or AMM (another DeFi term of art). This means Uniswap is a robot on the internet that is always willing to buy and it’s also always willing to sell any cryptocurrency for which it has a market.
On Uniswap, there is at least one market pair for almost any token on Ethereum. Behind the scenes, this means Uniswap can make it look like it is making a direct trade for any two tokens, which makes it easy for users, but it’s all built around pools of two tokens. And all these market pairs work better with bigger pools.

Why do I keep hearing about ‘pools’?

To illustrate why more money helps, let’s break down how Uniswap works.
Let’s say there was a market for USDC and DAI. These are two tokens (both stablecoins but with different mechanisms for retaining their value) that are meant to be worth $1 each all the time, and that generally tends to be true for both.
The price Uniswap shows for each token in any pooled market pair is based on the balance of each in the pool. So, simplifying this a lot for illustration’s sake, if someone were to set up a USDC/DAI pool, they should deposit equal amounts of both. In a pool with only 2 USDC and 2 DAI it would offer a price of 1 USDC for 1 DAI. But then imagine that someone put in 1 DAI and took out 1 USDC. Then the pool would have 1 USDC and 3 DAI. The pool would be very out of whack. A savvy investor could make an easy $0.50 profit by putting in 1 USDC and receiving 1.5 DAI. That’s a 50% arbitrage profit, and that’s the problem with limited liquidity.
(Incidentally, this is why Uniswap’s prices tend to be accurate, because traders watch it for small discrepancies from the wider market and trade them away for arbitrage profits very quickly.)
Read more: Uniswap V2 Launches With More Token-Swap Pairs, Oracle Service, Flash Loans
However, if there were 500,000 USDC and 500,000 DAI in the pool, a trade of 1 DAI for 1 USDC would have a negligible impact on the relative price. That’s why liquidity is helpful.
You can stick your assets on Compound and earn a little yield. But that’s not very creative. Users who look for angles to maximize that yield: those are the yield farmers.
Similar effects hold across DeFi, so markets want more liquidity. Uniswap solves this by charging a tiny fee on every trade. It does this by shaving off a little bit from each trade and leaving that in the pool (so one DAI would actually trade for 0.997 USDC, after the fee, growing the overall pool by 0.003 USDC). This benefits liquidity providers because when someone puts liquidity in the pool they own a share of the pool. If there has been lots of trading in that pool, it has earned a lot of fees, and the value of each share will grow.
And this brings us back to tokens.
Liquidity added to Uniswap is represented by a token, not an account. So there’s no ledger saying, “Bob owns 0.000000678% of the DAI/USDC pool.” Bob just has a token in his wallet. And Bob doesn’t have to keep that token. He could sell it. Or use it in another product. We’ll circle back to this, but it helps to explain why people like to talk about DeFi products as “money Legos.”

So how much money do people make by putting money into these products?

It can be a lot more lucrative than putting money in a traditional bank, and that’s before startups started handing out governance tokens.
Compound is the current darling of this space, so let’s use it as an illustration. As of this writing, a person can put USDC into Compound and earn 2.72% on it. They can put tether (USDT) into it and earn 2.11%. Most U.S. bank accounts earn less than 0.1% these days, which is close enough to nothing.
However, there are some caveats. First, there’s a reason the interest rates are so much juicier: DeFi is a far riskier place to park your money. There’s no Federal Deposit Insurance Corporation (FDIC) protecting these funds. If there were a run on Compound, users could find themselves unable to withdraw their funds when they wanted.
Plus, the interest is quite variable. You don’t know what you’ll earn over the course of a year. USDC’s rate is high right now. It was low last week. Usually, it hovers somewhere in the 1% range.
Similarly, a user might get tempted by assets with more lucrative yields like USDT, which typically has a much higher interest rate than USDC. (Monday morning, the reverse was true, for unclear reasons; this is crypto, remember.) The trade-off here is USDT’s transparency about the real-world dollars it’s supposed to hold in a real-world bank is not nearly up to par with USDC’s. A difference in interest rates is often the market’s way of telling you the one instrument is viewed as dicier than another.
Users making big bets on these products turn to companies Opyn and Nexus Mutual to insure their positions because there’s no government protections in this nascent space – more on the ample risks later on.
So users can stick their assets in Compound or Uniswap and earn a little yield. But that’s not very creative. Users who look for angles to maximize that yield: those are the yield farmers.

OK, I already knew all of that. What is yield farming?

Broadly, yield farming is any effort to put crypto assets to work and generate the most returns possible on those assets.
At the simplest level, a yield farmer might move assets around within Compound, constantly chasing whichever pool is offering the best APY from week to week. This might mean moving into riskier pools from time to time, but a yield farmer can handle risk.
“Farming opens up new price arbs [arbitrage] that can spill over to other protocols whose tokens are in the pool,” said Maya Zehavi, a blockchain consultant.
Because these positions are tokenized, though, they can go further.
This was a brand-new kind of yield on a deposit. In fact, it was a way to earn a yield on a loan. Who has ever heard of a borrower earning a return on a debt from their lender?
In a simple example, a yield farmer might put 100,000 USDT into Compound. They will get a token back for that stake, called cUSDT. Let’s say they get 100,000 cUSDT back (the formula on Compound is crazy so it’s not 1:1 like that but it doesn’t matter for our purposes here).
They can then take that cUSDT and put it into a liquidity pool that takes cUSDT on Balancer, an AMM that allows users to set up self-rebalancing crypto index funds. In normal times, this could earn a small amount more in transaction fees. This is the basic idea of yield farming. The user looks for edge cases in the system to eke out as much yield as they can across as many products as it will work on.
Right now, however, things are not normal, and they probably won’t be for a while.

Why is yield farming so hot right now?

Because of liquidity mining. Liquidity mining supercharges yield farming.
Liquidity mining is when a yield farmer gets a new token as well as the usual return (that’s the “mining” part) in exchange for the farmer’s liquidity.
“The idea is that stimulating usage of the platform increases the value of the token, thereby creating a positive usage loop to attract users,” said Richard Ma of smart-contract auditor Quantstamp.
The yield farming examples above are only farming yield off the normal operations of different platforms. Supply liquidity to Compound or Uniswap and get a little cut of the business that runs over the protocols – very vanilla.
But Compound announced earlier this year it wanted to truly decentralize the product and it wanted to give a good amount of ownership to the people who made it popular by using it. That ownership would take the form of the COMP token.
Lest this sound too altruistic, keep in mind that the people who created it (the team and the investors) owned more than half of the equity. By giving away a healthy proportion to users, that was very likely to make it a much more popular place for lending. In turn, that would make everyone’s stake worth much more.
So, Compound announced this four-year period where the protocol would give out COMP tokens to users, a fixed amount every day until it was gone. These COMP tokens control the protocol, just as shareholders ultimately control publicly traded companies.
Every day, the Compound protocol looks at everyone who had lent money to the application and who had borrowed from it and gives them COMP proportional to their share of the day’s total business.
The results were very surprising, even to Compound’s biggest promoters.
COMP’s value will likely go down, and that’s why some investors are rushing to earn as much of it as they can right now.
This was a brand-new kind of yield on a deposit into Compound. In fact, it was a way to earn a yield on a loan, as well, which is very weird: Who has ever heard of a borrower earning a return on a debt from their lender?
COMP’s value has consistently been well over $200 since it started distributing on June 15. We did the math elsewhere but long story short: investors with fairly deep pockets can make a strong gain maximizing their daily returns in COMP. It is, in a way, free money.
It’s possible to lend to Compound, borrow from it, deposit what you borrowed and so on. This can be done multiple times and DeFi startup Instadapp even built a tool to make it as capital-efficient as possible.
“Yield farmers are extremely creative. They find ways to ‘stack’ yields and even earn multiple governance tokens at once,” said Spencer Noon of DTC Capital.
COMP’s value spike is a temporary situation. The COMP distribution will only last four years and then there won’t be any more. Further, most people agree that the high price now is driven by the low float (that is, how much COMP is actually free to trade on the market – it will never be this low again). So the value will probably gradually go down, and that’s why savvy investors are trying to earn as much as they can now.
Appealing to the speculative instincts of diehard crypto traders has proven to be a great way to increase liquidity on Compound. This fattens some pockets but also improves the user experience for all kinds of Compound users, including those who would use it whether they were going to earn COMP or not.
As usual in crypto, when entrepreneurs see something successful, they imitate it. Balancer was the next protocol to start distributing a governance token, BAL, to liquidity providers. Flash loan provider bZx has announced a plan. Ren, Curve and Synthetix also teamed up to promote a liquidity pool on Curve.
It is a fair bet many of the more well-known DeFi projects will announce some kind of coin that can be mined by providing liquidity.
The case to watch here is Uniswap versus Balancer. Balancer can do the same thing Uniswap does, but most users who want to do a quick token trade through their wallet use Uniswap. It will be interesting to see if Balancer’s BAL token convinces Uniswap’s liquidity providers to defect.
So far, though, more liquidity has gone into Uniswap since the BAL announcement, according to its data site. That said, even more has gone into Balancer.

Did liquidity mining start with COMP?

No, but it was the most-used protocol with the most carefully designed liquidity mining scheme.
This point is debated but the origins of liquidity mining probably date back to Fcoin, a Chinese exchange that created a token in 2018 that rewarded people for making trades. You won’t believe what happened next! Just kidding, you will: People just started running bots to do pointless trades with themselves to earn the token.
Similarly, EOS is a blockchain where transactions are basically free, but since nothing is really free the absence of friction was an invitation for spam. Some malicious hacker who didn’t like EOS created a token called EIDOS on the network in late 2019. It rewarded people for tons of pointless transactions and somehow got an exchange listing.
These initiatives illustrated how quickly crypto users respond to incentives.
Read more: Compound Changes COMP Distribution Rules Following ‘Yield Farming’ Frenzy
Fcoin aside, liquidity mining as we now know it first showed up on Ethereum when the marketplace for synthetic tokens, Synthetix, announced in July 2019 an award in its SNX token for users who helped add liquidity to the sETH/ETH pool on Uniswap. By October, that was one of Uniswap’s biggest pools.
When Compound Labs, the company that launched the Compound protocol, decided to create COMP, the governance token, the firm took months designing just what kind of behavior it wanted and how to incentivize it. Even still, Compound Labs was surprised by the response. It led to unintended consequences such as crowding into a previously unpopular market (lending and borrowing BAT) in order to mine as much COMP as possible.
Just last week, 115 different COMP wallet addresses – senators in Compound’s ever-changing legislature – voted to change the distribution mechanism in hopes of spreading liquidity out across the markets again.

Is there DeFi for bitcoin?

Yes, on Ethereum.
Nothing has beaten bitcoin over time for returns, but there’s one thing bitcoin can’t do on its own: create more bitcoin.
A smart trader can get in and out of bitcoin and dollars in a way that will earn them more bitcoin, but this is tedious and risky. It takes a certain kind of person.
DeFi, however, offers ways to grow one’s bitcoin holdings – though somewhat indirectly.
A long HODLer is happy to gain fresh BTC off their counterparty’s short-term win. That’s the game.
For example, a user can create a simulated bitcoin on Ethereum using BitGo’s WBTC system. They put BTC in and get the same amount back out in freshly minted WBTC. WBTC can be traded back for BTC at any time, so it tends to be worth the same as BTC.
Then the user can take that WBTC, stake it on Compound and earn a few percent each year in yield on their BTC. Odds are, the people who borrow that WBTC are probably doing it to short BTC (that is, they will sell it immediately, buy it back when the price goes down, close the loan and keep the difference).
A long HODLer is happy to gain fresh BTC off their counterparty’s short-term win. That’s the game.

How risky is it?

Enough.
“DeFi, with the combination of an assortment of digital funds, automation of key processes, and more complex incentive structures that work across protocols – each with their own rapidly changing tech and governance practices – make for new types of security risks,” said Liz Steininger of Least Authority, a crypto security auditor. “Yet, despite these risks, the high yields are undeniably attractive to draw more users.”
We’ve seen big failures in DeFi products. MakerDAO had one so bad this year it’s called “Black Thursday.” There was also the exploit against flash loan provider bZx. These things do break and when they do money gets taken.
As this sector gets more robust, we could see token holders greenlighting more ways for investors to profit from DeFi niches.
Right now, the deal is too good for certain funds to resist, so they are moving a lot of money into these protocols to liquidity mine all the new governance tokens they can. But the funds – entities that pool the resources of typically well-to-do crypto investors – are also hedging. Nexus Mutual, a DeFi insurance provider of sorts, told CoinDesk it has maxed out its available coverage on these liquidity applications. Opyn, the trustless derivatives maker, created a way to short COMP, just in case this game comes to naught.
And weird things have arisen. For example, there’s currently more DAI on Compound than have been minted in the world. This makes sense once unpacked but it still feels dicey to everyone.
That said, distributing governance tokens might make things a lot less risky for startups, at least with regard to the money cops.
“Protocols distributing their tokens to the public, meaning that there’s a new secondary listing for SAFT tokens, [gives] plausible deniability from any security accusation,” Zehavi wrote. (The Simple Agreement for Future Tokens was a legal structure favored by many token issuers during the ICO craze.)
Whether a cryptocurrency is adequately decentralized has been a key feature of ICO settlements with the U.S. Securities and Exchange Commission (SEC).

What’s next for yield farming? (A prediction)

COMP turned out to be a bit of a surprise to the DeFi world, in technical ways and others. It has inspired a wave of new thinking.
“Other projects are working on similar things,” said Nexus Mutual founder Hugh Karp. In fact, informed sources tell CoinDesk brand-new projects will launch with these models.
We might soon see more prosaic yield farming applications. For example, forms of profit-sharing that reward certain kinds of behavior.
Imagine if COMP holders decided, for example, that the protocol needed more people to put money in and leave it there longer. The community could create a proposal that shaved off a little of each token’s yield and paid that portion out only to the tokens that were older than six months. It probably wouldn’t be much, but an investor with the right time horizon and risk profile might take it into consideration before making a withdrawal.
(There are precedents for this in traditional finance: A 10-year Treasury bond normally yields more than a one-month T-bill even though they’re both backed by the full faith and credit of Uncle Sam, a 12-month certificate of deposit pays higher interest than a checking account at the same bank, and so on.)
As this sector gets more robust, its architects will come up with ever more robust ways to optimize liquidity incentives in increasingly refined ways. We could see token holders greenlighting more ways for investors to profit from DeFi niches.
Questions abound for this nascent industry: What will MakerDAO do to restore its spot as the king of DeFi? Will Uniswap join the liquidity mining trend? Will anyone stick all these governance tokens into a decentralized autonomous organization (DAO)? Or would that be a yield farmers co-op?
Whatever happens, crypto’s yield farmers will keep moving fast. Some fresh fields may open and some may soon bear much less luscious fruit.
But that’s the nice thing about farming in DeFi: It is very easy to switch fields.
submitted by pascalbernoulli to Yield_Farming [link] [comments]

College essay on bitcoin and computers. Thought you all might enjoy this.

I always thought computers were simple. At their fundamental level, they are just 1s and 0s. An invisible dance of yes’s and no’s running through a sheet of silicon at billions of times per second. Computers are amazing and unique machines that will forever be apart of our lives. Our sheer dependence on computers motivated me to research the topic? As my understanding of this concept grew, so did my curiosity. I started researching computers as much as I could. I would spend hours a day browsing Youtube and reading articles just to satisfy my interest. That’s why when my dad first brought up the topic of bitcoin during my freshman year, I wasn’t surprised to hear his enthusiasm. I had learned much about this currency over my couple years of research, but I knew very little about how to actually make money off it. He had been tracking the price for a few months and was considering buying a few, just to see what would happen. Little did either of us know; the price of this virtual coin would multiply nearly 30 times in just a few short months.
A few weeks passed and eventually he brought up the topic of buying bitcoin again. His initial interest inspired me to look more into currency and how it worked. I told my dad there was another way to make money off of bitcoins: Bitcoin miners. These impressive and powerful computers are precisely optimized to earn these coins, and I knew I could make one. I explained how this was my once in a lifetime opportunity, like how he explained to me that he missed out on investing in Apple in the 80s. “It could be a money-printing machine,” I joked. With our excitement peaked, we decided to split the $2,000 investment 50/50, and I started the buying process.
I started the process by buying the parts of the machine. I had learned that like Legos, a computer consists of simple components to make the whole. However, unlike an ordinary everyday computer, ours would have a concentrated task. Mining bitcoin is not a complicated process for a computer to do. In essence, by completing simple math problems as quickly as possible, a computer process’ bitcoin transactions from around the world and is rewarded in a tiny fraction of a coin. As more and more transactions take place, the higher the demand for processing, and the higher the reward.
I was lucky enough to know how to build the computer. However, what I was not prepared for was the constant troubleshooting and maintenance I would have to give to this project. Sometimes the computer would simply turn off randomly, sometimes a part was not detected, and other times it merely just ran at half its optimized rate. I learned how to fix issues where there was no logical reason for the problem. Like a calculator, I always thought a computer could never mess up. My hundreds of hours of troubleshooting and blind hope quickly changed my view. I put a vast amount of free time into the project, knowing that potential it had. After lots of hard work, long nights, and determination, I had finally completed my dream project.
I was proud of what I had created. The computer was placed in my room and was like a pet. The loud but rhythmic fans helped me fall asleep, and the heat kept me warm during the winter. From school, I would monitor the machine, and if it had run into an error, I would simply restart it from my phone. My plan was working, and in a little over half a year, our investment should turn into profit. In only a few months, we were already halfway to making our money back. We were lucky because the price of bitcoin itself had doubled since we started, going from nearly $10,000 to $20,000 in a few short months, but as I looked at my account, I had no bitcoin. A few days earlier, hackers had stolen $64 million dollars from the company I mined with.
I felt like a victim. I had done everything right. I built the computer perfectly, I managed everything, I put the time in, and I put the effort in. I was robbed, and I was discouraged. Forced with no other option, we restarted our operation. Bitcoin was still increasing in price, we thought, so there was no reason to stop now. Our operation had restarted and was going well, but for the first time since we started, the price of bitcoin was not doing so well. The bubble was about to burst. It began with my hack, which made national news and hurt the price. Although the price recovered in a few weeks, it was going down again, fast. Believing it would improve, my dad and I decided to hold and not sell. A month later, Bitcoin was back to $8,000 per coin. The fad was over, and we couldn’t even make a profit over our cost of electricity. Again, I was robbed. I did nothing wrong and still lost almost everything. I decided to put the computer in a box and wait a few months; however, the wait was worthless. The coin plateaued at about $10,000, and it simply was not sustainable to continue mining. A year later, we sold the computers for parts and managed to make back about half our initial investment. It was over.
I had lost over $1,000 and months of time and effort. However, as I moved on and started to reflect on the experience, I was the winner. I learned so much about computers and how they operate. In the end, I had learned many skills, from patience and compassion to planning and researching. I had learned not only to build a computer but to manage systems and multitask. I learned countless lessons and gained essential and unique skills that I hope will carry me throughout life. This unique experience has taught me to always keep trying at what I believe in. There’s always an award for doing whatever I think is right. I hope to bring these beliefs and lessons with me throughout life, as I learn and grow from what I was taught. Whenever people ask me what computers are, I always laugh and explain how a computer is just a bunch of simple lego bricks working together to do complicated tasks. However, inside I still have trouble answering this simple question. It is merely just parts working together, but a computer is so much more complicated and beautiful than that. Honestly, I still don’t understand them.
submitted by NetgearX6S4000 to computers [link] [comments]

Bitcoin’s insane energy consumption, explained | Ars Technica - One estimate suggests the Bitcoin network consumes as much energy as Denmark.

Bitcoin’s insane energy consumption, explained | Ars Technica - One estimate suggests the Bitcoin network consumes as much energy as Denmark. submitted by speckz to Futurology [link] [comments]

Redditor discovers that UFC is secretly using its streaming service to mine cryptocurrency on its users' computers

submitted by BAWguy to bestof [link] [comments]

Overheard some old Swedish people

While waiting for my train, I heard some old Swedish people talk about Bitcoin:
Have you heard about Bitcoin? It's about solving very difficult mathematical problems in your computer. It's called "digging". And then you get Bitcoins as reward for the digging. People use it to buy drugs and syringes, and noone knows who you are because it's anonymous.
submitted by Styggnacke to Bitcoin [link] [comments]

Bitcoin Mining in 4 Minutes - Computerphile - YouTube What Are Bitcoin Miners Actually Solving? Bitcoin mining difficulty example. THIS IS CRAZY!! What is Bitcoin mining What Bitcoin Miners Actually Do

The Math Behind Bitcoin Eric Rykwalder is a software engineer and one of Chain.com ’s founders. Here, he gives an overview of the mathematical foundations of the bitcoin protocol. The "math problem" is checking to see the output of a SHA256 after picking a random nonce. If this is true then are the miners being payed by the parties involved in the transaction with a percentage fee of the Bitcoin in transit? Bitcoin mining works by compiling the transactions, the value that depends on all previous blocks, and then finding a “nonce” that meets the criteria. The purpose of solving this problem is merely to show that work was done to get the answer. It comes from a problem called the “Byzantine General’s problem.” Bitcoin mining is a complicated procedure for solving mathematical puzzles and mathematical algorithms. If you can solve these tricky puzzles, then only you can mine Bitcoins. An effective computer system is required to deal with this kind of complicated math puzzles in any other case your device may be crashed. Are you a good problem solver? Well, then you may be a good candidate to get involved with bitcoin mining, because that is what the process is all about. First of all, the discovery of bitcoins is itself called “solving” a block.

[index] [2918] [297] [1199] [4585] [2894] [1565] [3510] [3335] [3777] [2908]

Bitcoin Mining in 4 Minutes - Computerphile - YouTube

It took it upon myself to find out what Bitcoin miners were really mining/why they were mining. I don't know why it took me so long to find the answer, maybe I wasn't asking the right questions ... Bitcoin and cryptocurrency mining explained with the Byzantine Generals Problem. We use it to explain the essence of cryptocurrency mining. https://www.udemy... Learn how to mine Bitcoin with an Excel spreadsheet. Check out the following video for info on 21's Bitcoin computer, which can actually be used to mine Bitc... Miners are specialized computers that use special software to solve math problems and are issued a certain number of Bitcoins in exchange for solving each problem. This provides a smart way to ... Bitcoin mining difficulty example. THIS IS CRAZY!! This is a great example of how fast the bitcoin community is upgrading their hardware and leaving my micro rig in the past.

https://frecperslemen.tk