🖥️Multipool User Interface
IMultipoolMethods
Functions
getSharePriceParams
Gets several share prive params
Fetches data by reading a single slot
Returns
Name | Type | Description |
---|---|---|
|
| Time in seconds for signed share price to be valid |
|
| Price that is used when contract's total supply is zero |
|
| Minimal signature number required for force push price verification |
getPriceFeed
Gets price feed data
Parameters
Name | Type | Description |
---|---|---|
|
| Asset for wich to get price feed |
Returns
Name | Type | Description |
---|---|---|
|
| Returns price feed data |
getPrice
Gets current asset price
Parameters
Name | Type | Description |
---|---|---|
|
| Asset for wich to get price |
Returns
Name | Type | Description |
---|---|---|
|
| Returns price data in a format of Q96 decimal value |
getFeeParams
Gets fee params from state. All ratios are Q32 values.
Fetches data by reading a single slot for first integers
Returns
Name | Type | Description |
---|---|---|
|
| Curve parameter that is a fee ratio at the half of the curve divided by deviation limit |
|
| Curve parameter that shows maximum deviation changes that may be made by callers |
|
| Parameter that shows ratio of value taken from deviation fee as base |
|
| Parameter that shows ratio of value taken from each operation quote value fee |
|
| Parameter that shows ratio of value that is taken from base fee |
|
| Address to send arcanum protocol development and maintaince fees share for arcanum protocol developers and maintainers |
getAsset
Gets asset related info
Reads exacly two storage slots
Parameters
Name | Type | Description |
---|---|---|
|
| address of asset wich data to provide |
Returns
Name | Type | Description |
---|---|---|
|
| asset related data structure |
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
Parameters
Name | Type | Description |
---|---|---|
|
| Arguments for share price force push |
|
| Assets that will be used as input or output and their amounts. Assets should be provided ascendingly sorted by addresses. Can't accept duplicates of assets |
|
| Shows sleepage direction. If is true input amouns (that are greater than zero) will be used exactly and output amounts (less than zero) will be used as slippage checks. If false it is reversed |
|
| Address that will receive output amounts |
|
| If this value is true, left ether will be sent to |
|
| Address that will be used to receive left input token and native token balances |
checkSwap
Method that dry runs swap execution and provides estimated fees and amounts
To avoid calculation errors don't provide small values to amount
Parameters
Name | Type | Description |
---|---|---|
|
| Arguments for share price force push |
|
| Assets that will be used as input or output and their amounts. Assets should be provided ascendingly sorted by addresses. Can't accept duplicates of assets |
|
| Shows sleepage direction. If is true input amouns (that are greater than zero) will be used and the output amounts will be estmated proportionally. If false it behaves reversed |
Returns
Name | Type | Description |
---|---|---|
|
| Native token amount to cover swap fees |
|
|
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
Parameters
Name | Type | Description |
---|---|---|
|
| Address of asset selected to increase its cashback |
Returns
Name | Type | Description |
---|---|---|
|
| Native token amount that was put into cashback |
Last updated