🖥️Multipool User Interface

IMultipoolMethods

Functions

getSharePriceParams

Gets several share prive params

Fetches data by reading a single slot

function getSharePriceParams()
    external
    view
    returns (
        uint128 _sharePriceValidityDuration,
        uint128 _initialSharePrice,
        uint _signatureThreshold
    );

Returns

getPriceFeed

Gets price feed data

function getPriceFeed(address asset) external view returns (FeedInfo memory priceFeed);

Parameters

Returns

getPrice

Gets current asset price

function getPrice(address asset) external view returns (uint price);

Parameters

Returns

getFeeParams

Gets fee params from state. All ratios are Q32 values.

Fetches data by reading a single slot for first integers

function getFeeParams()
    external
    view
    returns (
        uint64 _deviationParam,
        uint64 _deviationLimit,
        uint64 _depegBaseFee,
        uint64 _baseFee,
        uint64 _developerBaseFee,
        address _developerAddress
    );

Returns

getAsset

Gets asset related info

Reads exacly two storage slots

function getAsset(address assetAddress) external view returns (MpAsset memory asset);

Parameters

Returns

swap

Method that executes every trading in multipool

This is a low level method that works via direct token transfer on contract and method execution. Should be used in other contracts only Fees are charged in native token equivalend via transferring them before invocation or in msg.value

function swap(
    ForcePushArgs calldata forcePushArgs,
    AssetArgs[] calldata assetsToSwap,
    bool isExactInput,
    address receiverAddress,
    bool refundEthToReceiver,
    address refundAddress
)
    external
    payable;

Parameters

checkSwap

Method that dry runs swap execution and provides estimated fees and amounts

To avoid calculation errors don't provide small values to amount

function checkSwap(
    ForcePushArgs calldata forcePushArgs,
    AssetArgs[] calldata assetsToSwap,
    bool isExactInput
)
    external
    view
    returns (int fee, int[] memory amounts);

Parameters

Returns

increaseCashback

Method that dry runs swap execution and provides estimated fees and amounts

Method is permissionless so anyone can boos incentives. Native token value can be transferred directly if used iva contract or via msg.value with any method

function increaseCashback(address assetAddress) external payable returns (uint128 amount);

Parameters

Returns

Last updated