「TechTabloid」“Service Presentation Layer” of Dante Network
As we said in the previous article, the protocol stack of Dante Network has three layers, at the top of which is the “Service presentation layer”. You may simply understand it as contracts being deployed on different chains for users in different ecosystems to communicate in a universal method. In simple words, this layer is like a general language, no matter what method we choose to communicate with others, a general language is a base for communicators to understand each other. Then we will use this language to talk or work with others freely. And this article will focus on the “language” level of Dante Network.
You may know that the most famous “language” in the web2 world is the HTTP/HTTPS protocol. It defines a standard message expression and service visiting protocol, and any application that exists on different computers can use it to interact with web servers worldwide. The `Service expression layer` in Dante Network does similar things. There are 3 sublayers in Dante Protocol: message transferring, contracts innovation, and service visiting.
Firstly, the message transferring is supposed to be the basic capability, because In web2, every application “speaks” the same “language” as HTTP/HTTPS restricted, they communicate seamlessly, while in web3, things are different, cause every smart contract has their own “dialect”. However, in Dante Network, smart contracts can have a general language to communicate with each other, that is, when processing composite data, developers can build and implement it based on the specific design features of the public chain they deploy their own smart contracts to. It makes it more comfortable for developers because there is no additional learning cost, they just need to develop in their familiar way the same as they did with their native chain development. Here you can check Dante’s concrete implementation in solidity.
The second sublayer is the multi-chain contract invocation. DApps could be composited with many contracts. For example, an NFT project may include an NFT contract to manage, mint, and transfer NFTs. Besides, there may be a market contract to make tradings. There will be interactions between these contracts, and the market contract may serve for multi-chains to support more kinds of tokens. Contract invocation in a single chain is build-in operations, but when moving to multi-chains, things will become more complex because the atomicity of the contract call is broken. One of the most obvious points is that contracts on majority chains use `msg.sender` to make an authority verification of some special operations, for example, assets management like FT/NFT transactions, `mint`, `approve`, etc. In some special chains, like Flow, the authority is guaranteed by the owner of the resource account since the `msg.sender` is considered to be harmful, but it may be necessary to know the visitor of the source chain for the situations when the resources on Flow are visited from other chains.
Unfortunately, this mechanism for authority verification cannot be directly “shared” between multi-chain dApps without some special method. Dante Network has accomplished all the related mechanisms for multi-chain dApp developers, here is the detailed infor.
Based on the above two sublayers, the third sublayer called multi-chain service visiting is not so complicated. Similar to RESTful Webservice based on HTTP, it is more like an interface style.
Besides the general contracts developed in solidity for EVMs and some other languages(like Rust, CPP, js, etc.) for WASMs, there are some chains with special styles, like Flow, which is resource-oriented. All of these can be supported by Dante Networks as web3 services. So it will be much easier for dApps to make multi-chain interoperate.
The `Service presentation layer` is the closest layer to the users, so this is the most important layer for dApps. For multi-chain dApp developers, we think it’s not so necessary for them to understand the underlying implementation of all the mechanisms accomplishing the full picture of multi-chain interactions, just like there’s no need for us to understand what TCP/IP does in detail. Dante Network helps developers to focus on their own application businesses.