Market
Introduction
On Joint protocol, a market is a virtual place where users meet to exchange one asset for another. A market is the centre point of all trading activities on the Joint protocol.
The Joint protocol market allows users to add any amount of a specific ERC-20 token they want to sell, and then other users can buy that token with another ERC-20 token they own.
Market Pair
A market is composed of two tokens — one of the tokens is known as the base token, while the other is called the quote token.
The base token is the liquidity token priced in the quote asset. For example, in an ETH/USDT market, the base token is ETH, while the quote asset is USDT. So users who want to buy ETH will have to pay USDT to get it.
Any ERC-20 tokens can be matched with another ERC-20 token to form a pair. Additionally, an ERC20 token can represent any off-chain asset (a synthetic token).
Market Creation
As a permissionless system, a market can be created by anyone for free. It will only cost a transaction fee paid to the blockchain miners to execute the contract call. Once the market has been created, only the creator can update the properties of the market.
Liquidity
Liquidity is the number of base tokens supplied to a market. When there is sufficient liquidity, users can purchase any amount at a price specified by the liquidity provider. A user who adds liquidity to a market is known as a Liquidity Provider.
Types of Market
There are two types of markets supported by the Joint Protocol:
- Open: An open market allows anyone to trade. There are no limits or restrictions in this type of market. Anyone can interact with the market.
- Permissioned: A permissioned market restricts some features to users that have been added to an allowlist. It is designed to replace private P2P marketplaces on messaging applications with a more trust-minimised experience.
Mediation
Mediators are integral to the success of a decentralised P2P marketplace where one asset cannot be tracked because it exists off-chain. The Joint protocol has a mediation system that allows individuals or organisations worldwide to offer mediation services as long as they have staked sufficient capital that will be slashed and burned when they err.
Mediator security bond
Markets are free to set the minimum security a mediator must have staked before they are allowed to join as mediators. The higher the mediators’ total security bond of a market, the safer it is to trade.
Minimum Mediators
Apart from the mediator security bond, a market creator can set the minimum number of mediators a dispute can have. By default, the value is set to 3, doubled for every dispute re-appeal, and capped at 32. The doubling of mediators guarantees that for every new re-appeal, the quality of mediation is increased.
The maximum number of mediators that can join a market is 256.
Market Fee
A market creator can specify a percentage deducted from every trade as their fee.
Market fee incentivises legacy trading platforms, escrows and private trade communities to adopt the Joint protocol without losing their ability to receive fees.
When both tokens of a market exist on-chain (ex: ETH/USDT), the market fee will be deducted from the base token (ETH). But if one token represents an off-chain asset (ex: USDT/JYP), the fee will be deducted from the existing on-chain (USDT) token.
Protocol Fee
Like the Market Fee, the protocol fee is deducted from every trade. However, the protocol fee is mandatory and applies to all trades across all markets. Most protocol fees are distributed to P2P token holders, while a fraction is reserved as royalties to Joint protocol inventors.
Market Permissions
Joint protocol markets can be either open or permissioned. When the default configuration is used, a market is considered open; anyone is allowed to provide liquidity, swap and join as a mediator.
Once a market enables permission by restricting who can provide liquidity, swap or join as a mediator, it is considered permissioned.
By default, the Joint Team interface will not showcase permissioned markets unless explicitly requested by the user.
Permissions can only be configured at market creation time.
Permissioned Swap
When a market creator wants to limit swapping to a select number of wallets, they can turn on permissioned swap. When enabled, only wallets that have been added to the allowlist will be able to swap.
Permissioned Liquidity Provisioning
When a market creator wants to provide their own liquidity or have a list of wallets that will provide liquidity, they can enable permissioned liquidity provisioning. When enabled, only wallets that have been added to the allowlist will be able to provide liquidity.
Permissioned Mediation
In some cases, a market creator may want to use their own mediation service (e.g. a centralised exchange) or want to employ the service of a professional mediation service provider. They can enable permissioned mediator service at market creation time to achieve this.
To add a mediator, the market creator must first invite the mediator, and then the mediator must accept the invitation before proceeding to join the market with their mediator ticket.
Unlike an open market, mediators are not doubled in a dispute re-appeal.