P.S. I understand that most tokens don't have much monetary value, but just wanted to understand the benefits and legal ramifications of taking on a custodial wallet...
Good stuff!
[1] https://github.com/MetaMask/metamask-extension/issues/2847
> When you fill in the details and click create, MetaMask will ask you to confirm the transaction
> Check if you're ok with the ethereum transaction fee and click submit.
In this case it's creating a new contract (I didn't notice the "new contract" logo in MM at first glance). I have to dig into the FAQs to find the source for that contract, and as you point out MetaMask can't guarantee that's the actual source. So this is an easy opportunity to stick a backdoor in that can hijack your created coins at any point.
A better approach would be to call an existing contract on the blockchain which creates a new contract from it's own source. Is there a reason not to do this?
In short, there's no good way of verifying an ethereum contract.
however, that would require trusting etherscan, but metamask already relies on it pretty heavily, so...
if the user didn't want to rely on etherscan, it's possible to have metamask verify contracts itself - the dapp publisher would need to provide the source with the dapp, metamask could compile it, and make sure it matches the on-chain bytecode. i believe solc is written in javascript so it would be possible to ship it with metamask.
i'm not sure how this would work with contracts with dependencies. at that point, the sources of all the dependencies would need to be verified. this would require larger infrastructure (e.g. etherscan, but again, a single point of failure).
in that case, it would almost make sense for another data section in the EVM to hold the contract source. in this case:
* 1. contract source code is all stored on chain, in a decentralized manner
* 2. clients can verify the byte code
* 3. it's more expensive to publish a contract since it needs the extra space to store the source
But why not just store an IPFS / Swarm hash linking to the source on chain? That requires almost no cost overhead per contract.
However, in my experience, contracts don't usually have a lot of source code. I think storing them on chain wouldn't be much of a problem. Unfortunately though, that might incentivize minification and other self defeating measures.
Even the web example you gave isn't as simple as it first appears. Just because you fill in a form with certain details doesn't meant that's what the page is actually sending to the server. Most of the time this isn't an issue, as you "trust" the page you're on not to fuck around.
This is what blockchains bring, you don't have to trust the web page any more. With a dApp you know exactly where that form is going and what's going to happen, with the web you only know a POST request is outgoing somewhere and hopefully it'll be handled correctly. It's not something that's easy to understand yet, but one day it might be.
> How are you going to verify the contract that the deployed contract is deploying?
Go and look at it, compile + compare the source etc.
Anyone actually find a usecase for public, decentralized, verified ledgers?
Like I dont understand a use-case. Currency is basically solved by bitcoin.
After that, I dont see why you wouldnt trust a single source? Most things like social media, videos, medical records, etc... dont need to go through the blockchain. They can be centralized.
Anyway, asking this question here, because on reddit its awful.
Any programmers actually finding blockchain is going to be another tool for us to use? Or is it all hype and niche use-case?
But generally I agree, it's hard to design UIs in crypto, having to install and use a plugin like MetaMask doesn't add to the trustworthiness of the site.
Compare that to the web where I know underlined text takes me somewhere else, hover over will give me the URL, there are standard browser components for input fields, buttons etc.
I'm really hoping there's a drop in framework for this which reaches mass adoption soon.