Solution for BTC Lightning Network DEX

The BTC Lightning Network is Layer 2 running on the BTC mainnet, allowing faster Bitcoin payments by processing transactions away from the main blockchain, while maintaining the same decentralization and security. The Lightning Network can process transactions more than 140,000 times faster than the BTC mainnet, with extremely low transaction fees. Cross-blockchain is also a major feature of the BTC Lightning Network. Cross-chain atomic swaps can occur immediately off-chain through heterogeneous blockchain consensus rules. As long as the chain can support the same encrypted hash function, it can be used without trusting a third party. Transactions across blockchains without a custodian. This gives BTC Lightning Network DEX (Decentralized Exchange) room to grow. Below we introduce the solution of BTC Lightning Network DEX.

Portal

For DEXs, the most fundamental is the availability of smart contracts. Smart contracts have always been difficult to implement on the BTC network. The solution to this Portal is to build a Layer 3 on the BTC mainnet and Layer 2. The underlying protocol of Portal is Fabric peer to peer Network. Fabric is a Layer 3 peer-to-peer computing marketplace. This system achieves ephemeral computing infrastructure on different blockchains (BTC, ETH, etc.) by using smart contracts.

Solution for BTC Lightning Network DEX

Image source: https://docsend.com/view/pdk55ecxmuewiy8f

Portal ensures the execution of the order book through a zero-knowledge proof system, unifying and matching transaction orders to aggregate the liquidity of traders on decentralized financial applications.

Portal launched the “atomic swap” peer-to-peer contract, through which the peer-to-peer exchange can have the speed, availability and liquidity of centralized alternatives.

Classic Tier Nolan Atomic swap mode

Solution for BTC Lightning Network DEX

Image source: https://docsend.com/view/pdk55ecxmuewiy8f

Portal’s L2 and L3 atomic swap technologies can be used in general markets for informational data and computing. Portal’s goal is to replace the Web server model that is easy to centralize in design and architecture with a free data and computing marketplace. The underlying protocol Fabric used by Portal extends the functionality of Bitcoin without the need for any BIPs (Bitcoin Improvement Proposals,).

1) Information data marketplace, where L3 contracts called Tiny that store data in a decentralized manner replace the web server model, where fees provide resistance to information censorship.

2) A computing marketplace where users can deploy complex programs for blinded execution by a network of peers. Portal swaps pay out bound bitcoins when a “computing request” is answered. A contract secures performance and proof of payment by either party.

Solution for BTC Lightning Network DEX

Image source: https://portaldefi.com/

Portal supports peer-to-peer, decentralized, censorship-resistant applications as Bitcoin’s Layers. This system allows for the secure establishment and execution of peer-to-peer agreements, including financial contracts (spot, lending, crowdfunding, and cryptocurrency derivatives) or non-financial contracts (communication networks, social media, etc.).

Currently, there is only one L2 swap protocol in Portal, Arwen. Arwen is designed for centralized exchanges and their users. In its model, a centralized exchange is not an “exchange” but just a trading desk or OTC desk. On Arwen, both users and exchanges are required to lock their coins on an on-chain escrow contract and pair their escrow by exchanging their respective public key hashes (PKH). All transactions therefore involve off-chain passage of token transfers. Among them, there is only the interaction between the two, and the custody of the two will end after the quota update is completed. The entire transfer process is fast and close to zero cost.

Disadvantages of Arwen Protocol:

  • Still relying on centralized exchanges, the protocol still cannot guarantee 100% transaction security, and the protocol currently has no rational economic incentive mechanism to mitigate risks;
  • Arwen is specially designed for centralized exchanges, those anonymous point-to-point cross-chain exchanges cannot use Arwen;
  • Incompatible with the exchange business model, Arwen required centralized exchanges to become trading desks and market makers, which changed their existing business model.

Mintlayer

In order to improve the token interoperability of the BTC network and enable native BTC exchange, Mintlayer uses the sidechain situation to achieve this purpose. It also provides several features to strengthen network security, increase node inclusivity, and ensure long-term sustainability. Mintlayer is a tokenization layer built on top of Bitcoin that supports interaction with BTC’s Layer 1, Layer 2 Lightning Network.

Solution for BTC Lightning Network DEX

Image source: https://docs.mintlayer.org/whitepaper/1-blockchain-architecture

The Mintlayer blockchain is anchored to Bitcoin: each Mintlayer block has a reference to a Bitcoin block. In each round of Mintlayer lasting 1008 Bitcoin blocks, participants are selected from stakers to cooperate in creating blocks on the chain.

Users who decide to actively participate in the consensus of the network need to run a node and stake enough MLT tokens to pass the minimum threshold. Each round, the algorithm automatically performs an election where users can be elected as “participants”. The higher the token stake, the greater the chance of being selected. At a specific time in each round, each participant is required to build and propagate a block, and all transaction fees will be charged. The long-term security of the Mintlayer chain is guaranteed by the checkpointing system on the Bitcoin blockchain.

Solution for BTC Lightning Network DEX

Image source: https://docs.mintlayer.org/whitepaper/1-blockchain-architecture

This can use the Mintlayer blockchain as a second layer to other blockchains like Bitcoin or Ethereum. Central entities can wrap tokens on Mintlayer: they lock the funds on the main blockchain, creating a corresponding amount of MLS-01 or MLS-02 tokens. An independent oracle can prove that there is a corresponding amount of locked tokens on the main chain. In this way, confidential tokens such as m-BTC or m-ETH can be created on Mintlayer.

Mintlayer  can also implement Strong Federations (like Liquid) to issue packaged tokens and confidential assets. The federated loop updates the lock time of the transaction (nLockTime on Bitcoin), freezes the funds in the multi-signature UTXO, and creates the corresponding token on Mintlayer. There is always the possibility of tokens being pegged: in this case, Mintlayer tokens are burned, while the original cryptocurrency is unlocked on the main network and available to the original owner.

Developers are free to use a combination of ACLs, programmable pools and oracles to create more complex smart contracts on the Mintlayer chain and tie the issuance or existence of MLS-01 tokens to the corresponding amounts locked on other blockchains fixed (or even auto-bonded) MLS tokens through oracles with assets that exist outside of the digital realm).

Mintlayer uses the Bitcoin UTXO structure instead of Ethereum, Ripple, Stellar or other account-based models.

The UTXO model was chosen because of three basic characteristics:

1) It is compatible with technologies already implemented in Bitcoin, such as Atomic Swap and Lightning Network.

2) It’s more privacy-focused, as a single wallet often uses multiple addresses, making it difficult or even sometimes impossible to distinguish which addresses belong to the same user.

3) Payments can be batched (aggregated) in a single transaction, saving a lot of space that would otherwise be required for a single transaction per payment.

MLS-01 tokens and MLT are only transferred on the Mintlayer sidechain and do not need to occupy the Bitcoin blockchain.

Different transaction functions of MLS-01 standard port:

1) Access Control List (ACL), which can impose specific restrictions on the transaction of specific cryptocurrencies. ACLs facilitate the issuance or renewal of security tokens based on company policy or other legal requirements, similar to what is done on Ethereum’s ERC-20: receiving addresses can be whitelisted or blacklisted. However, applications may be broader: they may concern the conditions of use of utility tokens or determine the non-fungibility of tokens. For example, making it impossible for each transaction to transfer a certain amount of tokens under minimum or maximum thresholds, or enforcing time locks that limit the transferability of tokens at a specific time.

2) All tokens managed by the Mintlayer wallet are Lightning Network enabled. Since Mintlayer’s codebase is inherited from Bitcoin with some minor changes, the Lightning Network wallet functionality uses the same BOLT specification as Bitcoin. It is expected that most security tokens exchanged on the Mintlayer network will not use the Lightning Network, as it is difficult to develop a well-distributed channel network for tokens that are traded infrequently and are less liquid than monetary use. Nonetheless, Lightning Network’s use case for Tether transactions and other stablecoins does have a good chance of success, especially since they are often transferred between custodial services/exchanges that have a greater chance of creating an equalization channel.

3) Point-to-point batch processing. Mintlayer has developed two different tools within the wallet to incentivize the use of batching: a unique user interface that helps services/enterprises such as exchanges to batch trade at scale (all MLS-01 tokens); a peer-to-peer batching system , inspired by Wasabi’s coinjoin, where users can send one or more tokens to one or more destination addresses while combining transactions with other users. Users can aggregate transactions using different MLS-01 tokens and use signature aggregation to reduce the size of each payment by 70%.

4) Mintlayer bypasses the unreliability of the classical atomic swap time lock (nLockTime parameter on Bitcoin) by introducing a reliable cross-chain Bitcoin atomic swap. Because of its structure as a Bitcoin sidechain, each Mintlayer block carries a reference to the Bitcoin blockchain. The nLockTime of the two transactions that return coins to the sender is calculated based on the exact number of Bitcoin blocks calculated on both chains. Atomic swap technology is the foundation of the decentralized swap concept. Mintlayer implements it for cross-chain DEX transactions (between two MLS-01 tokens) or intrachain transactions (between BTC and MLS-01 tokens). The wallet also provides a CPFP (child pays for parent) function, which can speed up atomic swap transactions if you get stuck in the mempool because the fees are too low. For example, wallets can collaborate with watchtowers (even controlled by the user themselves, or by service providers/oracles) to notify the user when a transaction spend output is delayed and suggest an appropriate CPFP transaction fee amount.

5) A gas-free economic environment. The default fee for any transaction on Mintlayer is set to MLT unless the user chooses otherwise. In this case, the fee is automatically expressed in tokens transferred by the user. Of the tokens available in the wallet, the user can still decide which token to use to pay for the fee. Most block signers are expected to accept all major MLS-01 tokens. (Considering that the fee economy is a free market, block proposers have an incentive to accept any token as long as it has an accepted value in the market. Instead, transactions left over may be picked up by the next block signer.) This This game-theoretic mechanism could lead to rejection of illiquid tokens, constituting an effective spam filter. When preparing a transaction, the wallet UI suggests a fee amount for each token based on an algorithm that analyzes Mintlayer’s mempool and past transactions. Block makers can also signal if they will accept new tokens in the next block they will produce.

The principle of MLS-02, which focuses on Confidential transactions, is as follows: By implementing Bullet-proof confidential transactions using ring signatures, tokens can be issued on the network, which is a feature of the tokenization standard MLS-02. The issuance of Confidential Transaction-enabled tokens is a guarantee of privacy and anonymity. However, unless privacy is really needed, this is discouraged because of the trade-offs: CT takes up more space (higher fees), requires more resources for verification, and cannot be batched in multiple-paying transactions. Thanks to the peg mechanism, it is possible to issue confidential versions of other cryptocurrencies, such as m-BTC or m-Ether, to transfer already existing cryptocurrencies with greater anonymity.

Mintlayer’s UTXO model grants a certain level of confidentiality even when tokens are issued without implementing the CT method:

1) An account/wallet can have multiple independent addresses;

2) Lightning Network transactions provide higher privacy;

3) Peer-to-peer batching effectively mixes the inputs, outputs, and signatures of different users, making chain analysis more difficult.

Relying on the above features, Mintlayer can tokenize equity, real estate and other assets in the primary and secondary markets using a legal and compliant technical framework. It supports taxation, investment spending, and other token economics models for utility tokens.

Summarize

Portal and Mintlayer can also collaborate with each other to provide users with a private, secure, and affordable way to interact with the DeFi ecosystem. Adding sidechain assets to Mintlayer will increase the number of trading pairs available on Portal DEX, making its assets accessible to a wider client base through Portal’s censorship-resistant cross-chain exchange, which also benefits Mintlayer.

The current market value of BTC accounts for more than 40% of the total market value of cryptocurrencies, while Ethereum, as the main chain of DEX, the market value of its token ETH accounts for less than 20% of the total market value of cryptocurrencies. DEX still has a lot of native liquidity that has not been mined. The BTC Lightning Network and projects such as Portal and Mintlayer built on top of BTC Layer 1 and Layer 2 are bringing these native liquidity into the DEX trend. We will continue to pay attention to the development of Bitcoin DEX.

references:

https://docsend.com/view/pdk55ecxmuewiy8f

https://portaldefi.com/

https://www.mintlayer.org/en/

https://docs.mintlayer.org/whitepaper/1-blockchain-architecture

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/solution-for-btc-lightning-network-dex/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2022-07-29 10:11
Next 2022-07-29 10:14

Related articles