Acala launches smart contract function to help Polkadot DeFi shine

*本文翻自Bryan Chen《Acala Unveils Smart Contracts and Ethereum Compatibility for Polkadot DeFi》

Click to read the original text to view the original text in English

 

As we all know, Polkadot's cross-chain interaction design allows many blockchain networks to be integrated into Polkadot very quickly and simply (such as BTC and ETH), and it can also carry many heterogeneous (independent or customized) but interconnected parallel Chain network. Polkadot is like a Layer 0 infrastructure chain, which provides PoS security and cross-chain communication for the upper-layer trusted network, while the parachain is more like a scenario use case or a customized blockchain network that solves problems in a specific field.

 

Acala Parachain focuses on customized blockchain networks in the field of decentralized finance. It currently provides a series of out-of-the-box DeFi basic components , such as decentralized stable currency aUSD  , staking derivatives LDOT,  and decentralized transactions the other key modules. In addition, Acala has open sourced many practical modules for the developer community, such as the first oracle module of the Polkadot ecosystem, cross-chain asset standards, and a general monitoring framework .

 

Acala makes good use of the full technology stack of the Substrate framework, which includes the underlying technical infrastructure (such as RPC, Web-Assembly Runtime, P2P, etc.), as well as related smart contract modules at the application layer (such as the Ethereum Virtual Machine EVM). This means that in the near future, chain innovation and technological progress will grow at an alarming rate. All Substrate-based chains can easily and seamlessly plug and play the above functions through a fork-free on-chain upgrade. (Related examples can be viewed: https://marketplace-staging.substrate.dev/)

 

Acala's smart contract module can be implemented in the following two ways:

  • Support EVM (Runtime module) : This module essentially implements the Ethereum virtual machine through Substrate, and developers of all related Solidity contracts can develop on Acala

  • Support ink! Contract: Use Rust language to develop Substrate native smart contract based on Wasm (Web Assembly)

 

In view of technological development and community suggestions, we have launched the smart contract module.  Acala is helping many protocols to be deployed in the Polkadot cross-chain DeFi ecosystem. This article will also introduce its technical principles and practical methods. There is no doubt that smart contracts are also one of the important ways to explore . In the future, Acala will also carry out technical cooperation with Parity and other members of the Polkadot ecosystem (such as Moonbeam, Plasm and Edgeware) to jointly make active contributions to the development of EVM and smart contracts.

 

 

Next, we will delve into the following topics

1. Realize cross-chain liquidity through the transfer bridge

2. Deployment method on Polkadot mainnet

3. Kusama's first online deployment method

4. Deployment method on Acala network

5. Current development progress of Polkadot network smart contracts

 

Realize cross-chain liquidity through transit bridge

 

 

The transfer bridge makes interoperability between blockchains a reality, allowing two blockchain networks with different economic sovereignties and diversified technologies to be interconnected (such as between Polkadot and Ethereum or Bitcoin). The styles of transfer bridges are not the same. There are complete centralization, trusted decentralization, complete decentralization, etc. These projects use different models, with different levels of trust and expansion properties.

 

  • Hosting: Use multi-signature or PoA to set up. They are relatively easy to implement and are already available. ChainX, which is a Bitcoin transfer bridge, and ChainSafe, which is an Ethereum transfer bridge, uses this method. As time goes by, the project roadmap will become more and more decentralized.

     

  • Completely decentralized: the use of economic models or cryptography can guarantee asset transfer between the two blockchains; also because of their high degree of decentralization and low requirements for trust elements, this is relatively expensive for users. And because of the technical challenges of completely trustless decentralization, it is still under rapid development. Researchers in this direction include the Bitcoin transfer bridge Interlay, the Ethereum transfer bridge SnowFork and Darwinia

     

  • Hybrid hosting/trusted decentralization: Then there is a hybrid solution called RenVM. Although this solution is unlicensed, it has an excellent user experience and is widely accepted, and has a clear decentralization path, although At present, most of the trust sources come from the Ren team, but as renBTC's casting volume continues to rise, people trust RenVM more and more

 

The Acala transit bridge solution is relatively neutral, because different forms of transit bridges may satisfy different users’ different preferences for trust, convenience, and cost, and there are sufficient reasons for various types of transit bridges to coexist and coexist. Meet various needs.

 

 

Polkadot mainnet deployment method

 

 

As mentioned above, Polkadot is Layer 0's cross-chain infrastructure chain (relay chain). Therefore, applications and protocols cannot be directly deployed on the relay chain. They can only be deployed through the mechanisms provided by the Polkadot network structure. Each mechanism has its own design trade-offs:

 

  • Deployment as a parachain: This method has the highest degree of customization and flexibility in both technical and economic models. Becoming a parachain also means having long-term access to Polkadot's shared security and cross-chain interaction rights (parachain loan period). This way of access costs is indeed relatively higher, and requires more energy to guide and maintain the network and community. At present, you can experience various functions through the Acala platform: Acala Mandala testnet TC4 version operation tutorial , and you can also follow the later  Acala parachain slot auction .

     

     

  • Deployment becomes a parallel thread: Technically it is similar to a parachain, but sharing security and cross-chain communication requires payment on demand, so the initial operating cost is relatively low. If a chain cannot obtain a parallel chain slot, it can fall back to the parallel thread to continue its operation.

  • Deploying as a DApp on a parallel chain or parallel thread: It is a good way for those who want to access the Polkadot ecosystem but don't want to build and maintain a blockchain network, or those who don't have much burden in the early stage. In particular, the Dapp associated with the DeFi ecosystem can use Acala as a traffic entrance (such as Ren), and Acala will also have the opportunity to become your Polkadot TKH (technical-know-how) technical partner.

 

In addition to technical and economic considerations, many composite factors should also be considered. The degree of composability and compounding factors vary from person to person. DApps on the parachain will naturally enjoy higher compatibility and composability in the chain (see Ren integration: https://github.com/AcalaNetwork/Acala/wiki /T.-Cross-chain-DeFi#ren), cross-parachain DApp may reduce the composability and atomicity of cross-chain transactions (see Laminar integration: https://github.com/AcalaNetwork/Acala/wiki/ T.-Cross-chain-DeFi#laminar), successive transfer bridges have lower composability, because their main functions are concentrated on value transfer and cross-chain special information messaging.

 

 

Kusama first online deployment method

 

 

Kusama is similar to Polkadot and belongs to the cross-chain infrastructure of Layer 0, and provides shared security and interoperability for the relay chain. Kusama aims to provide a development environment for teams that are preparing to deploy on Polkadot, and to help teams built on Kusama lower the economic threshold for the use of parachain slots and shorten the governance cycle. Developers will have similar choices on the Kusama and Polkadot networks, but there are some caveats:

 

  • Deploy as a parachain : The team can build a parachain on Kusama for three reasons. First, after passing the test on the Westend testnet, you can deploy the parachain on the Kusama pioneer network, fine-tune some technical details, and then launch the mainnet Polkadot; second, some teams, including Acala, will choose to use Polkadot and Kusama. Operate at the same time and serve the communities of both networks ; third, if you cannot afford the cost of the Polkadot parachain slot bidding, or prefer the fast iteration and more adventurous Kusama pioneer network, small startups can also choose to stay In the Kusama Pioneer Network, Kusama Parachain is more flexible and autonomous in terms of technology and economic choices.

     

  • Deploy into parallel threads:  Kusama Xianxian Network will have the same parallel thread function as the Polkadot main network. In order to reduce operating costs as much as possible, it will adopt an on-demand purchase method to enjoy security and on-chain interoperability. The compromise solution is that if deployed as a parallel thread, low-frequency transactions will occur on the relay chain, so this method is more suitable for some special application scenarios.

     

  • Deployed on parachain /parallel threads as decentralized applications: DApps can be built on parachains /parallel threads in the Kusama Pioneer Network. For example, DeFi DApp can be built on Acala's Kusama pioneer network, such as games, social or DAO.

 

In the next part, we will explain in detail the different methods of deployment on the Acala parachain.

 

 

Deployment methods on the Acala network

 

Acala As the DeFi financial center on Polkadot and Kusama, the Acala team will be your TKH (Technical-Know-How) technical partner. Currently, there are three ways to deploy on Acala:

 

  • Deploy with the Runtime module (Pallet): This method will have the highest level of customizability and access to the logic on the Acala chain to complete more complex integration. However, this method does not have the failsafe sandbox environment enjoyed by smart contracts, and security auditing and on-chain governance are very important, so this method is more suitable for infrastructure and general protocols. RenVM transit bridge module is a good example. For example, a brand new account with only renBTC can perform any transaction on Acala, and does not require another asset as a network handling fee. Thanks to  Acala’s FlexFee function , renBTC and ACA, aUSD and DOT can all be used as the default handling fee. Select assets for users to choose.

     

  • Deploy with Solidity smart contracts: If you want to directly migrate part or all of the original Solidity smart contracts to Polkadot, and don't want to spend a lot of time on rewriting, this method of development is more appropriate. For example, there are already some teams that use transfer bridges to cross their assets from Ethereum to Polkadot, and then deploy them on Acala to achieve high efficiency, low cost and better user experience

     

  • Deploy with ink! smart contract: This is Substrate's native Wasm smart contract based on the Rust language. Please learn more about the difference from EVM here: https://substrate.dev/docs/en/knowledgebase/smart-contracts/ink -fundamentals

 

Please note: The smart contract module has not yet reached the state of product availability (has not yet reached the Acala standard), and we will maintain close cooperation with Parity and other projects in the ecosystem until it is successfully launched. In the next section, we will outline the precautions and current development.

 

Current status of smart contracts

 

EVM

 

Although Solidity and EVM compatible contracts can be deployed and run on a blockchain network based on the Substrate framework (such as Acala), many development tools are still under development in order to be compatible with existing development tools such as Truffle and Remix. SDKs compatible with Web3.js and other libraries are also under development. Acala will focus on improving the compatibility of smart contracts and Runtime modules to accelerate cross-chain DeFi innovation.

 

Ink! Smart Contracts

 

Ink based on Rust language! The smart contract language and its development tools (cargo-contract and Redspot — Truffle for Ink!) and SDK (polkadot.js) are still under development.

 

Acala's next step

 

 

At present, Acala has supported EVM through Frontier (https://github.com/paritytech/frontier) to realize the compatibility of Substrate with Ethereum. Acala has been able to run many Ethereum DApps that have not yet been improved. In the future, Acala will deploy more complex Solidity contracts, test and support related development tools including Metamasks, implement related Pallet (Runtime modules) to improve compatibility, and be compatible with ERC 20 or other related asset standard tokens.

 

 

Here, Acala also issued an official invitation to invite developers to build a broad open financial ecosystem. The Acala open team and technical community will also help you create more influential, growing and valuable cross-chains on Polkadot and Kusama. DeFi project.

 

Build with Acala:

https://github.com/AcalaNetwork/Acala/wiki/U.-Build-with-Acala

 

 

 

■  Security Notice

 

Recently, there have been scam groups selling Acala-related token assets in the market, and they have confuses the audience in the market to cheat. At present, it has been found that scammers have issued ACA on platforms such as Uniswap to defraud users of ETH.

 

Hereby declare

Acala has not issued any tokens, and you cannot purchase Acala tokens at this time. Any transaction, giving, or mapping transaction is forged. Please refer to the only official channel (Twitter, Medium, WeChat official account) for all token related distribution and other news. Please be alert and tell each other to avoid being deceived. If you find a scam, please report it to the Acala team.

 

Acala will inform the community about the relevant rules about 45 days before the start of the Parachain slot auction, so that users can have enough time to unlock their KSM/DOT and participate in the Acala Parachain slot auction. To get the latest relevant Acala Parachain related details in time, please click the link to subscribe:

https://acala.network/newsletter-sign-up.html

 

 

 

Guess you like

Origin blog.csdn.net/weixin_42667079/article/details/108704576