IFeeCalculator
IFeeCalculator
Addresses
Chain | Address |
---|
Functions
getTradeFee
Get trade fee for a particular account, sender, and product.
function getTradeFee(FPUnsigned productFee, address account, address sender) external view returns (FPUnsigned)
Parameters
Name | Type | Description |
---|---|---|
productFee | FPUnsigned | default fee for the product |
account | address | account to open position for |
sender | address | sender of the transaction |
Return Values
Name | Type | Description |
---|---|---|
[0] | FPUnsigned | fee total fee rate |
getDepositFee
Get deposit fee for a particular sender.
function getDepositFee(address sender) external view returns (FPUnsigned fee)
Dev note
Since LP tokens are transferable, there's no point in allowing per- account discounts like we do for trade fees.
Parameters
Name | Type | Description |
---|---|---|
sender | address | sender of the transaction |
Return Values
Name | Type | Description |
---|---|---|
fee | FPUnsigned | total fee rate. Range |
getWithdrawFee
Get withdraw fee for a particular sender.
function getWithdrawFee(address sender) external view returns (FPUnsigned fee)
Dev note
Since LP tokens are transferable, there's no point in allowing per- account discounts like we do for trade fees.
Parameters
Name | Type | Description |
---|---|---|
sender | address | sender of the transaction |
Return Values
Name | Type | Description |
---|---|---|
fee | FPUnsigned | total fee rate. Range |