this actually points to a horrifying oversight in the smart contract design. For some context a smart contract is a program that runs on a blockchain. It has its own account that nobody can access depending on how it's been programmed. By default there is a function that gets called when someone sends cryptocurrency to the smart contract, and apparently in this case it will return an equivalent amount of "WETH" for the amount of "ETH" transferred. But the inverse isn't true. To get your "ETH" back you have to call a specific function called "withdraw".
ERC-20 Tokens are smart contracts that just keep a record of accounts that knows who has what balance. It's not a "real" token in the same sense of Ethereum or Bitcoin. When you transfer an ERC-20 token you have to tell the smart contract you are transferring X amount to Y address and it records that transaction and your balances are subesequently updated.
So what is apparently happening here is people are transferring WETH to the address of the smart contract and the smart contract treats that as a normal transaction between third parties. There is no special logic. The smart contract has no way of actually transferring that money back to people. The only way it can transfer you WETH tokens is by sending it ETH. The only way it can transfer you ETH tokens is by calling "withdraw". Transferring means that money is on its books under its own account permanently.
I think they expected it to work like when they transferred the ethereum there. And the half a million worth of ETH is now in the smart contract's account as a positive balance forever.
If I'm reading the comments right the way it works is you transfer your eth to the smart contract and it puts the equivalent amount of wETH in your account on its books. So say I transfer 10 ETH to it, it says "ok now frick owns 10 WETH". Now I can transfer that to other people or whatever and every time there's a transaction it gets recorded by the smart contract.
So now I want to trade in my WETH for ETH because I want to exchange it for Real Money Baybee. Naturally I just transfer my WETH to the smart contract and get the ETH back because that's how it worked the first time around right? Wrong. I transfer my WETH to the smart contract and the smart contract goes "Oh cool now WETH Smart Contract owns 10 WETH and frick owns 0".
this actually points to a horrifying oversight in the smart contract design. For some context a smart contract is a program that runs on a blockchain. It has its own account that nobody can access depending on how it's been programmed. By default there is a function that gets called when someone sends cryptocurrency to the smart contract, and apparently in this case it will return an equivalent amount of "WETH" for the amount of "ETH" transferred. But the inverse isn't true. To get your "ETH" back you have to call a specific function called "withdraw".
ERC-20 Tokens are smart contracts that just keep a record of accounts that knows who has what balance. It's not a "real" token in the same sense of Ethereum or Bitcoin. When you transfer an ERC-20 token you have to tell the smart contract you are transferring X amount to Y address and it records that transaction and your balances are subesequently updated.
So what is apparently happening here is people are transferring WETH to the address of the smart contract and the smart contract treats that as a normal transaction between third parties. There is no special logic. The smart contract has no way of actually transferring that money back to people. The only way it can transfer you WETH tokens is by sending it ETH. The only way it can transfer you ETH tokens is by calling "withdraw". Transferring means that money is on its books under its own account permanently.
that smart contract is now so much richer than me
It sure is.
There's a reason they call it a smart contract.
Neural networks competing to create the perfect crypto scam
Wow, regular crypto's "If you send money to wrong address you won't get it back" sounds normal compared to that
Currency of the future
So where did the half a million worth of Ethereum actually end up, and why were they transferring it there in the first place?
Is it just sitting in this smart account, unaccessible until the end of time? Or did it end up in another person's wallet?
I think they expected it to work like when they transferred the ethereum there. And the half a million worth of ETH is now in the smart contract's account as a positive balance forever.
If I'm reading the comments right the way it works is you transfer your eth to the smart contract and it puts the equivalent amount of wETH in your account on its books. So say I transfer 10 ETH to it, it says "ok now frick owns 10 WETH". Now I can transfer that to other people or whatever and every time there's a transaction it gets recorded by the smart contract.
So now I want to trade in my WETH for ETH because I want to exchange it for Real Money Baybee. Naturally I just transfer my WETH to the smart contract and get the ETH back because that's how it worked the first time around right? Wrong. I transfer my WETH to the smart contract and the smart contract goes "Oh cool now WETH Smart Contract owns 10 WETH and frick owns 0".