4 ms·
If they are storing credentials to access funds in a centralized database, they are by definition not "decentralized". For example, Curve.fi meets the common d
by xur17 3y ago
If they are storing credentials to access funds in a centralized database, they are by definition not "decentralized".
For example, Curve.fi meets the common definition of "decentralized exchange", and as such does not store credentials, etc in a centralized database. Their code is deployed to Ethereum and runs on Ethereum, so users are able to make trades against it, deposit funds into trading pools, etc, all without having a central actor hold credentials.
That said, Curve.fi can still cause users to lose funds if they have bugs in their code, but they do not have the risk of someone stealing passwords from their server and walking away with the money.
- nico 3y ago> they do not have the risk of someone stealing passwords from their server and walking away with the money So if they get hacked and the credentials to upload code get stolen, what happens? Wouldn’t the hackers be able to deploy code that steals users crypto?
- dotnet00 3y agoProbably requires some sort of consensus to accept newly uploaded code.
- siftrics 3y agoWhy? Why do you speculate? The answer is easily accessible information. Smart contracts can be made immutable.
- lxgr 3y agoSo are they? Not everybody here is an expert in smart contracts.
- siftrics 3y agoThe purpose of Hacker News is insightful discussion; it is not a place to pipe your stream of consciousness into the comment box. Refrain from speculating about things to which we know the answer. Just look it up and post the answer, instead. This is easily accessible information. Google it or ask an LLM. Don't just spew speculation into the void. You don't need to be a "smart contract expert" to use Google.
- dotnet00 3y agoYet you're the one not contributing to the discussion while someone else provided a much more interesting response to my speculation.
- siftrics 3y agoIn my very first reply to you, I wrote the answer: "smart contracts can be made immutable."
- deleted 3y ago[deleted]
- baobabKoodaa 3y agoPlease stop spreading misinformation. This does not answer the question that was presented, and the implication here is misleading. Just because smart contracts can be made immutable, doesn't mean contracts are commonly deployed that way, and even when they are, developers need a way to get people to use newer versions of immutable code (like uniswap v1 to v2).
- injeolmi_love 3y agoIt depends on the blockchain and on the implementation whether a smart contract is immutable. Technically, all smart contracts running on EVM (the most popular smart contract virtual machine) are immutable. However, it is possible to call smart contract methods from a different smart contract while operating on the same state. Some smart contracts use this as a hack to get around immutability, by changing which smart contract is called by a proxy smart contract. Generally immutability is better for security reasons, but proxy contracts are useful if someone is testing in production. There have been cases of immutable contracts with bugs that locked millions of dollars of cryptocurrency with no recovery possible.
- woah 3y agoIt depends. More reputable contracts such as Uniswap and Compound use immutable contracts. This is how Ethereum was designed to be used. Unfortunately, many others use the "proxy pattern" which is a weird hack allowing the code to be replaced by an admin account. This makes sense for development, because it allows code to be deployed iteratively, but IMO it needs to stop.
- dboreham 3y agoEthereum contracts are generally immutable so there is no facility to "upload code".
- lxgr 3y agoExcept that almost all of them seem to be using an update mechanism anyway... Here's USDC on Ethereum, for example: https://etherscan.io/address/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#code https://etherscan.io/address/0xa0b86991c6218b36c1d19d4a2e9eb... – you can clearly see the upgrade mechanism that will allow anyone that knows the admin key to swap out the contract for anything they like. The cryptocurrency ecosystem's idea of decentralization in a nutshell.
- siftrics 3y agoOf course USDC is upgradeable; it's run by an entity that is attempting to comply with the laws and regulations of many different jurisdictions. No power-hungry regulator would allow them to deploy USDC without the capability to arbitrarily intervene, freeze, and blacklist.
- baobabKoodaa 3y agoIn a sibling thread you keep condescendingly repeating immutable this, immutable that...
- siftrics 3y agoSorry, I should've added more context. The standard decentralized setup is this: 1. Developers write a smart contract that does something. For example, a token exchange to trade tokens, or a derivatives exchange to trade exposure to tokens/real world assets/etc. 2. Developers publish the source code for this smart contract, deploy it to the chain, and, with the leverage of basic cryptography, make it impossible to change the code --- make it immutable. 3. Anyone who now comes along to use their smart contract does not have to trust the developers because they can 1) read through the open source code and 2) verify that the open source code they are reading is the same as the code deployed on chain. Of course this does not eliminate the risk of unforeseen bugs in the smart contract, which is known as "protocol risk." If you say you are building a decentralized exchange, that is what you're doing. Otherwise, you're arguably committing fraud. Many companies want to build financial primitives like decentralized exchanges, hopefully because they think that's where the future will lead and ultimately because there is a lot of money to be made. However, companies must comply with the rules and regulations of the jurisdictions in which they operate. These regulators nearly always insist on the ability to intervene. This creates a slightly different setup: 1. Same as above 2. Same as above, but strikeout the "make immutable" part and leave in an "upgrade authority" backdoor, which allows the code of the smart contract to be replaced (avoiding semantics). This upgrade authority can be gated by a multi-sig, requiring m of n keypairs to sign for new code to be deployed. 3. Often the code is still published, but there are many cases where the code remains closed-source. The original commenter said this, in paraphrase: > If you get access to the deploy keys to a decentralized exchange, can't you just deploy new code and take all the funds? The answer is "no" because a decentralized exchange is immutable. If it were not immutable, then it would not be a decentralized exchange. If, however, the exchange was not actually decentralized, but fraudulently claimed to be, then yes, you can do exactly as the original commenter speculates.