Spending Limits

The spending limits control the amounts that can be transacted without MPA within a given time interval.

A Spending Limit defines the allowance, the maximum amount that is allowed to be spent, in a certain currency for a specified period of time, the interval. Spending limits can be defined for a user or for a wallet.

A user or a wallet can have many spending limits set for different currencies and different time intervals.

Types of spending Limit

There are two types of spending limits: on the user level and the wallet level. If different sending limits for the same currency are set at the two levels, they both apply. In other words, the more restrictive one will define what can be spent without MPA.
An admin can set a spending limit for a given user/contract pair, for example, "User U to spend X per day".
If a given wallet is under the limit, it can be spent without MPA if other conditions are also satisfied (the address is whitelisted).

Intervals and resets

The spending limits on both levels, user or wallet, can be set for different time intervals.
The optional intervals are:

  • hourly - reset at the beginning of each hour.
  • daily - resets at midnight UTC.
  • weekly- resets on Monday, midnight UTC.
  • monthly - resets on the 1st of the month, midnight UTC.
  • one-time - The limit applies only to the amount allowance, e.g., the maximum per single transaction.

The spending limit will reset each specified interval, except when defining one time, which never resets. In such a case, theoretically, it is possible that the user will spend more than the limited amount of the specified currency within a period (for example, we can spend one hourly allowance at 10:59 and the next one at 11:00).

Multiple spending limits

Multiple spending limits can be applied to a given user or a wallet. If multiple spending limits are set, all have to be considered and fulfilled. For example: if 10 / day and 20 / month were defined, both will be considered.

When are spending limits sufficient (algorithm)

Normally, MPA will be required for all transactions. However, if all spending limits and whitelist criteria are fulfilled, then MPA will not be required. More specifically, if a user U tries to spend currency A from wallet W, he can skip MPA if:

  • user U is under his spending limit for currency A AND
  • wallet W is under the spending limit for currency A AND

Then asset A is whitelisted.

If one or more of these do not hold, MPA will be required.