Fees

API Gas fee structure

{
    "gas_per_action": {"type": "int", "min": 0 },
    "fee_token": {"type": "str" },
    "max_gas_price": {"type": "int" },
    "conversion_rate": {"type": "list", "min_size": 2, "max_size": 2, "item_schema": {"type": "int", "min": 1} },
}
  • gas_per_action: the gas price for the specific action

when we perform the rollup and the transaction is settled on-chain, the actual gas cost may be less than what is specified here

  • fee_token: symbol of token in which the gas fee will be settled

  • max_gas_price: the maximum price per 1 quantity of gas the user is willing to spend

at the time of on-chain settlement, the gas fee charged will be the real gas price

  • conversion_rate [base_token, fee_token]:

    • shows how many base chain tokens a user can get for the fee_token amount

    • if the fee_token is the actual base currency of the chain then the conversion rate will be [1,1]

    • otherwise -> [base_token, fee_token]

Exchange provides dedicated endpoint that user can use to query a conversion rate. It is suggested to specify some small premium

This fee incur only for orders that remove liquidity from the book

API Fixed fee structure:

{
  "recipient": {"type": "str"},
  "maker_pbips": {"type": "int", "min": 0},
  "taker_pbips": {"type": "int", "min": 0},
  "apply_to_receipt_amount": "bool"
}
  • recipient: Recipient address for the fee (Starknet address)

  • maker_pbips: The maker fee is 2bps of the notional size traded

  • taker_pbips: The taker fee is 10bps of the notional size traded

  • apply_to_receipt_amount: from what amount fixed fees would be taken:

    • received amount of the trade

    • spend amount of the trade

Last updated