Policy Overview
As mentioned earlier, policies are the driving force of Dexible's execution engine. They determine whether an order should execute, wait, pause, or cancel. Dexible currently supports the following policies:
Policy
Description
Params
BoundedDelay
Specifies a time delay between rounds
timeWindowSeconds
randomizeDelay
Expiration
Specifies an expiration period in seconds. This will force an order to cancel when evaluating to true.
seconds
FailLimit
Specifies a max number of failures for an order. This is automatically added to every order with a max of 30% of order's number of rounds (i.e. you cannot add this yourself). This will cause an order to cancel if it has too many failures.
maxFailures
GasCost
Specifies the gas type to apply to the order. This is required for every order.
gasType (relative | fixed)
amount (if fixed)
deviation (if relative)
LimitPrice
Specifies a min price that the market must meet to execute the order.
price (see Prices)
PriceBounds
Specifies a base price and an upper/lower bound.
basePrice (see Prices)
upperBoundPercent
lowerBoundPercent
Slippage
Specifies the amount of slippage allowed per round. This is required for all orders.
amount (.5 == .5%)
StopPrice
Specifies an activation (trigger) price and whether the market price should be above or below the activation price.
trigger (see Prices)
above (boolean)
More will be added as the Dexible features expand. But with this set of policies, powerful algos can be realized.
Last modified 4mo ago
Copy link