Solving for CrossCats
If you are not interested in the on-chain order structure, skip to Init Orders. For API documentation, refer to the API Swagger documentation.
CrossCats utilizes three main order structures:
- CrossChainOrder is a generic input order with an ERC-7683 compatible structure. The key component here is orderData, which contains the core functionality and varies significantly across ERC-7683 supporting implementations.
- ResolvedCrossChainOrder provides a quote description, detailing the value of a cross-chain order at a specific point in time. It is also ERC-7683 compliant*, allowing solvers to efficiently compare the resolution of orders across various protocols.
- OrderKey is used to monitor a Catalyst order throughout its lifecycle. It includes Catalyst-specific context and provides an in-depth description of an order.
Below is the generic ERC-7683 CrossChainOrder structure. The CrossChainOrder.orderData
field is an ABI-encoded order struct.
The orderData
field is uniquely encoded by CrossCats. Currently, two orderdata structs are supported:
Users generate a CrossChainOrder
with the appropriate order data and sign it as a Permit2 witness, thereby approving both the order description and its associated inputs with a single signature. The signed struct will be a new structure where orderData
is an ABI-encoded order type.
CrossCats has directionality. That means the ways orders are initiated depends on the initiating chain (where the user is swapping out of). In the current iteration, there are 2 important origin types: EVM and Bitcoin. In the future, all virtual machine chains (including EVM) will generally be initiated similarly and all non-VM chains (including Bitcoin) will be initiated similarly but different from VM chains.