PlatON dual virtual machine support

PlatON dual virtual machine support

PlatON supports both EVM and WASM virtual machines, and is compatible with Ethereum’s Solidity contract. Smart contracts on Ethereum can be ported to PlatON with slight adjustments.
Both EVM and WASM virtual machines have built-in privacy algorithms (including homomorphic encryption and zero knowledge proof) at the underlying level, and developers can directly integrate these algorithms into smart contracts to protect data privacy within the contracts. Based on privacy algorithms, PlatON has developed standards and reference implementations for privacy token contracts, which provide for coin minting, destruction, and interaction with standard tokens, enabling anonymous transfer of standard tokens.
EVM (Ethereum Virtual Machine) and WASM (WebAssembly) are two different virtual machines used to execute different smart contract programming languages and platforms, respectively.
EVM, The Ethereum Virtual Machine is a virtual machine designed for the Ethereum blockchain, which enables smart contracts to run on the Ethereum network. Solidity is a programming language specifically designed for EVM that allows developers to write smart contracts that execute and automatically execute transactions on the Ethereum blockchain. EVM is popular for its Turing completeness, ability to perform complex calculations, and providing developers with rich functionality and security.

  1. Smart contract execution environment: EVM provides a secure and isolated environment to execute smart contract code. This ensures that the execution of the contract is not affected by external factors, protecting the security of the Ethereum network and users.

  2. immutability: Once a smart contract is deployed on the Ethereum blockchain, its code cannot be changed. This immutability ensures the reliability and predictability of the execution results of smart contracts.

  3. Distributed Execution: EVM runs on all nodes of the Ethereum network, ensuring that all nodes reach a consensus on the execution results of the smart contract through consensus algorithms.

  4. Fuel mechanism (Gas): In order to prevent malicious users from abusing resources, EVM has introduced a fuel mechanism. Executing a smart contract requires paying a certain amount of Ethereum as fuel cost. This mechanism helps control the execution cost of contracts and protects the network from denial of service attacks.

WASM, WebAssembly, also known as WebAssembly, is a new type of virtual machine used to run code on various platforms. WASM is designed to run in browsers, but it can also be used for other types of applications. The main difference between WASM and EVM lies in their design purpose, performance, execution mode, and language support. WASM focuses more on providing fast execution speed and cross platform compatibility.

  1. Cross platform: WASM virtual machines can run on any WebAssembly supported platform, including browsers, servers, IoT devices, etc.

  2. High performance: WASM code can be directly executed by modern JavaScript engines or run through interoperability with JavaScript, providing performance close to native code.

  3. Language independence: WASM allows code from any language to be compiled into WASM bytecode, including C/C++, Rust, AssemblyScript, etc.