Bonus Design

Bonus Design

Bonus is a brand new feature added to everiToken 3.0. It's powerful and very flexible and also easy to combine with existing features to power your application and business.

Bonus is mainly designed for the purpose that one may wants to distribute the profits to its stake holders or share holders according to some rules.

According to the different ways of collecting profits, there're two types of bonus supported in everiToken: passive bonus and active bonus.

Passive Bonus

For the passive bonus, the profit is collected during every transaction within one fungible tokens. So if the managers of one fungible is decided to set passive bonus to it, then in every transaction not only EVT as fuels will be charged but also an additional fees of that fungible will be charged either.

There're several options controls the actual rate of fees in one transaction. Here's one summary table:

Option Name Description
rate Rate of fees according to the amount of transaction.
base_charge The optional addition fees outside the rate for every transaction.
charge_threshold (optional) The maximum of the total fees.
minimum_charge (optional) The minimum of the total fees.
methods Charge method for different actions, transferft and everipay are supported currently. And within_amount and outside_amount are the possible values for each action. If not specified, within_amount will be used as default value.
dist_threshold Only the profit collected is large than this value, can the managers start one round of distribution.

Here's pseudo-code of the charge calculation.

charge = base_charge
charge += amount * rate
if charge_threshold:
    charge = max(charge, charge_threshold)
if minimum_charge:
    charge = min(charge, minimum_charge)
return charge

For the methods, with_amount means that the charge will be including in the amount, so the payee will receive (amount - fees). And outside_amount is opposite, payee will receive amount, but payer will cost (amount + fees).

Active Bonus

Active bonus is much simpler than passive bonus, the one wants to distribute profit is required to put the profit into the bonus pool in a period.

Distribute Rules

Multiple levels of rules of distribution are supported in everiToken. Three types of distribution rules are supported now:

Name Amount Received
fixed Fixed amount of tokens
percent Specific percent of amount of tokens
remaining_percent Specific percent of the remaining amount of tokens (Amount minus fixed and percent rules used)

For example, if the total amount of profit is 10000.00000 S#123, then if it's defined with 5-level rules:

  1. fixed rule with 500.00000 S#123: Receiver #1 will get 500.00000 S#123.
  2. percent rule with 10%: Receiver #2 will get 1000.00000 S#123.
  3. percent rule with 5%: Receiver #3 will get 500.00000 S#123.
  4. remainning rule with 20%: Receiver #4 will get 1600.00000 S#123.
  5. remainning rule with 80%: Receiver #4 will get 6400.00000 S#123.

And for the receiver for each rule, there're two types of receivers are supported currently.

Name Description
address Receiver is one valid address and will receive all the amount.
ftholders All the stake holders of one specific fungible token will receive the profit, the amount is according to the stake of the total of that fungible's total supply. And threshold can also be used here to filter the holders with the minimum stake required.

For the ftholders, the stake of fungible tokens here is not limited to the fungible token used in profit, but every fungible tokens registered in everiToken is fine. So it's possible to issue one bonus token for the profit distribution and it will benefit from the transparency, justice and liquidity provided by the everiToken.

Examples

Please refer to the ABI Document for more details. Below is one example json defines passive bonus for fungible with symbol id: 5.

{
    "sym": "5,S#5",
    "rate": "0.01",
    "base_charge": "0.00000 S#5",
    "charge_threshold": "1.00000 S#5",
    "minimum_charge": "0.01000 S#5",
    "dist_threshold": "50.00000 S#5",
    "rules": [
        {
            "type": "fixed",
            "data": {
                "receiver": {
                    "type": "address",
                    "data": "EVT6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
                },
                "amount": "10.00000 S#5"
            }
        },
        {
            "type": "percent",
            "data": {
                "receiver": {
                    "type": "ftholders",
                    "data": {
                        "threshold": "1.00000 S#1"
                    }
                },
                "percent": "0.3"
            }
        },
        {
            "type": "remaining_percent",
            "data": {
                "receiver": {
                    "type": "address",
                    "data": "EVT6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
                },
                "percent": "1"
            }
        }
    ],
    "methods": [
        {
            "action": "transferft",
            "method": "outside_amount"
        },
        {
            "action": "everipay",
            "method": "within_amount"
        }
    ]
}