this post was submitted on 01 May 2025
165 points (100.0% liked)
Technology
38594 readers
450 users here now
A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.
Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.
Subcommunities on Beehaw:
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
By design, it’s supposed to be barely profitable, so it makes sense it would cross that boundary once in a while. Then some miners leave the network or slow their hash rate, the difficulty is adjusted automatically, and it becomes profitable again. It’s actually a pretty interesting strategy.
Ostensibly, the difficulty depends on how many miners there are on the network. More miners = more difficult. Fewer miners = less difficult. The “difficulty” is just how “lucky” you have to be to hit a successful hash on a block. The block’s hash is based on the previous block + all the transactions you include in your block + a random number you add. That random number is what you change to try to hit a successful hash. If the hash starts with a certain number of zeroes, you have a successful block you can add to the chain, and you’re rewarded with some brand new coin in your wallet (you include that in the transactions in your block). If not, you change the random number and try again. How many times you have to try again is controlled by the leading zeroes requirement. You’re competing with every other miner on the network to find a successful block first.
The amount of new coin constantly goes down as the chain gets longer, until it hits zero and mining doesn’t create new coin. Then, you would charge a fee for including someone’s transaction (a lot of miners already charge a fee). The more zeroes required at the start of the hash, the “harder” it is to mine. The network automatically adjusts how many zeroes are required to keep new blocks being added at a roughly constant rate (one block every ten minutes is the target).
All of this is enforced by the algorithm Bitcoin miners use. If a “rogue miner” submits a block that doesn’t meet these criteria, the other miners just reject the block and don’t add it to their copy of the blockchain. The consensus is what really matters, and no one entity controls a majority of miners. Each miner has their own copy of the entire blockchain, so each miner can validate any block it receives before adding it to the chain.
Fewer miners would mean blocks are being added too slowly at the current difficulty, and the network adjusts to make it easier to hit a successful hash. The network automatically adjusts difficulty every 2,016 blocks (it’s all just math, and it’s part of the Bitcoin algorithm), which is roughly every 2 weeks. So, it should in theory only be not profitable for up to two weeks.
(Please note that this is simplified to the point of being technically wrong, but in principle, that’s how it works. Technically, in a mining pool, you can still get rewarded even if you don’t hit a successful hash. You get rewarded based on the hash rate you provide to the pool, with the understanding that you won’t get the full reward when you hit a successful block. Also, it’s not really about the number of zeroes, but a “target” hash that your hash needs to be “below”. A hash might have the same number of leading zeroes, but not be below the target, so wouldn’t be successful. That’s really unlikely. In practice, this basically means more leading zeroes. If the target got high enough, it can even have no leading zeroes. That would probably require an intergalactic sized network.)
Wouldn't it be easier if a bunch of people paid a dollar every second, and one of those people was randomly selected to get every dollar submitted?
it would, but the act of giving a dollar doesn't double as a way to validate transactions