This article allows users to understand:
An overview of the role, advantages and operation process of order contracts;
How to query specific data conversion on the chain;
Why is the profit settlement of call orders the underlying asset, while that of put orders is USDT?
The role of LP in the system, security, and reasons for liquidity shortage.
01 Order Contract
In the JQ system, every time a user creates an option order,
A unique smart contract corresponding to the order will be created.
This smart contract is the [order contract] corresponding to the order.
From order creation to order settlement,
The premium collection and allocation, value conversion, profit settlement, and order status update involved in each option order are all carried out in the corresponding order contract.
02 Advantages of order contracts
Smart contracts can be automatically executed, improving the efficiency and accuracy of operations.
Moreover, the data on the chain is open and transparent and can be viewed at any time.
At the same time, the order contract adopts a decentralized approach with independent operations.
Effectively avoids the risks of single point failure and system errors.
The equal amount of assets for each order is independently controlled by its own order contract.
Rather than concentrating on a certain person or contract, it avoids excessive concentration of assets.
Ensure that funds are safe before options are settled.
In addition, Jasper's smart contracts have been audited by professional security companies (such as Knownsec and Slowmist).
Provides users with higher security.
Automatic execution, efficient and accurate;
The data on the chain is open and transparent and can be viewed at any time;
Independent operation and decentralization effectively avoid single point failure risks and system error risks;
Avoid excessive concentration of assets and ensure the safety of funds before option settlement;
Audited by professional security company, safety guaranteed.
03 Overview of the capital flow process in the order contract
For ease of understanding,
Here, the interaction between the order contract and LP is likened to a transaction.
Part 1: When creating an order
【Step 1: Pay the premium】
From the user AA wallet, send the premium to the order contract.
On-chain reflection: AA wallet sends a sum of USDT to the order contract.
【Step 2: LP Income】
Most of the premiums are sent to LPs as LP income.
On-chain reflection: The order contract sends a sum of USDT to LP.
【Step 3: Agreement Income】
A small portion of the royalties, as protocol income, is allocated to the Jasper protocol.
On-chain manifestation: The order contract sends a sum of USDT to the Jasper protocol.
[Step 4: “Transaction” with LP]
Call Option
At market price,
"Buy" the underlying asset corresponding to the option size from LP,
And there is no need to cash out USDT fees (for now).
For example: 0.2 ETH option size,
When creating an order, at the market price of 2600,
Spend 520 USDT to "buy" 0.2 ETH from LP,
However, the corresponding 520 USDT fee has not yet been paid.
On-chain reflection: The order contract receives an amount of underlying assets from LP corresponding to the option size.
Put Option
At market price,
"Sell" the underlying asset corresponding to the option size to LP,
And there is no need (for now) to deliver the underlying asset sold.
For example: option size of 0.2 ETH,
When creating an order, at the market price of 2600,
"Sold" 0.2 ETH to LP and obtained 520 USDT.
However, the corresponding 0.2 ETH underlying asset has not yet been delivered.
On-chain reflection: The order contract received a sum of USDT from LP with a value corresponding to the option size.
Note: Regardless of whether the order contract receives the underlying asset or USDT,
These assets will be locked in the order contract until the option expires.
Part 2: When options are settled
[Step 5: Complete the “transaction” with LP]
Profitable call option order
As the underlying asset appreciates in value,
Simply return a portion of the underlying assets initially received to the LP.
The USDT value of the underlying asset initially “purchased” can be redeemed.
For example: 0.2 ETH option size,
When creating an order, at the market price of 2600,
Spend 520 USDT to "buy" 0.2 ETH from LP,
However, the corresponding 520 USDT fee has not yet been paid.
When the option is settled, the market price is 2700.
Return 0.192592592593 ETH (worth 520 USDT) to LP,
The initial "purchase" cost is redeemed.
On-chain manifestation: The order contract sends this part of the underlying assets to LP.
Put option profit order
As the underlying asset depreciates,
At this point, only a portion of the USDT initially received needs to be returned to the LP.
The value of the underlying asset quantity initially “sold” will be delivered.
For example: option size of 0.2 ETH,
When creating an order, at the market price of 2600,
"Sold" 0.2 ETH to LP and obtained 520 USDT.
However, the corresponding 0.2 ETH underlying asset has not yet been delivered.
When the option is settled, the market price is 2500.
Return 500 USDT (worth 0.2 ETH) to LP,
The underlying asset that was originally “sold” is delivered.
On-chain manifestation: The order contract sends this part of USDT to LP.
No profitable orders
The underlying assets or USDT received from LP will be returned in full to LP.
【Step 6: Profit Settlement】
Profitable call option order
After completing the "transaction" with the LP, the amount of underlying assets remaining is
The profit of this option order is sent by the order contract to the user's AA wallet.
Therefore, the call option uses the underlying asset for profit settlement.
On-chain manifestation: The order contract sends this part of the underlying assets to the AA wallet.
Put option profit order
After completing the "transaction" with LP, the remaining USDT amount is
The profit of this option order is sent by the order contract to the user's AA wallet.
Therefore, put options use USDT for profit settlement.
On-chain manifestation: The order contract sends this part of USDT to the AA wallet.
No profitable orders
No settlement is required.
On-chain performance: Compared with profitable orders,
Unprofitable orders are missing a transaction sent from the order contract to the LP.
04 Find the order contract address
Settlement Hash
First, you need to find the hash value corresponding to the order in Jasper's transaction record.
If you need to view the on-chain data of an order, just click on the settlement Hash of the corresponding order.
ETH Call Order
In the To field of the Hash page,
Find 1 (or 2) ETH's [From ... To ...] records,
The From address is the order contract address.
ETH Put Order
In the ERC-20 Tokens Transferred of the Hash page,
There is 1 (or 2) USDT 【From … To …】 record,
The From address is the order contract address.
WBTC Call Order
In the ERC-20 Tokens Transferred of the Hash page,
Find 1 (or 2) WBTC 【From … To …】 records,
The From address is the order contract address.
WBTC put order
In the ERC-20 Tokens Transferred of the Hash page,
There is 1 (or 2) USDT 【From … To …】 record,
The From address is the order contract address.
05 Order contract interaction process demonstration
First, follow the above method.
Find the order contract in the order's settlement Hash page.
ETH call option profit order
On the settlement Hash page, directly click on the order contract to enter the data page.
Find [Inter Transactions] and [Token Transfers (ERC-20)].
ETH put order profit order
On the Settlement Hash page, directly click on the order contract, enter the data page, and find [Transfers].
WBTC call option profit order
Find and copy the order contract address and search it separately in the browser.
Find [Token Transfers (ERC-20)].
WBTC Put Option Profit Order
On the Settlement Hash page, directly click on the order contract to enter the data page and find [Transfers].
06.LP (Liquidity Pool)
In the Jasper system,
LP (Liquidity Pool) is a smart contract-driven liquidity pool that stores a large amount of underlying assets and USDT. It is used to provide liquidity and counterparty support for user option orders, supports the operation of the entire Jasper system, and is one of the core components of the Jasper system.
07.LP as a counterparty
When a user creates an order, LP automatically becomes the counterparty.
It provides the required underlying assets or stablecoins for users' option contracts, so that users do not need to wait for matching orders from other users, and the orders are automatically executed by smart contracts throughout the process, bringing users a smooth and low-latency trading experience.
It also ensures the settlement certainty of user orders - there is no counterparty risk. As long as the order is created successfully, the order will always be settled smoothly.
In the traditional trading model, transactions between users usually rely on a two-way matching mechanism.
That is, the buy order of one party needs to be matched with the sell order of the other party. If there is a lack of matching orders in the market, users may face the problem of insufficient liquidity, resulting in transaction delays or slippage, affecting the user experience.
LP acts as an instant and automated counterparty.
Intervention into the system changed this.
08. Bear the Profit and Loss
When users buy call or put options, LP bears the risk of price fluctuations and acts as the user's counterparty in all user orders rather than just providing financial support.
As the counterparty,
When the user suffers losses, LP receives premium income.
When the user makes a profit, the profit will be automatically settled to the customer and the corresponding loss will be borne.
Such a mechanism helps balance the risks and benefits of the system, and also enhances the market depth (trading at the best price) and stability (reducing the impact of slippage) of the system.
09.LP Shortage
Because it is different from the order book model of traditional CEX, LP needs to store sufficient spot assets (underlying assets and USDT) to transfer unleveraged and sufficient assets to the user's order contract and lock them when the user creates an order, as a "guarantee" for real money.
Each order needs to occupy a share of the spot assets in LP.
When encountering extreme market conditions and the price trend prediction is relatively certain (bullish, bearish, callback, rebound),
The transaction demand surges, and there may be a large number of short-term call or put option orders for the same underlying asset within a short period of time.
When the shares of the corresponding assets in LP are allocated by these orders, there will be a short-term shortage of LP and subsequent orders will not be able to be created.
LP will dynamically adjust and optimize operating strategies based on market trends, order volume, maturity/scale structure and other data to improve LP's capital utilization while meeting user trading needs.
Users can view real-time data of [Available Liquidity] on the 0DTE page.
10.LP Security
LP operates based on on-chain smart contracts.
All fund flows and transaction records are open and transparent and can be queried on the chain. Smart contracts are executed automatically, eliminating the risk of human manipulation and ensuring transaction security.
During the order execution process, users only need to transfer a small amount of premium, while LPs need to lock in unleveraged, sufficient total spot assets. From this perspective, LPs need to bear more potential security risks than users. Therefore, the Jasper system should also pay more attention to fund security in the design of LPs.