Get-methods

get_assets

Returns assets of which the pool consists.

Inputs

None.

Returns

get_reserves

Returns reserves of the assets in the pool.

Inputs

None.

Returns

  • reserve0 int - reserve of asset0
  • reserve1 int - reserve of asset1

is_stable

Returns whether the pool is based on stable-swap or not.

Inputs

None.

Returns

  • is_stable int (boolean)

get_trade_fee

Returns the trading fee details of the pool.

Inputs

None.

Returns

  • trade_fee_numerator int
  • trade_fee_denominator int

estimate_swap_out

Estimates the expected output from a given input.

Inputs

  • asset_in slice (Asset)
  • amount_in int

Returns

  • asset_out slice (Asset)
  • amount_out int - amount of asset_out
  • trade_fee int - amount of asset_in asset given as a fee.