How Monero's proof of work works

(blog.alcazarsec.com)

71 points | by alcazar 2 hours ago

5 comments

  • dgacmu 1 hour ago
    If folks are interested in the old Monero PoW function (and, uh, the reason they changed it), I wrote up a thing about it a long time ago:

    https://da-data.blogspot.com/2014/08/minting-money-with-mone...

    The history of people trying to design GPU or ASIC-resistant proof-of-work functions is long and mostly unsuccessful. I haven't looked into RandomX; it's possible they've succeeded here (or possible that with the alt-coin market mining profitability tanking after Ethereum moved to proof-of-stake, it just wasn't worth it).

    • AureliusMA 21 minutes ago
      There was a proposal on Ethereum that didn't succeed (progpow) since they were already in the late stage of transitionning to PoS. Ethereum did quite a good job at keeping asic advantage moderate (the speedup was 100% max - not orders of magnitude). RandomX is basically progpow that succeeded. You might be interested in Chia's Proof of Space and Time... and how it collapsed!
    • alcazar 52 minutes ago
      This was a super interesting read, and it highlights exactly the strength of cryptocurrencies. They turn game theory in their favor, so egoistic players (I don't mean this in an offensive tone) contribute to making it stronger and safer for everyone else.

      Thank you for sharing!

      • dgacmu 47 minutes ago
        They kinda do - I'll admit honestly that the final game I played in the cryptocurrency space I played solely to profit. (It was a minor, uh, **coin that didn't have a lot of redeeming value to start with). Though it turns out the incentives remained somewhat aligned: I ended up providing the developer with some security bug fixes to make sure someone couldn't mess with the cash cow. :)

        (To be clear: We were just optimizing mining; in the process of looking for ways to mine it faster, I found some security bugs and fixed them. We weren't exploiting the bugs, that crosses a line for me.)

  • j4cobgarby 59 minutes ago
    I never quite understand this stuff, maybe someone can help.

    Are cryptocurrencies supposed to be a potential replacement for real life cash? This was my understanding of the motivation behind Bitcoin, at least.

    If so, why does it make sense that people can "generate" cash by proving some amount of work done? This of course cannot be done with normal cash.

    Is the main functionality of these cryptocurrencies supposed to be "people can send currency to each other", or "people generate currency -- a number -- and sell this currency for real life money"?

    • serial_dev 0 minutes ago
      You can't "generate cash" for doing some amount of random work. You are getting paid for securing the network and keeping it decentralized in the token of the network. It's an incentive mechanism, it's reward for the people who provide the infrastructure for the network.
    • xorcist 2 minutes ago
      Before a new currency exists, it doesn't exist. Someone has to mint it. It has to be inflated into existence, in the monetary sense. How is this done?

      For a state or central bank the answer is obvious: The state or bank itself prints it.

      For a private actor the technical means is perhaps less obvious, but the actor behind the currency obviously gets to decide.

      For a decentralized open source project, it is less clear. You could do it so every node in the system gets a piece of every newly printed unit of currency, but if it is free to run a node everyone could just run a billion nodes and take all the currency for themselves.

      Bitcoin solved the problem with Proof of Work, which is elegant because both the double spend problem and the minting problem is solved together. Every node has to prove it has run a unit of useless computation and inflation is spread evenly across worker nodes. This led to a split between nodes and miners with the use of specialized hardware, but the basic premise still holds.

      Crypocurrencies in general are very different. Ethereum, the second most popular, was created by a private actor and the that actor decided to print 72 M for themselves and promptly sold 80+% before the release of the software which gave rise to the term ICO which was very trendy for several years. After the initial release inflation continued according to the miner model.

    • ArchieScrivener 41 minutes ago
      Yes, Bitcoin is a replacement for central banking currencies. Its the first few lines of the white paper.

      This is how money works. If you use a medium of exchange and unit of account for goods and services then that medium must increase at the same rate as the increase in goods and services otherwise you get second and third order effects such as inflation, contraction, rising unemployment, etc., directly impacting its ability to act as a unit of account.

      In Bitcoin you don't generate cash, you earn block rewards for acting as a consensus broker which otherwise would require a central banking settlement layer. This activity, tied directly to the transaction layer, acts to maintain the equilibrium between increases in goods and services and expansion of the money supply.

      Wall Street got ahold of it and now Bitcoin is primarily acting as a Store of Value for the purpose of speculative investments. Driven primarily by the fear of missing out and market manipulation since Bitcoin is heavily centralized.

      • lern_too_spel 9 minutes ago
        > Wall Street got ahold of it and now Bitcoin is primarily acting as a Store of Value for the purpose of speculative investments

        Insomuch as beanie babies are a store of value. Speculative assets only have value as long as there are more greater fools to buy in. When you've exhausted the supply of greater fools, there is no more reason to buy the speculative asset because its price won't go up, so it will fall to its intrinsic value, which is the worth of a normal stuffie for a beanie baby (roughly $5) or the worth of a number stored on other people's disks for a Bitcoin (roughly $0), which is the value ultimately stored. Wall Street is only involved in Bitcoin to facilitate trade between fools because we have collectively done a poor job of regulating this madness, allowing so many fools to eventually lose their money to a distributed Ponzi scheme and sanctioned countries.

    • yosamino 53 minutes ago
      > If so, why does it make sense that people can "generate" cash by proving some amount of work done?

      Think of it this way: If you pay with physical cash, there are people somewhere who do the work of digging ore out of the ground, smelting it, shaping it into coins, cutting and printing paper and so on. All these people do that, because they get paid in the same currency that they themselves have minted.

      It turns out that nobody has yet found a way to create a digital decentralized currency that that works without incorporating a similar concept of incentivizing the creation of currency.

      • Hilliard_Ohiooo 49 minutes ago
        ETH is trying right now with proof of ownership.
        • littlecranky67 34 minutes ago
          Which automatically makes in possibly centralized (you can never ever guarantee that not a single entity - or group of colluding entities - hold the majority stake and thus excert control).
          • AureliusMA 12 minutes ago
            There are mechanism in place to prevent attacks, that require more than 51% control of staked ETH. The team behind ETH probably stayed on PoW for a long time to build the market cap such as to make attacks unlikely by the sheer amount of capital required.
          • Orygin 13 minutes ago
            Isn't the point of Proof of Stakes that you hold some amount of coin to exert that control. If someone or some group get majority stake, doing anything nefarious would result in crashing the coin value, and thus nuke their own coin value?
    • ulrikrasmussen 48 minutes ago
      It's just a mechanism to incentivize mining. The alternative is that miners are paid only via fees, but that risks making it prohibitively expensive to transact. Minting new coins distributes the cost of mining over all holders by inflating the currency a little bit. Fees are still necessary to avoid spamming.
    • MithrilTuxedo 38 minutes ago
      They're meant to replace the bank.

      Cryptocurrencies allow market participants to communicate value to each other without having to trust other market participants or an institution. Mining verifies transactions and commits them to the public record, earning the miner a fee for their work.

    • earnesti 47 minutes ago
      > This of course cannot be done with normal cash.

      Normal cash is just printed out from thin air by those who have the power. In that sense (some) cryptocurrencies are better because at least the process is open.

      • victorbjorklund 4 minutes ago
        Is it not printed out of thin air by those that have compute power ?
      • AureliusMA 10 minutes ago
        Fiat money is proof of stake, except the failure mode is economic collapse or military collapse.
    • tony69 55 minutes ago
      Broken Money by Lyn Alden is a good book on the topic
      • AureliusMA 9 minutes ago
        Lyn Alden is great. Andreas Antonopoulos is also a great educator.
    • Hilliard_Ohiooo 50 minutes ago
      yes, Bitcoin was hijacked by the company, Blockstream and they injected the SegWit and RBF attacks to kill it as a currency, Bitcoin Cash still functions as Bitcoin however.

      Monero is similar to Bitcoin Cash, a useful replacement for cash in most cases.

      • AureliusMA 8 minutes ago
        Bitcoin Cash's value begs to differ.
    • gear54rus 57 minutes ago
      > If so, why does it make sense that people can "generate" cash by proving some amount of work done?

      Because you need an incentive for 'miners' to participate in transaction processing.

      Main functionality is transactions which are not controlled by any single entity (like the government).

      Most of it is speculation unfortunately, which gives it a bad name, drowning out real usecases.

      • ourmandave 49 minutes ago
        So now I'm wondering, why wouldn't they just charge a transaction fee in Monero?

        Why mine at all?

        If you want to scale up to Mastercard levels.

        • dale_glass 29 minutes ago
          A transaction fee of what? To take a fee from a transaction there has to be a transaction to take a fee from, which needs some sort of "coin" that came from somewhere. Somebody has to create a money supply and distribute it somehow. When the network first comes into existence, nobody has any money, so where does it come into being from?

          Mining is what generates the coins. And you need mining because otherwise you need some other issuing organism. Without decentralized mining you get a central issuer, and that's untrustworthy and possible to shut down.

          • latchkey 17 minutes ago
            It is subtle, but PoW mining itself doesn't generate coins. It isn't like someone is digging a hole in the ground and extracting gold.

            PoW miners are rewarded for correctly validating transactions, with newly minted coins.

            The whole proof of work thing is that you proved that you validated a transaction by expending energy, and the network pays you for that security service.

            Miners then need to sell those coins on the open market in order to pay for their capex/opex, which creates the market.

            The open question is that if you have a fixed supply of coins that eventually runs out, what will carry the miners?

            It'll be increased fees or the network will switch to another solution.

            • AureliusMA 3 minutes ago
              Agreed with your explanation.

              I would add a different way to make sense of it.

              Proof of work allows for what Keynes called "Bancor". BTC is succesful because unlike fiat central banks, the money supply isn't dictated by interest rates (and thus loans) but by the effort of participants. The price of BTC is almost irrelevant, BTC itself is a paradigm shift.

              Regarding the fixed supply, it's only fixed because participants agree to the consensus algorithm that fixes it. Many cryptocurrencies have different tokenomics, such as ETH's rules under PoS. BTC miners could vote onchain for a hard fork to change the 21M cap - or another solution.

  • Aeroi 56 minutes ago
    you guys can downvote this, but it's a useless waste of compute, detrimental to resource scarcity and energy constraints, not really solving problems in society.
    • AureliusMA 1 minute ago
      You would be surprised at how efficient cryptocurrency mining is compared to other ways of storing value. And most improvements happen to reduce the overall cost of securing value (PoS, PoST, etc)
    • tt24 29 minutes ago
      This talking point is so silly

      I can use my compute and energy how I like, whether that’s for AI or crypto or a Minecraft server. You don’t have a right to call one “wasteful” and one not

    • Hilliard_Ohiooo 53 minutes ago
      You'll get nothing but up votes here on HN, a lot are still angry they missed the boat.

      But solving the problem of how to transfer value trustlessly and anonymously, instantly anywhere in the world is one of the biggest breakthroughs since the Internet.

      Amazing how in a few short years kids started growing up with Bitcoin and don't understand how it work or why it exists :(

      • dgellow 31 minutes ago
        It’s an interesting technical problem to solve. But after 15y still has no meaningful benefits for our societies. Other than gambling/speculation/illegal stuff. The transformative cryptocurrency shift didn’t happen
      • jayd16 33 minutes ago
        If it's actually a transformative technology, there's no boat to miss.

        But it's still mostly about the speculation, it seems.

      • mothballed 32 minutes ago
        It was mainly the early wall street types that cashed in big. If it was used as suggested by satoshi, then you were using it as spending cash rather than an investment to sit on, in which case you shouldn't have made much money on it.
    • Jtarii 23 minutes ago
      It's great for buying drugs though! (Which is funnily the only actually legitimate usecase)
    • logicchains 20 minutes ago
      It's solving a lot of people's problems, they just aren't your problems.
    • littlecranky67 52 minutes ago
      Absolutely true, no one needs monero when you can have bitcoin (and lightning for private instant bitcoin payments).
      • Hilliard_Ohiooo 48 minutes ago
        Lightning Network, ready in 18 months for the last 5 years! Lol.
        • littlecranky67 44 minutes ago
          What exactly are you missing that i.e. PhoenixWallet or Electrum is providing? The only thing missing is merchant adoption - but bitcoin is far ahead monero in this field.
          • mothballed 23 minutes ago
            Monero has utterly failed in merchant adoption. If you go to something like cryptwerk, which is what getmonero themselves recommends as a vendor list, It has about 1/2 the vendors of even the roughly same market cap coin Litecoin.
        • earnesti 45 minutes ago
          I have used LN quite a lot for the last 3-4 years or so. Seems to work good enough for quite many use cases.
  • residentzero 1 hour ago
    [dead]
  • add-sub-mul-div 1 hour ago
    [flagged]