input tokenis the token being swapped , and the
output tokenis the token the input token is being swapped for. So, for example, if the operation will swap BUIDL for UniFi, BUIDL is the input token and UniFi is the output token. If the operation involves a transfer, we have only one token, so the input-output dichotomy does not apply.
name-> represents the name of the contract
blockInterval-> the interval of time (expressed in blocks) that must pass between each execution of an operation
lastBlock-> the block of the most recently executed operation. Can be also used to program a delayed operation start
callerRewardPercentage-> the reward the executor will receive. Allows the creation of an incentive for executing the operation with a public call, not only the call by the internal hosting of the contract. The executor can freely choose to be rewarded with either input or output tokens; for example, if the operation swaps BUIDL (input token) for ETH (output token), he can choose to be rewarded in either.
addressof the operations' input token
amountof the input token
inputTokenAmountIsPercentage-> boolean value that expresses whether the amount of the input token (previous field) is expressed as a percentage value (
true) or not (
true, the percentage is expressed in reference to the total supply of the input token. If the value is
false, only the amount is expressed.
addressof the AMM chosen to be used for possible token swap operations, this field is equal to
0x0000000000000000000000000000000000000000if the operation is a
liquidityPoolAddresses-> array containing the liquidity pool token
addressesof a swap operation (so this field is only populated if a swap operation is involved). The first element of the array must necessarily contain the input token
swapPath-> This array contains the path that the swap operation must follow (so this field is only populated if a swap operation is involved). Please refers to AMM Aggregator section for more details
liquidityPoolAddressescontaining BUIDL/ETH LP
addressin the fist position and ETH/USDC LP
addressin the second place. The
swapPatharray will contain ETH in the first position and USDC in the second one.
enterInEth-> expresses whether the input token is ETH (
true) or not (
exitInEth-> expresses whether the output token is ETH (
true) or not (
receivers-> array that contains the addresses of the various receivers in case of a transfer operation
receiversPercentages-> array that contains the percentages of the various receivers in case of transfer operation. The length of this array must be equal to
receivers array length -1, the last percentage is in fact calculated automatically.
_transferTofunction, called internally at the time of execution:
addressof the token on which to perform the transfer operation
totalAmount-> token amount to transfer
rewardReceiver-> address that will receive the reward for calling the execution of the operation
callerRewardPercentage-> percentage of the transfer transaction the executor will receive as a reward
receivers-> array that contains the
addressesof the receiver(s) of the transfer operation
receiversPercentages-> array that contains the percentages of the receiver(s) of the transfer operation
_calculateRewardPercentagefunction), sends it to the caller address and subtracts it from the total amount passed as
_calculateRewardPercentagefunction and sent to their respective addresses:
_swapfunction, called internally at the time of execution:
swapLiquidityfunction, using the newly created
reward percentageis transferred to the caller, whether it was requested in