referrerpolicy=no-referrer-when-downgrade

Type Alias BalancePath

Source
pub type BalancePath<T> = Vec<(<T as Config>::AssetKind, <T as Config>::Balance)>;
Expand description

Represents a swap path with associated asset amounts indicating how much of the asset needs to be deposited to get the following asset’s amount withdrawn (this is inclusive of fees).

Example: Given path [(asset1, amount_in), (asset2, amount_out2), (asset3, amount_out3)], can be resolved:

  1. asset(asset1, amount_in) take from user and move to the pool(asset1, asset2);
  2. asset(asset2, amount_out2) transfer from pool(asset1, asset2) to pool(asset2, asset3);
  3. asset(asset3, amount_out3) move from pool(asset2, asset3) to user.

Aliased Type§

struct BalancePath<T> { /* private fields */ }