Evaluates the output asset is supported by the executor
Side effect to be evaluated
Error if asset is not supported
Computes different types of shares for a given SFX.
Object of SFX compute
Fee, insurance or yield
Share of the given type
Evaluates the SFX strategy for a given SFX.
Object of SFX to be evaluated
Evaluates the XTX strategy for a given XTX. If the XTX fails the evaluation, the XTX will be rejected, preventing any bids to be submitted
Object of XTX to be evaluated
Returns minProfitUsd constraint from the SFX strategy for a given target.
Object of SFX to be evaluated
MinProfitUsd constraint from the SFX strategy for a given target
Checks if the gateway is supported by the executor. If a config for the gateway exists, this is the case.
Object of SFX to be evaluated
Evaluates the maxAssetCost constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the maxAssetCost constraint is not met
Evaluates the maxTxFeeShare constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the maxTxFeeShare constraint is not met
Evaluates the maxTxFeesUsd constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the maxTxFeesUsd constraint is not met
Evaluates the minInsuranceAmountUsd constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the minInsuranceAmountUsd constraint is not met
Evaluates the minInsuranceAmountUsd constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the minInsuranceAmountUsd constraint is not met
Evaluates the minProfitUsd constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the minProfitUsd constraint is not met
Evaluates the minYield constraint from the SFX strategy for a given SFX.
Side effect to be evaluated
Strategy for the specific target
Error if the minYield constraint is not met
Generated using TypeDoc
The strategy engine is used to decide if a SFX should be executed or not. The decision is seperated into two parts:
XTX Strategy: Before the strategy engine evaluates individual SFXs, it evaluates the XTX as a whole. To complete a XTX, all SFXs must be executed and confirmed. For this reason the XTX strategy can be used to evaluate a set of constraints for each SFX in the XTX. If any of the SFXs in the XTX fail the XTX strategy, the XTX will be rejected and not further tracked.
For example, this can be useful for ensuring every SFX as a certain amount of insurance. XTXs containing SFXs with low insurance risk being reverted, as the fine for not completing the SFX is potentially too low. Executors can use the parameters provided in the XtXStrategy to enforce XTX-wide constraints.
SFX Strategy: If an XTX passes the XTX strategy, the strategy engine will evaluate each SFX individually. To goal here is to determine if a SFX passes all constraints set by the SFX strategy. If so, the executor will then submit a bid for the SFX. The bid amount is not determined by the strategy engine, but by the bidding engine.