githubEdit

πŸ“‚Example of Asset Categorization

Let's take a typical FIBER call and add some example parameters to understand the flow of events.

circle-info

These are not actual FIBER call parameters. Some of these parameters will require querying the FIBER engine to getCABN, or ferrumNetworkIdentifer information.

The information below is just to demonstrate the logic used by FIBER to categorize and optimize swap paths across chains.

  1. sourceCABN: BUSD

  2. sourceFerrumNetworkIdentifier: BSC

  3. destinationCABN: USDT

  4. destinationFerrumNetworkIdentifier: Polygon

  5. amountSourceCABN: 100000000000000000000 (wei value)

  6. destinationAddress: 0xdestination

  7. slippage: 2% per chain (4% total)

  8. platformFeeCABN: BNB

  9. isFeeEnabled: true

FIBER Asset Categorization

When FIBER receives this call, it starts the process of categorizing the sourceCABN and destinationCABN. In order to categorize the FIBER engine conducts the following checks:

Drawing
FIBER Request - Asset Categorization

Foundry Asset Check (FAC)

Conducts abridgePool liquidity check on destination network to determine if the asset has sufficient liquidity available in the bridgePool to be categorized as a Foundry Asset for this swap.

Drawing
FIBER request - Asset Categorization - FIAC Flow

Refinery or Ionic Asset Check (RIAC)

Conducts if there is pair liquidity available with the bridgeable asset. i.e. Is it possible to convert user's asset to bridgeable asset in a single hop or swap. If the user's asset can be swapped for the bridgeable asset in a single hop, then the asset will be categorized as a Refinery Asset. Otherwise the asset will be categorized as an Ionic Asset.

Drawing
FIBER request - Asset Categorization - RIAC Flow

Aggregated Best Quote Check (ABQC)

aggregatedBestQuoteCheck a check for the best price on source and destination networks. Checks quotes from aggregators such as 1inch and compares those quotes against DEX quotes from DEX Router contracts. Suggest all options available rated from best to worst.

Drawing

Last updated