https://github.com/solzarr/smart-contract
smart-contract
https://github.com/solzarr/smart-contract
javascript python ruby shell solidity
Last synced: about 9 hours ago
JSON representation
smart-contract
- Host: GitHub
- URL: https://github.com/solzarr/smart-contract
- Owner: solzarr
- Created: 2025-10-01T15:08:38.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-08T21:22:16.000Z (9 months ago)
- Last Synced: 2025-11-12T00:11:56.014Z (8 months ago)
- Topics: javascript, python, ruby, shell, solidity
- Language: Solidity
- Homepage:
- Size: 7.9 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tesseract Protocol
Tesseract Protocol facilitates fast, simple token swaps between Avalanche L1s (formerly known as subnets).
## Target Features
- Cross-L1 swaps for curated L1s, DEXes, and tokens
- Sub-10 second round-trip transactions to/from C-Chain
- No RPC switching required from source L1
## Prerequisites
- Home and Remote token deployments using [ICTT](https://github.com/ava-labs/avalanche-interchain-token-transfer)
- L1 RPCs
- Cell(s) deployed across chains
- Cross-L1 message relayer
## Architecture
Based on [Yak Swap](https://github.com/yieldyak/yak-aggregator), using onchain quote and swap functions with adapters for different DEXes.
- Similar to Yak Swap, clients should gather quotes by querying the RPCs, compare prices, generate a swap using the best quote and post the transaction.
- Different to Yak Swap, clients should consider that swaps are nonatomic (settled over multiple blocks) and the best quote may pass through a sub-optimal route in case the swap fails and funds fall back to a chain where the user does not have gas.
### Swap Failure Handling
- Single-hop rollback: `sender` receives `tokenIn` on `sourceChain`
- Multi-hop refund: `tokenIn` transferred to `receiver` on current chain (where the trade fails)
## Important Notes
- Trust assumptions exist for L1 interactions
- `tokenIn` and `tokenOut` tokens used within a `path` must have ICTT deployments (for TokenHome and TokenRemote)
- Inherent risks in cross-L1 transactions, including relayer execution
- For full details on Avalanche's new L1 framework, refer to [ACP-77](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/77-reinventing-subnets/README.md).