GluexRouter
smart contract (version 1) facilitates secure and efficient execution of complex DeFi operations. It provides versatile functionality for routing tokens, collecting protocol fees and executing diverse onchain interactions via a structured interface. The contract prioritizes high security and usability, ensuring strict adherence to predefined routing and slippage rules
GluexRouter-v1
contract is deployed at the following address on the supported chains by GlueX:
Contract Address: 0x6Ec7612828B776cC746fe0Ee5381CC93878844f7
IExecutor
contract and predefined interaction data. This function is the primary entry point for orchestrating multi-step DeFi flows
Function Signature
executor
(IExecutor): The executor contract performing the interactionsdesc
(RouteDescription calldata): The route description containing input, output and fee detailsinteractions
(Interaction[] calldata): The interactions encoded for execution by the executordeadline
(uint256): The timestamp after which the transaction will revertfinalOutputAmount
(uint256): The final amount of output token receivedDeadline passed
: If the block timestamp exceeds the deadlineRouting fee too high
: If desc.routingFee
exceeds _MAX_FEERouting fee too low
: If desc.routingFee
is below _MIN_FEENegative slippage limit
: If desc.minOutputAmount
is less than or equal to zeroSlippage limit too large
: If desc.minOutputAmount
exceeds desc.outputAmount
uniquePID
(bytes): The unique identifier (integrator id) for the partneruserAddress
(address): The address of the user who initiated the routeoutputReceiver
(address): The address of the receiver of the output tokeninputToken
(IERC20): The ERC20 token used as inputinputAmount
(uint256): The amount of input token used for routingoutputToken
(IERC20): The ERC20 token received as outputoutputAmount
(uint256): The expected output amount from the routepartnerFee
(uint256): The fee charged for the partnerroutingFee
(uint256): The fee charged for the routing operationfinalOutputAmount
(uint256): The actual output amount received after routing