Platform

TAN: Issuance Calculation Script

The TAN Issuance Calculation Script, as the name suggests, calculates the allocation of TAN Issuance to various users.

System Overview

The TAN Issuance Calculation Script, as the name suggests, calculates the allocation of TAN Issuance to various users.

There are multiple performance metrics tracked and incentives programs calculated.

  • Developers Issuance
    • Referrals: Developers receive issuance based on pro-rata share of referral fees earned by stakers compared to other developers
    • TELx Volume: Developers receive issuance based on pro-rata share of TELx volume compared to other developers
    • Telcoin Network Volume: Developers receive issuance based on pro-rata share of transaction fees paid on Telcoin Network compared to other developers
  • Stakers Issuance
    • Merchant Stakers: Receive issuance based on pro-rata share of total swap volume of merchant stakers and their referred users.
    • Merchant Stakers: Receive issuance based on pro-rata share of total swap volume of merchant stakers and their referred users.
    • Merchant Stakers: Receive issuance based on pro-rata share of total swap volume of merchant stakers and their referred users.
    • Merchant Stakers: Receive issuance based on pro-rata share of total swap volume of merchant stakers and their referred users.
    • Retail Stakers: Receive issuance based on pro-rata share of total swap volume of retail stakers and their referred users.

    How it Works

    There are “calculators” and “datasources.” Datasources are passed to calculators which are responsible for determining allocations for a specific metric/program.

    All datasources get data ONLY from the Ethereum JSON-RPC. Some datasources fetch events, some fetch blocks, some store things on disk, others only store things in memory, etc.

    After each calculator is ran, incentives per user are capped by their staked amount.

    Calculators

    GasFeesIncentivesCalculator

    This calculator is used to calculate the Telcoin Network gas fees incentives for developers. Each developer gets a share of the total incentives based on the amount of gas fees paid by their executors

    ReferralsIncentivesCalculator

    This class calculates the referrals incentives for developers. If an executor of a developer initiates a transaction that increases the claimable amount of any staker, it counts toward the referrals incentives of the developer. This class works across multiple chains.

    TELxVolumeIncentivesCalculator

    This class calculates the TELx volume incentives. Each developer gets a share of the total incentives based on the amount of TELx volume generated by their executors. This calculator works across multiple chains.

    SwapVolumeIncentivesCalculator

    Calculates swap volume incentives for a given group of users. Swap volume incentives include both retail and merchant incentives. Swaps are detected by looking at token transfers. If there is one token transfer from a user and one token transfer to a user in the same tx, then it is considered a swap. This calculator works across multiple chains.

    For retail bucket:

    MerchantA makes a swap worth 1 ETH:

  • If referrer is MerchantB, no incentive points allocated
  • If referrer is RetailA, RetailA gets 1 incentive point
  • If referrer is nobody, no incentive points allocated
  • RetailA makes a swap worth 1 ETH:

  • If referrer is MerchantA, RetailA gets 1 incentive point
  • If referrer is RetailB, RetailA gets 1 incentive point and RetailB gets 1 incentive point
  • If referrer is nobody, RetailA gets 1 incentive point
  • For merchant bucket:

    RetailA makes a swap worth 1 ETH:

  • If referrer is RetailB, no incentive points allocated
  • If referrer is MerchantA, MerchantA gets 1 incentive point
  • If referrer is nobody, no incentive points allocated
  • MerchantA makes a swap worth 1 ETH:

  • If referrer is RetailA, MerchantA gets 1 incentive point
  • If referrer is MerchantB, MerchantA gets 1 incentive point and MerchantB gets 1 incentive point
  • If referrer is nobody, MerchantA gets 1 incentive point
  • Retail and Merchant incentives are calculated separately.