When Deploying smart contract on Etherum Blockchain , who validates if that smart contract is valid and is not some fake contract that just takes away Etherum.
"Validation" is an overloaded term here, I think. It just means, potentially, too many possible things that are separate concerns handled by different means.
- Is it a valid contract? That is, can it run?
- Do we agree with what it does? Is it fair or does it cheat people?
- What stops rogue contracts from doing things we don't agree with?
- Does it work or does it error out for some reason?
These concerns and more are dealt with in different ways. None of the solutions involves a central authority or committee that polices the space.
- A contract deployment is a specially crafted transaction that sends the compiled contract to address 0x0. If this is malformed then all nodes will agree the transaction is nonsense, so the contract does not exist on the blockchain. The end.
- A contract may program processes we don't necessarily agree with. This can include businesses we disagree with on ethical grounds. It cannot, however, include actions that are forbidden at a protocol level.
- Contracts are not all-powerful and cannot simply override protocol. For example, no contract can simply spend funds to seize funds from someone else's wallet.
- Poorly written contracts do not necessarily work as intended. They may include illogical instructions (divide by zero) that cause transactions to simply fail. Since contracts cannot be amended (generally), quality assurance is vital when working with this form of software.
Hope it helps.