Atomic Swap API

The Orion protocol's Atomic Swap API section provides a collection of endpoints that simplify the creation and management of atomic swaps:

POST /api/v1/atomic-swap - This endpoint is used to submit a lock order to begin an atomic swap transaction. A lock order is the first stage in the atomic swap process, in which one side produces a secret and uses the hash of the secret to lock the swap. This API needs a JSON object with a "secretHash" and a "sourceNetworkCode", where "secretHash" represents the hashed secret and "sourceNetworkCode" provides the network code of the source blockchain.

GET atomic-swap/api/v1/history/all - This endpoint retrieves the whole history of all atomic swaps. The information supplied includes both current and finished swaps. The query parameters "sender" and "limit" allow users to filter results depending on the sender's address and limit the number of returned swaps, respectively.

GET /api/v1/atomic-swap/history/current - This API retrieves active atomic swaps connected with a certain sender. The query parameter "sender" is used to filter active atomic swaps depending on the sender's address.

POST /api/v1/atomic-swap/balances - This endpoint returns the tradable balances for atomic swaps maintained by brokers. This information may be used to estimate the amount of liquidity available for atomic swaps.

Overall, this API area enables users to make atomic swaps, get swap histories, and verify available liquidity, hence improving interoperability between blockchain networks.

Orion Bridge

The first L1-to-L1 bridge that is genuinely decentralized, constructed on a peer-to-peer architecture and utilizing atomic swaps technology. Ensures that money are immediately available for trading purposes. Reduce your costs by a factor of one hundred. Start your cheapest trading in a matter of seconds here.

Limits

There is no maximum quantity, and there are no boundaries, and the entire capacity is only constrained by the liquidity of the brokers' network.

Time/Delays

Time required for deposits is immediate (tokens are made accessible for trade once a user transaction has been mined).

The withdrawal time is immediate.

Fee

No fees

Only requires a total of two inexpensive transactions: one on the source chain (where the gas limit is equivalent to one ERC20 transfer), and another on the destination chain (where the gas limit is equivalent to three ERC20 transfers).

Security

Ultimate security due to the fact that it is a peer-to-peer system, which means that you may only trade tokens with one counterparty. There is no reliance on validators or any other L2 network of nodes.

The process of swapping is carried out in an atomic manner, which means that you will first be given tokens on the destination network, and then you will be given tokens from the source network.

Note: Only native tokens on L1 blockchains can be swapped; wrapped tokens are not supported.

Last updated