User off-chain swap

The ADA-USDT market configurations for an off-chain swap with an external exchange connection

Screenshot from 2024-06-18 13-56-56.png

Swap Base to Quote

 

  • Broker balance overview

The responsible Administrator can observe the available Broker trading balance in both ADA and USDT. Additionally, there should be support to ensure that the broker trading balance is sufficient to cover user requests.

Screenshot from 2024-06-18 14-59-12.png

 

  • Swap creation, User balance changes and swap history

There is an available User balance in both ADA and USDT before the creation of a swap.

 

First, there is a need to obtain a Quota, which is information about the price at which currency can be exchanged.

 

Then, there is a need to confirm the Quota during its lifetime of 10 seconds. After 10 seconds, the Quota will be updated with fresh data.

 

On the user interface (UI), the user observes a Quick Swap form with an auto-updating quote every 10 seconds and confirms the Quota by clicking on the Swap button.

 

After the Swap, there remains an available User balance in both ADA and USDT.

 

There is a Swap History for a User Query with main details for a Base to Quote off-chain swap operation:

 

Users can observe Swap history details on UI: Market pair, Date, Type of operation, “Send” Amount, “Receive” Amount, Rate, Status

 

  • Off-chain Swap Operation details in Admin Panel

Operation Details shows the Administrator expanded details of the operation: Type, Parent Operation (if applicable), Status, Amount: Input order, Output order, User, Date, Documents(transactions): links to order details Description.
Ledger Records (subsection below) displays detailed accounting data for the operations entered in system ledger records: Account number, Debit, Credit, Counterparty, Description, Created, Operation: field for special information for the operation.

 

  • Broker history and balance overview

The responsible Administrator can observe the main details for the Broker's Convert operation.

There is an available Broker trading balance in USDT after the Convert operation. The trading balance in ADA equals 0

 

The user received an incorrect Quota. Swap Base to Quote

 

Possible errors could include:

  • Exceeding the maximum amount limit.

 

  • Failing to meet the minimum amount requirement.

 

  • The market not being found or having enabled = false or offChainSwapEnabled = false.

 

  • Service error - unable to retrieve the Quota.

  • The low available balance for operation

 

Swap Quote to Base

 

  • Broker balance overview

The responsible Administrator can observe the available Broker trading balance in USDT. The trading balance in ADA equals 0. Additionally, there should be support to ensure that the broker trading balance is sufficient to cover user requests.

 

  • Swap creation, User balance changes, and swap history

There is an available User balance in both ADA and USDT before the creation of a swap.

 

First, there is a need to obtain a Quota, which is information about the price at which currency can be exchanged.

 

Then, there is a need to confirm the Quota during its lifetime of 10 seconds. After 10 seconds, the Quota will be updated with fresh data.

 

On the user interface (UI), the user observes a Quick Swap form with an auto-updating quote every 10 seconds and confirms the Quota by clicking on the Swap button.

 

After the Swap, there remains an available User balance in both ADA and USDT.

 

There is a Swap History for a User Query with main details for a Quote to Base off-chain swap operation:

 

Users can observe Swap history details on UI: Market pair, Date, Type of operation, “Send” Amount, “Receive” Amount, Rate, Status

 

  • Off-chain Swap Operation details in Admin Panel

Operation Details shows the Administrator expanded details of the operation: Type, Parent Operation (if applicable), Status, Amount: Input order, Output order, User, Date, Documents(transactions): links to order details Description.
Ledger Records (subsection below) displays detailed accounting data for the operations entered in system ledger records: Account number, Debit, Credit, Counterparty, Description, Created, Operation: field for special information for the operation.

 

  • Broker history and balance overview

The responsible Administrator can observe the main details for the Broker's Convert operation.

 

There is an available Broker trading balance and a trading locked balance in both ADA and USDT after the Convert operation.

 

The user received an incorrect Quota. Swap Quote to Base

 

Possible errors could include:

  • Exceeding the maximum amount limit.

 

  • Failing to meet the minimum amount requirement.

 

  • The market not being found or having enabled = false or offChainSwapEnabled = false.

 

  • Service error - unable to retrieve the Quota.

 

  • The low available balance for operation