Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let's try. I don't know what kubernetes does. Can anyone explain in five lines of text?


It abstracts away underlying hardware, leaving you with a convenient set of abstractions for deploying containerized networked services. Sort of an OS for a cluster of distributed machines. Unfortunately this involves lots of YAML. How’d I do?


Except for the very last part because I don't know what YAML is, but the rest was understandable.

Which I think drives the point of all this crypto talk in acronyms contributes to it being incomprehensible.


YAML stands for “YAML Ain’t Markup Language”, (originally “Yet Another Markup Language”).

It it a way of storing the same kind of thing that JSON can store.

Though, unlike JSON, it supports comments, uses a python-like significant indentation, and has a few uh, things not in quotes sometimes being taken as strings, but if it is `NO` then instead, if there are no quotes, it will be interpreted as the constant false .


Better than all the crypto nonsense.


One could write a sentence like that about smart contracts. One I pulled from Google:

Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary’s involvement or time loss. They can also automate a workflow, triggering the next action when conditions are met.


And here's the "oh so complex" contract in question, all 60 lines.

  contract WETH9 {
    string public name     = "Wrapped Ether";
    string public symbol   = "WETH";
    uint8  public decimals = 18;

    event  Approval(address indexed src, address indexed guy, uint wad);
    event  Transfer(address indexed src, address indexed dst, uint wad);
    event  Deposit(address indexed dst, uint wad);
    event  Withdrawal(address indexed src, uint wad);

    mapping (address => uint)                       public  balanceOf;
    mapping (address => mapping (address => uint))  public  allowance;

    function() public payable {
        deposit();
    }
    function deposit() public payable {
        balanceOf[msg.sender] += msg.value;
        Deposit(msg.sender, msg.value);
    }
    function withdraw(uint wad) public {
        require(balanceOf[msg.sender] >= wad);
        balanceOf[msg.sender] -= wad;
        msg.sender.transfer(wad);
        Withdrawal(msg.sender, wad);
    }

    function totalSupply() public view returns (uint) {
        return this.balance;
    }

    function approve(address guy, uint wad) public returns (bool) {
        allowance[msg.sender][guy] = wad;
        Approval(msg.sender, guy, wad);
        return true;
    }

    function transfer(address dst, uint wad) public returns (bool) {
        return transferFrom(msg.sender, dst, wad);
    }

    function transferFrom(address src, address dst, uint wad)
        public
        returns (bool)
    {
        require(balanceOf[src] >= wad);

        if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {
            require(allowance[src][msg.sender] >= wad);
            allowance[src][msg.sender] -= wad;
        }

        balanceOf[src] -= wad;
        balanceOf[dst] += wad;

        Transfer(src, dst, wad);

        return true;
    }
}


Why does anyone want to use this?

Knowing nothing about it, this is the question that remains unanswered to me after reading through dozens of comments on this debacle. What was the person who lost half a million trying to accomplish? For what benefit?

I assume that if you just want to use ETH to buy and sell stuff, you don't have to get involved with any of these smart contracts.


There's some detail on weth.io. apparently ETH is not Ethereum (ERC-20) compatible, if you can believe it.

I'm still kind of confused how ypu go from one ERC-20 chain to another. I know there's wrapped Ether on other chains but I'm not clear on how it got there or whether it's a good idea to hold that. Seems like a "not my keys" situation in a way.


You mean buy and sell goods and services? Correct me if I'm wrong, but I don't think basically anyone uses ETH for this (compared to BTC and BCH where at least some merchants exists). If you want to buy and sell tokens in a decentralized fashion, then you'll have to deal with smart contracts.


> I assume that if you just want to use ETH to buy and sell stuff, you don't have to get involved with any of these smart contracts

Correct. If you want to send someone money unconditionally, you can just send it without a smart contract.

> What was the person who lost half a million trying to accomplish?

Why/when to use WETH? From the beginning:

Like Bitcoin, ETH is a crypto currency that has it's own token called ETH (or Ether), you can hold it, send it from one address to another address and earn it by mining. Providing a basic finance and value excahnge platform.

In addition to ETH, Ethereum supports (via Smart Contracts) things called tokens, that are effectively alternative cryptocurrencies. Pre-Ethereum, people needed to create a new chain for each new token, for example you have "NameCoin" and "LiteCoin" and "DogeCoin" and so on. Each has it's own network, initial block, wallet client, mining pools, etc. It's a copy and paste and edit of Bitcoin each time.

With Ethereum, you can create a new token with it's own separate initial supply, precision, allocations etc. on the same blockchain (Ethereum) using a Smart Contract. People can use these tokens on the same network, using the same tools. However there are limits on how different they can be - you can only do what the Ethereum tech allows.

Now as time went on, there were a lot of tokens, and so they developed a standard, ERC20, which is like a C# or Java interface that defines a standard token. With this in place people can write code that interacts with "any token".

I could create a stock exchange contract where people list, place orders etc. to swap tokens. Even once this stock exchange is written and deployed, people can create brand new ERC20 tokens, and because those new tokens meet the interface, the stock exchange will work with it.

This all hots up and of course people naturally want to use these stock exchange, and other contracts (be it gambling, lending, escrow or whatever...) with the original ETH token, since everyone playing has ETH (you need ETH to pay network fees), and it's value is going up and wotnot.

But ETH is not a smart contract. It's hard coded into Ethereum. It was written before ERC20 was standardized. So you can't use Ethereum as one of the tokens in your stock exchange.

WETH offers a way to wrap Ethereum in an ERC20 token and solve that problem!

Since smart contracts can define rules about deposits, withdrawals, etc, and smart contracts can own their own Ethereum. This wrapping can be done purely in code. No need to trust "WETH Inc"*.

WETH is basically an "adaptor" from the gang of 4 design patterns.

* Other wrapped coins usually require trust. For example "Tether" wraps USD, but it requires a company to manage the bank accounts. People may decide they don't believe that company really has the funds, or the parent company could be put out of business by a government. WETH on the other hand is wrapping something on the blockchain in a code-automated way.

You can make mistakes (like the OP) but unless there is a big security hole no one has discovered, you can't have the money stolen or confiscated unless your private keys are compromised.*


Thanks for the explanation. So presumably the person involved was intending ultimately to do something involving some market that uses WETH rather than ETH, and was unwisely testing how the system works with ETH worth half a million dollars rather than five dollars. (Or possibly they changed their minds about using WETH for some purpose, and so just wanted their ETH back?)


Yeah, having done this myself, a use case might be:

1. Buy ETH

2. Convert to WETH

3. Swap for TOKEN

4. Hold TOKEN

5. Swap token back for WETH (hopefully made a profit there)

6. Convert WETH back for ETH

I did this using Metamask / Uniswap so it is all done for you. So I had no need to understand how the contract works. Also didn't have anywhere near $500k!


and this will be the 500k trap:

  function() public payable {
      deposit();
  }
If it didn't have this no-arg behavior, then the mistake wouldn't have been made.


The issue is the question here which is probably invalid.

Cryptocurrency is designed for general use. Kubernetes is designed to abstract specific problems away for specialists.


Smart contracts are not something people who just want to send and receive money are meant to use.


Systemd for clusters


I wouldn’t offend kubernetes with that association :)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: