WingRiders is Using Cardano to Build a DEX Based on DAG-Based Technology. by@Cryptonite

WingRiders is Using Cardano to Build a DEX Based on DAG-Based Technology.

image
Cryptonite HackerNoon profile picture

Cryptonite

Cryptocurrency & Tech Writer.

Automated market maker (AMM)-based decentralized exchanges have become one of the most convenient ways to exchange crypto tokens.

The majority of these DEXs are built on top of account-based blockchains like Ethereum, with Uniswap being the first exchange built in this style.

However, there have been new innovations in how decentralized exchanges operate, with a new Cardano-based model known as the Extended Unspent Transaction Output (EUTXO) model.

With constant fees and formally validated deterministic behavior, Cardano's EUTXO model addresses some of the limitations of DEXs on other blockchains.

WingRiders is a decentralized exchange (DEX) that uses an AMM model as well as the EUTXO protocol. 

In this post we’ll look at the evolution of decentralized exchanges as well as the EUTXO protocol and the WingRiders platform.

The Workings of the Financial System

The financial world of today is highly centralized and regulated. This means that regulated institutions are in charge of your funds and are personally liable for them.

The processes, accounting, infrastructure and security levels of these commercial entities are all audited by government authorities.

Bank accounts are frequently insured, so consumers will not lose money if their bank goes bankrupt.

Users have faith in third parties such as banks, as well as the authorities' ability to adequately audit banks.

If the bank does not behave according to the rules and users are not satisfied, they can complain to the authorities. 

It is illegal and easily detectable for bankers to just take money from their customers. The government can also cancel the banks' licenses to run the service if there were severe issues.

Decentralization has brought about a new type of monetary exchange and we’ll look at that in the next section.

How Digital Asset Exchanges Have Evolved

Trading in digital assets is still dominated by centralized exchanges (CEXs). Private keys, exchange trading settings, user information, fund security, fees, and the exchange ratio are all under their custody.

These centralized exchanges use an order book to display buy and sell orders. Traders can use this order book to place orders which are then matched by a central market maker.

A certain matching procedure must be followed when matching buy and sell orders. Once a match is made, the trade between the two parties can begin. 

Orders can be of two types on exchanges that use an order book, “market” and “limit orders”. A market order is an order to buy or sell a token at the market's current best available price. 

A limit order is an order to buy or sell a token at a specific price or better. Buy limit orders can only be executed at the limit price or lower, and a sell limit order can only be executed at the limit price or higher.

As a result, the limit order can be held for a longer amount of time until market conditions meet the user's desired price.

Decentralized Finance (DeFi) has changed how users trade cryptocurrencies. Decentralized exchanges (DEXs) provide a non-custodial solution, as well as lower fees, anonymity and global availability for users.

Exchanges based on the Automated Market Maker (AMM) model offer automated asset trading through smart contracts. 

Users don’t need to trade with another user to fulfill their swap requests since orders are fulfilled automatically using tokens from a liquidity pool.

Liquidity pools are collections or “pools” of cryptocurrencies or tokens that are locked in a smart contract and used to facilitate trades between assets on a DEX. 

Tokens in a liquidity pool are provided by a liquidity provider who locks their tokens in the smart contract. In return, liquidity providers either earn fees or additional tokens for providing liquidity.

Liquidity Providers (LPs) need to deposit an equal amount of each cryptocurrency to their respective pools to provide liquidity.

This means that, for a pool with the pair ADA and token A, a liquidity provider must deposit $100 in ADA coins and $100 in A tokens.

The price of a token is set by algorithms based on a changing ratio in liquidity pools. User swap requests are directed to a pool of tokens that are identical. 

It is required to have enough tokens in the pools to be able to execute trades on the AMM exchange. 

To put it another way, pools need enough liquidity for a trader to successfully trade tokens in the respective pools.

AMM-Based DEXs are a simple solution for users to trade tokens using a non-custodial system.

WingRiders is an AMM-based DEX that builds on the Cardano network's stable foundations.

Their goal is to provide a secure platform that allows users to exchange native Cardano tokens without the usage of intermediaries or single points of failure.

The project is creating an infrastructure element with a decentralized exchange platform based on the Cardano blockchain.

Animoca Brands, the company behind Axie Infinity and The Sandbox, invested into the project alongside other investors including Bitrue and Spark Digital Capital.

WingRiders uses the EUTXO model to power its decentralized exchange ecosystem and we’ll look at how the EUTXO system works in the next section.

How the Extended UTXO Model Works

Before we can know how the EUTXO model functions, we first need to understand how the UTXO model works.

The flow of assets in a UTXO model is represented as a directed acyclic graph (DAG). 

Nodes represent the transactions and edges represent the transaction outputs, and each additional transaction consumes part of the UTXOs while adding new ones.

Users' wallets determine their balance by keeping track of a list of unspent outputs connected with all addresses they control.

In many ways, UTXO is identical to cash. For example, consider the following scenario: you have $100 in your wallet. 

This sum could be made up of a variety of different bills: four $20 bills and two $10 bills or eight $10 bills and four $5 bills, and so on. 

The sum ($100) remains the same regardless of the permutations. The same is true for UTXOs.

Any balance you have in your crypto wallet (for example, 500 ADA) can be built up using a variety of UTXO combinations based on prior transactions, but the total value remains the same.

In other words, a wallet address's balance is the total of all unspent UTXOs from prior transactions.

The EUTXO model extends the UTXO model in two ways:

1. EUTXO Uses the Lock-and-Key Analogy to Expand the Concept of 'Address.' 

Addresses in the EUTXO model can contain arbitrary logic in the form of scripts, rather than constraining locks to public keys and keys to signatures. 

When a node verifies a transaction, for example, it decides whether the transaction is permitted to use a specific output as an input. 

If the transaction can use the output as an input, the transaction will seek for the script provided by the output's address and execute it.

2. EUTXO Outputs Can Carry Almost Any Data

The second distinction between UTXO and EUTXO is that, in addition to an address and a value, outputs can carry (nearly) any data. By allowing scripts to carry state information, they become much more powerful.

EUTXO also expands on the UTXO model by allowing output addresses to contain complicated logic to determine which transactions are allowed to unlock them, as well as by allowing custom data to be added to all outputs. 

When validating an address, the script will look at the data carried by the output, the transaction being checked, and some additional data known as redeemers that the transaction supplies for each input. 

The script provides enough context to deliver a 'yes' or 'no' answer in what can be highly complex circumstances and use cases by digging up all of this information.

EUTXO allows for arbitrary logic to be expressed in the form of scripts. This arbitrary logic examines the transaction and data to determine whether or not the transaction can use an input.

The graph topology of the UTXO paradigm differs significantly from the account-based model employed by several existing smart-contract enabled blockchains.

As a result, design patterns for DApps on account-based blockchains do not easily adapt to Cardano. 

New design patterns are required because the underlying representation of the data is different.

Final Thoughts

Decentralized exchanges offer all of the same services as centralized exchanges, but in an anonymous and non-custodial manner.

Before the creation of Ethereum, traders had to rely on centralized systems to exchange cryptocurrency. However, smart contracts have ushered in a trustless and entirely open financial system.

The EUTXO model adds to this system by providing increased security, predictability in smart contract execution costs (avoiding unpleasant surprises), and more powerful parallelization.

When implemented appropriately, these technological advances have the potential to benefit all players economically.

Disclaimer: The content is this story is provided by an independent contributor.


Welcome to the Decentralized Internet Contest!

Comments

Signup or Login to Join the Discussion

Tags

Related Stories