var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=3&rec=1&url=https://docs.warp.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

Fees

All fees collected by Warp are swapped to Luna and burned. They are estimated based on 3 factors: A creation fee based on the queue size, a maintenance fee based on the job duration, and a burn fee based on the reward amount. In addition to fees, a reward also needs to be provided to pay the keeper. Fees and a reward are paid up-front on all jobs. Fees for recurring jobs are estimated and set based on the duration of the job, which is configured during job creation.

Creation Fee

The creation fee (f(qs)) is a piecewise function depending on the queue size (qs). It is incurred when a job is created.


_10
f(qs) =
_10
y1, if qs < x1
_10
slope * qs + y1 - slope * x1, if x1 <= qs < x2
_10
y2, if qs >= x2

Where:

  • x1 = config.queue_size_left
  • x2 = config.queue_size_right
  • y1 = config.creation_fee_min
  • y2 = config.creation_fee_max
  • slope = (y2 - y1) / (x2 - x1)

Maintenance Fee

The maintenance fee (g(dd)) is structured similarly to the creation fee, and it is based on the duration in days (dd).


_10
g(dd) =
_10
y1, if dd < x1
_10
slope * dd + y1 - slope * x1, if x1 <= dd < x2
_10
y2, if dd >= x2

Where:

  • x1 = config.duration_days_min
  • x2 = config.duration_days_max
  • slope = (y2 - y1) / (x2 - x1)

Burn Fee

The burn fee (h(job_reward)) is calculated as the maximum between the calculated_fee and min_fee.


_10
h(job_reward) =
_10
max(calculated_fee, min_fee)

Where:

  • calculated_fee = job_reward * config.burn_fee_rate / 100
  • min_fee = config.burn_fee_min

Config

The current contract config for Terra is as follows:


_22
{
_22
"config": {
_22
"account_tracker_address": "terra1qgexzlztyl49q8at7y6jxjagan8afmkg0aake0z36tq90ckmf2psh39dsy",
_22
"burn_fee_min": "100000",
_22
"burn_fee_rate": "25",
_22
"cancellation_fee_rate": "5",
_22
"creation_fee_max": "100000000",
_22
"creation_fee_min": "500000",
_22
"duration_days_max": "100",
_22
"duration_days_min": "10",
_22
"fee_collector": "terra1a8dxkrapwj4mkpfnrv7vahd0say0lxvd0ft6qv",
_22
"fee_denom": "uluna",
_22
"maintenance_fee_max": "10000000",
_22
"maintenance_fee_min": "50000",
_22
"minimum_reward": "10000",
_22
"owner": "terra1a8dxkrapwj4mkpfnrv7vahd0say0lxvd0ft6qv",
_22
"queue_size_left": "5000",
_22
"queue_size_right": "50000",
_22
"resolver_address": "terra1xpewwp0fput9xx8wyk5cglketkke27kgyeykzscafk4sgna4jp5qgzwmmz",
_22
"warp_account_code_id": "12473"
_22
}
_22
}