You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Cross Cats is ERC7863 compatible with a few non-breaking changes."
4
4
sidebar:
5
5
order: 2
6
6
---
7
7
8
8
Catalyst is [ERC-7683](https://eips.ethereum.org/EIPS/eip-7683)* compatible. *The implementation differs in 2 ways:
9
9
10
-
1. A Catalyst [OrderKey](https://github.com/catalystdao/cross-cats/blob/7e07281eef10ffadc10f9f75eb42d1c2419224ca/src/interfaces/Structs.sol#L41-L65) is returned on `initiate(...)`. For implementations that wants to verify that orders were correctly collected, this adds options for further data validation. This change is compatible with ERC-7683 since it does not change any function signatures and ERC-7683 specifies that the function has no return.
11
-
2. ERC-7683 defines the 2 elements of `Output`,`token` and `recipient` to be type `address`. The type of both elements have been changed to `bytes32`. Solidity ABI encoding encodes structs elements such that they fill 32 bytes. As a result, all returned objects of `ResolvedCrossChainOrder` remains compatible with implementations that assumes these are `address` (except these values are truncated).
10
+
1. A Catalyst [OrderKey](https://github.com/catalystdao/cross-cats/blob/7e07281eef10ffadc10f9f75eb42d1c2419224ca/src/interfaces/Structs.sol#L41-L65) is returned on `initiate(...)`. For implementations that wants to verify that orders were correctly collected, this adds an option for further data validation. This change is compatible with ERC-7683 since it does not change any function signatures and ERC-7683 specifies that the function has no return. For naive implementations this slightly increases gas costs as Solidity always places `RETURNDATACOPY` after external calls.
11
+
2. ERC-7683 defines the 2 elements of `Output`:`token` and `recipient` to be type `address`. The type of both elements have been changed to `bytes32`. Solidity ABI encoding encodes structs elements such that they fill 32 bytes. As a result, all returned objects of `ResolvedCrossChainOrder` remains compatible with implementations that assumes these are `address` (except when read, those values are truncated). When possible, important contextual information is placed in the 20 rightmost bytes. Off-chain listeners should always read the entire 32 bytes.
Copy file name to clipboardexpand all lines: src/content/docs/cross-cats/cross-cats.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -226,24 +226,24 @@ Cross-Cats is designed for cross-chain intents. Never the less, the majorty of t
226
226
227
227
### Initiation (order claim)
228
228
229
-
An order is initiated by the user signing an order description. An example of an order description is _My 1 Ether (Ethereum) for 3000 USD (Base)_. The signed order is a permit2 witness allowing the solver to submit the order to the Reactor and collect the **input** (1 Ether) from the user. Importantly, during this step some collateral is collected from the solver. This ensures the solver has some skin in the game and goes through with the order. The collateral is paid back when the input is released to the solver.
229
+
An order is initiated by the user signing an order description. An example of an order description is _My 1 Ether (Ethereum) for 3000 USD (Base)_. The signed order is a permit2 witness allowing the solver to submit the order to the Reactor and collect the **input** (1 Ether) from the user. Importantly, during this step some collateral is collected from the solver. This ensures the solver has some skin in the game and settles the order. The collateral is paid back when the input is released to the solver.
230
230
231
-
To improve the user and solver experience, an order server sits between the user and solver and aids with order validation, propergation, and quoting.
231
+
To improve the user and solver experience, an order server sits between the user and solver and aids with order validation, propagation, and quoting.
232
232
233
233
### Output Payment (to user)
234
234
235
-
The payment pathway depends on the order intent. For a **VM to VM** swap, the solver calls the oracle contract on the destination chain which sends & records the token payment to the user. For **VM to Bitcoin** swap, the solver makes the payment described in the order. In other words, make a Bitcoin transaction that has **a** TXO that matches the order description.
235
+
The payment pathway depends on the order intent. For a **VM to VM** swap, the solver calls the oracle contract on the destination chain which sends & records the token payment to the user. For **VM to Bitcoin** swap, the solver makes the payment described in the order. In other words, make a Bitcoin transaction that has **a** TXO that matches the order description. If needed, the payment can then be validated using an SPV client.
236
236
237
237
### Input Payment (to solver)
238
238
239
239
Cross Cats has 3 payment release schemes to optimise the solver experience.
240
240
241
-
1.The default operation is optimistic resolution. This assumes that the resolver delivered the payment to the user. After a dispute window (configured by the user), the payment will be released. If the order is disputed the operation falls back to option 2.
242
-
2. Explicit validation. At anytime, orders can be proven. This requires that someone send the proof from the remote chains to the source chain. This is costly but is in many cases faster than optimistic resolution. Additionally, through batch verification the cost can be reduced at a slight increase in verification speed.
243
-
3. Underwriting. The last release scheme isn't a payment proof scheme as much as it is a responsibility delegration scheme. If configured, an order can be bought by someone else at any point priorer to the release of the input (proof / fraud). This allows the initial solver to immediately get their capital back and off-hand the payment validation to a third party.
241
+
1.Optimistic resolution. This assumes that the resolver delivered the payment to the user. After a dispute window (configured by the user), the payment will be released. If the order is disputed the operation falls back to option 2.
242
+
2. Explicit validation. At anytime, orders can be proven. This requires that someone send the proof from the remote chains to the source chain. This is more costly than optimistic resolution but may be significantly faster than optimistic resolution. Additionally, through batch verification the cost can be reduced at a slight increase in verification speed.
243
+
3. Underwriting. The last release scheme isn't a payment proof scheme as much as it is a responsibility delegration scheme. If configured, an order can be bought by someone else at any point priorer to the release of the input (proof / fraud). This allows the initial solver to immediately get their capital back and hand off the payment validation to a third party.
244
244
245
245
246
-
By using these 3 in conjunction with each other solvers only have to lock liquidity for a small amount of time while the security of the system can remain highly secure. At the same time, speed, security, and cost can be rebalanced based on the specific needs of a user or chain conditions.
246
+
By using these 3 in conjunction with each other, solvers only have to lock liquidity for a small period of time while not sacrificing any system security. At the same time, speed, security, and cost can be rebalanced based on the specific needs of a user or chain conditions.
247
247
248
248
## Bitcoin & Pseudo Solving
249
249
@@ -253,32 +253,32 @@ VM to Bitcoin swaps are relatively straight forward:
253
253
3. Solver delivers assets
254
254
4. Solver is paid.
255
255
256
-
However this flow breaks on step 2 when the user wants to go from Bitcoin to VM. (sell Bitcoin). There is no way to pull assets from a user. To solve this issue, the user becomes a **pseudo solver** & relying on release scheme 3. Pseudo solving works by asking solvers for short-lived Bitcoin short quotes. These orders are after validation & selection signed by the solver. The user then quickly claims the order.
256
+
However this flow breaks on step 2 when the user wants to go from Bitcoin to VM. (sell Bitcoin). There is no way to pull assets from a user. To solve this issue, the user becomes a **pseudo solver** & relies on release scheme 3. Pseudo solving works by asking solvers for short-lived Bitcoin short quotes. These orders are after validation & selection signed by the solver. The user then quickly claims the order.
257
257
258
258
Say the user wants to swap 1 Bitcoin for 50000 USDC. Using the order server, they need to collect & claim a signed order of the opposite: 50000 USDC for 1 Bitcoin. Once this order is filled, they get the input (50000 USDC) which matches their desire.
259
259
260
260
Important to notice, this adds a delay between when the price risk begins for the solver (issuance of signed order) to when it resolves (0-1 block confirmations of Bitcoin TXO). These values are best migrated by the following configuration:
261
261
1. Short initiation time. Using a source chain with a low block time, the initiation time can be kept to an absolute minimum.
262
262
2. Short proof time. The user may only have 1 or 2 Blocks to get their transaction confirmed.
263
-
3.High pseudo solver collateral. By requiring a lot of collateral, the cost of hedging / non-execution can be covered.
263
+
3.Designing a compatibility layer between the UI and the Order Server that only requests binding order when it is known that the user can get their Bitcoins filled.
264
264
265
-
In a future version, VM to Bitcoin swaps will upgrade to an price oracle book scheme that further minimizes time between start of price risk to end of price risk.
265
+
In a future version, VM to Bitcoin swaps will upgrade to a price oracle book scheme that further minimizes time between start of price risk to end of price risk.
266
266
267
267
# Key Integration Metrics
268
268
269
-
Cross-Cats has been designed to optimise integration metrics like cost of capital, speed, human, developer, cost, price risk, capital risk, and more. Below are the most notiable metrics. If any metrics that are important to you are missing reach out and the documentation will be updated.
269
+
Cross-Cats has been designed to optimise integration metrics like cost of capital, speed, human, developer, cost, price risk, and capital risk. Below are the most notiable metrics. If important metrics are missing feel free to reach out and the documentation will be updated.
270
270
271
271
## Locked Capital & Underwriting
272
272
273
-
There is no need to pre-lock capital into Cross-Cats. Capital is only locked during the actual order flow. In the beginning orders will batch verified which will take between 2 and 4 hours (TBD). During this period there is **PRICE CERTANCY** but assets are temporarily locked.
273
+
There is no need to pre-lock capital into Cross-Cats. Capital is only locked during the actual order flow. In the beginning orders will be batch verified which will take between 2 and 4 hours (TBD). During this period there is **PRICE CERTANCY** but assets are temporarily locked.
274
274
275
-
The user will not experience any these delays.
275
+
The user will not experience any delays.
276
276
277
277
Additionally, underwriting will be available for some routes in which case assets will be available 1-5 minutes after asset delivery. This includes Bitcoin deliveries.
278
278
279
279
### Price (un)Certainty
280
280
281
-
For VM to VM swaps and VM to Bitcoin swaps, the price uncertainty window is the time it takes from the moment your system commits to the order (or when the claim transaction is initiated) to when the order claim arrives on-chain and is successfully mined. On fast chains this is at most 2-3 seconds but may be up-to 12 seconds. Cleverly timing the commitment can reduce beyond the block time.
281
+
For VM to VM swaps and VM to Bitcoin swaps, the price uncertainty window is the time it takes from the moment your system commits to the order (or when the claim transaction is initiated) to when the order claim arrives on-chain and is successfully mined. On fast chains this is at most 2-3 seconds but may be up-to 12 seconds. Cleverly timing the commitment can reduce the uncertainty period below the block time.
282
282
283
283
For Bitcoin to VM swaps the price uncertainty window is from when the order is signed to when the user initiates the Bitcoin transaction and it gets your desired number of confirmations. This may vary from 30 seconds to 10 minutes.
0 commit comments