Uniswap's main operating income is transaction fees. In Uniswap V1, users will be charged 0.3% of the transaction value (GMV) each time they exchange tokens. Starting from Unisethereum 2.0 kapan riliswap V2, the agreement splits the transaction fee of the above-mentioned "0.3% of the transaction volume", in which the liquidity provider will receive 0.25% of the transaction volume income, and the remaining 0.05% will go to UNI token holders. Someone. For V3, when adding liquidity, there are 3 levels of fee rate to choose from: 0.05%, 0.3% and 1%.
Trusted: Participants do not need to mortgage assets, btt price prediction quoraand users cannot retrieve assets when the system fails or commits malicious behavior. Therefore, security mainly depends on the reputation of the bridge operator."External validators and federalism" are generally better in terms of state and connectivity because they can trigger transactions, store data, and allow data to interact with any number of target chains. However, this comes at the cost of security, because by definition, users rely on the security of the bridge rather than the source or target chain. Although most of the current external validator mechanisms are based on trust models, some require collateralized assets, and a subset of assets is used to insure end users. Unfortunately, their insurance mechanisms are usually reflexive. If the agreement token is used as collateral, it is assumed that the value of the token is sufficient to compensate the user's loss. In addition, if the mortgage asset is different from the insurance asset, it will also depend on the price flow of the oracle, so the security of the bridge will be downgraded to that of the oracle. If a trust model is not required, these bridges are also the least capital efficient, because they promote economic throughput and also need to scale up the scale of collateral.
"Light client and relay" is also better in terms of state, because the block header relay system can transmit any type of data. Although there are liveness assumptions due to the need for repeaters to transmit information, they are also very safe because they do not require additional trust assumptions. At the same time, they are the most capital efficient bridges because there is no need to lock any assets. However, these advantages come at the expense of connectivity. Every time a pair of chains is connected, the developer must deploy a new light client smart contract on the source chain and the target chain. The complexity of the contract is between O(LogN) and O(N) (the reason is between this The scope is because it is relatively easy to add chain support using the same consensus algorithm). There is also a significant speed flaw in the optimistic model that relies on fraud proofs, which may increase the delay to 4 hours."Liquidity networks" are strong in terms of security and speed because they are locally verified systems (that is, global consensus is not required). They are also more capital efficient than the external validator mechanism of the mortgage/insurance mechanism, because capital efficiency is related to transaction flow/volume, rather than security. For example, assuming that the transaction flows of the two chains are equal, and given a built-in rebalancing mechanism, the liquidity network can contribute to an arbitrarily large economic throughput.The trade-off lies in the state, because although the call data can be transmitted, its function is limited. For example, they can interact with data across chains, where the receiver has the right to interact based on the provided data (for example, using the signature information from the sender to call a smart contract), but there is no "owner" of the data for the transmission or the transmission belongs to Generalized state data (such as minting representative tokens) is not helpful.Building a strong cross-chain bridge is a difficult problem in distributed systems. Although there have been many attempts in this field, there are still some problems to be solved:Finality & rollbacks: In a chain with probabilistic finality, how does bridging deal with block reorganization and time thief attacks? For example, if any chain has experienced a state rollback, what will happen to users who send themselves from Polkadot to Ethereum?
NFT transfers & provenance: How can bridges trace the provenance of NFT across multiple chains? For example, if there is an NFT that has transacted in multiple markets of Ethereum, Flow, and Solana, how are all these transactions and owners recorded?Stress testing: In the case of chain congestion or protocol and network level attacks, how will various bridge designs respond?In addition to sending messages between chains, XCM is also useful in other contexts. For example, because XCM is abstract and universal, it can be used as a means for wallets to provide a durable transaction format for creating many common transactions. For chains with little business logic changes (such as Bitcoin), the transaction format or the format used by the wallet to send instructions to the chain will generally remain the same.
XCM aims to be a language for the exchange of ideas between consensus systems. It should be generic enough to remain correct and useful throughout the evolving ecosystem. It is extensible, and extensibility means changeable, and it also means forward compatibility. It can run efficiently on the chain and can run in a metering environment.XCM can be used in a variety of systems, including gas metering smart contract platforms and community parachains, and trusted interactions between system parachains and their relay chains.Although the goal of XCM is universal, flexible and future-oriented, it must of course meet actual needs, especially the transfer of tokens between chains. Throughout the DeFi world, optional fee payment is very common. You can use the XCM language to perform some specific operations.Importantly, there are many token transfer models that we hope to support: it may only be necessary to simply control the account on the remote chain, allowing the local chain to have an address on the remote chain to receive funds and ultimately transfer the funds under its control to that remote In other accounts on the chain.
But there may be two consensus systems in this process, both of which are specific token systems. For example, tokens such as USDT or USDC have instances on several different chains and are completely interchangeable. It should be possible to destroy such tokens on one chain and mint corresponding tokens on another supported chain. In XCM, it can be called teleport, because the transfer of assets is actually achieved by destroying it on one side and creating a clone on the other side.The core of the XCM format is XCVM. This stands for cross-consensus virtual machine. This is an ultra-high-level non-Turing complete computer whose instructions are designed to be roughly at the same level as transactions.
The "message" in XCM is actually just a program running on XCVM. It is one or more XCM commands. The program will continue to execute, and will not end and stop until it runs to the end or encounters an error.The position in XCM is hierarchical, and some parts of the consensus are completely encapsulated into separate parts. For example, the Parachain of Polkadot completely exists in the internal position of the entire Polkadot consensus. As long as there is any change in one consensus system, it means a change in another consensus system, and the former system is the internal system of the latter.When working in XCM, it is usually necessary to quote some kind of asset. This is because almost all existing public blockchains rely on some native digital assets to provide the backbone for their internal economic and security mechanisms. For proof-of-work blockchains such as Bitcoin, native assets (BTC) are used to reward miners who develop the blockchain and prevent double spending. For proof-of-stake blockchains such as Polkadot, native assets (DOT) are used as a form of collateral, and network administrators (called equity holders) must take risks to generate valid blocks and obtain physical rewards.Expense payment in XCM is a very important use case. Most parachains in the Polkadot community will require their interlocutors to pay for any operations they wish to perform to avoid "spam" and DDOS.
When chains have good reasons to believe that their interlocutors are trustworthy, they can also not pay. For example, this is the case when the Polkadot relay chain communicates with the Polkadot Statemint public interest chain. However, in general, fees are a good way to ensure that XCM messages and their transmission protocols will not be overused.Let's take a look at how to pay when XCM messages arrive at Polkadot.For systems that do need to pay a certain fee, XCM provides the ability to use assets to purchase execution resources. In a nutshell, this includes three parts:Provide some assets
Exchange assets in terms of computing time (weight in Substrate).XCM follows the instructions
After years of research and development, we finally formed a multi-chain market structure. There are currently more than 100 active public blockchains, many of which have their own unique applications, users, geographic distribution, security models, and design trade-offs. Regardless of what individual communities believe, the reality is that the universe tends to increase entropy, and the number of these networks is likely to continue to increase in the future.This type of market structure makes it necessary for us to obtain interoperability between different networks. Many developers have realized this, and the number of blockchain bridges surged last year, aiming to bring together increasingly fragmented networks. As of this writing, there have been more than 40 different bridging projects.
Interoperability unlocks innovation possibilitiesWith the development of a single ecosystem, they will develop their own unique advantages: stronger security, greater throughput, cheaper transaction fees, better privacy, specific resource supply (such as storage, computing, bandwidth), and Regional developer and user communities, etc. Bridges are important because they allow users to access new platforms and protocols; enable interoperability between protocols; allow developers to collaborate to build new products, and so on. More specifically, they have the following benefits:Improve the productivity and utility of existing crypto assetsBridging allows existing encrypted assets to be transferred to a new platform to do new things. like:Send DAI to Terra to buy synthetic assets on Mirror, or earn revenue on AnchorSend TopShot from Flow to Ethereum as collateral for NFTfi
Use DOT and ATOM as collateral to lend DAI on MakerExpand the product features of existing agreements
Bridging expands the design space that the protocol can implement. E.g:Use Yearn vaults for liquid mining on Solana and Avalanche
NFT cross-chain sharing order book on Ethereum and Flow on Rarible ProtocolIndex Coop's proof of equity index
Unlock new feature use cases for users and developersBridging gives users and developers more choices. like:Arbitrage the price of SUSHI across DEX on Optimism, Arbitrum and PolygonUse Bitcoin to pay for Arweave storage fees
Bid NFT on Tezos with PartyBidFrom an abstract perspective, a bridge can be defined as follows: a system that transmits information between two or more blockchains. And "information" can refer to assets, contract calls, proofs, or status. Most bridge designs consist of the following parts:
Monitoring: There is usually a participant (or a "oracle", "verifier", "relayer") monitoring the status of the source chain.Message delivery/relay: After the participants receive the event, they need to transfer information from the source chain to the target chain.
Consensus: In some models, in order to forward information to the target chain, a consensus must be reached between participants monitoring the source chain.Signature: Participants need to encrypt and sign the information sent to the target chain, which can be single-signatured or as part of a threshold signature scheme.
There are roughly four types of bridging schemes, each of which has its advantages and disadvantages:Asset-specific: The sole purpose of this bridge type is to provide access to specific assets on external chains. These assets are usually "wrapped" assets (assets that are fully mortgaged by the underlying assets in custody or non-custody). Bitcoin is the most common asset bridged to other chains, and there are seven different bridges on Ethereum alone. This kind of bridging is the easiest to achieve, and obtain huge liquidity from it. But its functions are limited and need to be re-implemented on each target chain. Examples are wBTC and wrapped Arweave.Chain-specific: A bridge between two chains, which usually supports the locking and unlocking of tokens on the source chain and the casting of arbitrary encapsulated assets on the target chain. Due to the limited complexity of these bridges, they can usually be marketed faster, but they are not easy to expand into the broader ecosystem. The use case is Polygon’s PoS bridge, which allows users to transfer assets from Ethereum to Polygon and vice versa, but only on these two chains.Application-specific: An application that provides access to two or more blockchains, but only for use in that application. The advantage of this kind of application itself is that the code base is small; instead of having a separate instance of the entire application on each blockchain, there are usually more lightweight and modular on each blockchain "Adapter". A blockchain that implements an "adapter" can access all other blockchains it is connected to, so there is a network effect. Their disadvantage is that it is difficult to extend this function to other applications (for example, from lending applications to transaction applications). Specific use cases are Compound Chain and Thorchain, which respectively build independent blockchains dedicated to cross-chain lending and transactions.
Generalized: A protocol designed to transmit information across multiple blockchains. Due to its low complexity, this design enjoys a strong network effect-a single integration of the project allows it to access the entire ecosystem within the bridge. The disadvantage is that some designs usually trade-off between security and decentralization to achieve this scalability effect. This may have complex and unexpected consequences for the ecosystem. One of the use cases is IBC, which is used to send information in two heterogeneous chains (with a guarantee of finality).In addition, according to the mechanism used to verify cross-chain transactions, there are roughly three types of bridge designs:
Type 1: External validators & Federations (External validators & Federations)This type of bridging scheme usually has a group of verifiers that monitor the "mailbox" addresses on the source chain and perform operations on the target chain based on consensus. Asset transfer usually works like this: lock assets on the "mailbox", and then mint the same amount of assets on the target chain. These validators usually deposit separate tokens as collateral to ensure the security of the network.
Type 2: Light clients & RelaysParticipants monitor events on the source chain and generate encrypted packaging proofs about past events recorded on the chain. These proofs will be forwarded to the contract on the target chain (such as "light client") along with the block header, and then verify whether an event is recorded, and perform operations after verification. This design mechanism requires some participants to "relay" the block headers and proofs. Although users can "self-relay" transactions, there is indeed an active assumption that the relay will continue to forward data. This is a relatively secure bridging design because it guarantees the effective delivery of trustlessness without trusting intermediate entities. But it is also resource-intensive, because developers must build a new smart contract on each new target chain to parse the source chain's state proof; the verification process itself requires a large amount of gas.