πŸ’Έ
Fees
Relay users can pay fees either using the native token of the blockchain or TDT.
TeleportDAO calculates the required amount of user fee in epochs of block headers, based on the cost of submitting a block header on the relay and relay usage rate. The number of blocks in one epoch is such that we can estimate the number of queries sent to the relay in an epoch using the number of queries in the previous epoch. Therefore, the fee that a user needs to pay for verifying some data decreases if the total number of requests had increased in the previous epoch.
To avoid too much increase in the relay fee, we assume a base number for queries in an epoch. The excess fee from extra usages in previous epochs gets accumulated in the relay contract. This amount is used to pay the Relayers whose block headers has been in an epoch with less than the base number of queries usages.
As mentioned above, the Relayer reward consists of two parts: TDT treasury token, and user fees. As the number of protocol users grows, the treasury reward will decrease.
In sum, supposing the following:
  • G = block header submission gas usage
  • P = gas price
  • N = previous epoch number of transactions referring to the relay
  • B = base number
  • M = number of the blocks in one epoch
Then:
Relayfee=Gβˆ—Pβˆ—Mmax(N,B)βˆ—1.1Relay fee = \frac{G*P*M} {max(N, B)} * 1.1
Copy link