Skip to content
30 changes: 22 additions & 8 deletions docs/CROSS_CHAIN_BRIDGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,25 @@ Lightning.space provides atomic swaps between Ethereum stablecoins and JUSD on C

### Swap Pairs

All stablecoin swaps are exclusively against **JUSD** (JuiceDollar) on Citrea.

#### USDT Pairs

| From | To | Direction | Min | Max |
|------|-----|-----------|-----|-----|
| ETH USDT | Citrea JUSD | Chain Swap | 1 USDT | 10,000 USDT |
| Citrea JUSD | ETH USDT | Reverse Swap | 1 USDT | 10,000 USDT |
| Polygon USDT | Citrea JUSD | Chain Swap | 1 USDT | 10,000 USDT |
| Citrea JUSD | Polygon USDT | Reverse Swap | 1 USDT | 10,000 USDT |
| ETH USDT | JUSD | Chain Swap | 1 USDT | 10,000 USDT |
| JUSD | ETH USDT | Reverse Swap | 1 USDT | 10,000 USDT |
| Polygon USDT | JUSD | Chain Swap | 1 USDT | 10,000 USDT |
| JUSD | Polygon USDT | Reverse Swap | 1 USDT | 10,000 USDT |

#### USDC Pairs (Ethereum only)

| From | To | Direction | Min | Max |
|------|-----|-----------|-----|-----|
| ETH USDC | JUSD | Chain Swap | 1 USDC | 10,000 USDC |
| JUSD | ETH USDC | Reverse Swap | 1 USDC | 10,000 USDC |

> **Note:** Polygon USDC is not supported due to bridge incompatibility (native USDC vs bridged USDC.e).

### Contract Addresses

Expand All @@ -84,6 +97,7 @@ Lightning.space provides atomic swaps between Ethereum stablecoins and JUSD on C
| EtherSwap | [`0x9ADfB0F1B783486289Fc23f3A3Ad2927cebb17e4`](https://etherscan.io/address/0x9ADfB0F1B783486289Fc23f3A3Ad2927cebb17e4) |
| ERC20Swap | [`0x2E21F58Da58c391F110467c7484EdfA849C1CB9B`](https://etherscan.io/address/0x2E21F58Da58c391F110467c7484EdfA849C1CB9B) |
| USDT Token | [`0xdAC17F958D2ee523a2206206994597C13D831ec7`](https://etherscan.io/address/0xdAC17F958D2ee523a2206206994597C13D831ec7) |
| USDC Token | [`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`](https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) |

#### Polygon Mainnet

Expand All @@ -99,14 +113,15 @@ Lightning.space provides atomic swaps between Ethereum stablecoins and JUSD on C
|----------|---------|
| EtherSwap | [`0xd02731fD8c5FDD53B613A699234FAd5EE8851B65`](https://explorer.mainnet.citrea.xyz/address/0xd02731fD8c5FDD53B613A699234FAd5EE8851B65) |
| ERC20Swap | [`0xf2e019a371e5Fd32dB2fC564Ad9eAE9E433133cc`](https://explorer.mainnet.citrea.xyz/address/0xf2e019a371e5Fd32dB2fC564Ad9eAE9E433133cc) |
| USDT_CITREA | [`0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe`](https://explorer.mainnet.citrea.xyz/address/0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe) |
| JUSD | [`0xFdB0a83d94CD65151148a131167Eb499Cb85d015`](https://explorer.mainnet.citrea.xyz/address/0xFdB0a83d94CD65151148a131167Eb499Cb85d015) |

### Token Compatibility

Lightning.space uses the **same Ethereum USDT contract** as Layer0:
Lightning.space uses the **same Ethereum token contracts** as Layer0:

```
Ethereum USDT: 0xdAC17F958D2ee523a2206206994597C13D831ec7
Ethereum USDC: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
```

This ensures that tokens bridged via Layer0 can be used in Lightning.space swaps and vice versa.
Expand Down Expand Up @@ -189,8 +204,7 @@ This creates a self-correcting mechanism that maintains the JUSD peg.

| Swap Type | Fee |
|-----------|-----|
| Chain Swap (USDT → JUSD) | 0.25% |
| Reverse Swap (JUSD → USDT) | 0.5% |
| All Swaps | 0% |

### StablecoinBridge Fees

Expand Down
47 changes: 36 additions & 11 deletions infrastructure/config/boltz/backend/dev-boltz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ maxZeroConfAmount = 0 # Disable 0-conf for security
base = "BTC"
quote = "BTC"
rate = 1
fee = 0.5 # 0.5% service fee
swapInFee = 0.25 # 0.25% for submarine swaps (chain -> lightning)
fee = 0
swapInFee = 0

# Swap amount limits (in satoshis)
maxSwapAmount = 10_000_000 # 0.1 BTC
Expand All @@ -116,8 +116,8 @@ minSwapAmount = 2_500 # 2,500 sats (pair level)
base = "BTC"
quote = "cBTC"
rate = 1
fee = 0.25
swapInFee = 0.1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000 # 0.1 BTC/cBTC
minSwapAmount = 2_500 # 2,500 sats minimum (Citrea Testnet has low fees)
Expand All @@ -133,8 +133,8 @@ minSwapAmount = 2_500 # 2,500 sats minimum (Citrea Testnet has low fees)
base = "USDT_ETH"
quote = "JUSD_CITREA"
rate = 1
fee = 0.25
swapInFee = 0.1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000_000 # 10,000 USDT_ETH/JUSD_CITREA
minSwapAmount = 1_000_000 # 1 USDT_ETH/JUSD_CITREA
Expand All @@ -150,8 +150,8 @@ minSwapAmount = 1_000_000 # 1 USDT_ETH/JUSD_CITREA
base = "USDT_POLYGON"
quote = "JUSD_CITREA"
rate = 1
fee = 0.25
swapInFee = 0.1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000_000 # 10,000 USDT_POLYGON/JUSD_CITREA
minSwapAmount = 1_000_000 # 1 USDT_POLYGON/JUSD_CITREA
Expand All @@ -163,6 +163,24 @@ minSwapAmount = 1_000_000 # 1 USDT_POLYGON/JUSD_CITREA
swapMaximal = 2880 # Maximum timeout (~48 hours = 288 blocks)
swapTaproot = 10080 # 1 week for taproot swaps (10080 blocks)

# Swap Pair Configuration: USDC_ETH/JUSD_CITREA (Ethereum USDC <-> Citrea JUSD)
[[pairs]]
base = "USDC_ETH"
quote = "JUSD_CITREA"
rate = 1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000_000 # 10,000 USDC_ETH/JUSD_CITREA
minSwapAmount = 1_000_000 # 1 USDC_ETH/JUSD_CITREA

[pairs.timeoutDelta]
chain = 1440 # Chain swap timeout (~24 hours = 144 blocks)
reverse = 1440 # ~24 hours for reverse swaps (lightning -> chain)
swapMinimal = 1440 # Minimum timeout for submarine swaps (~24 hours = 144 blocks)
swapMaximal = 2880 # Maximum timeout (~48 hours = 288 blocks)
swapTaproot = 10080 # 1 week for taproot swaps (10080 blocks)

# ETH (Ethereum) Configuration
[ethereum]
networkName = "Ethereum Mainnet"
Expand All @@ -179,6 +197,13 @@ providerEndpoint = "[PROVIDER_ENDPOINT]"

minWalletBalance = 1_000_000 # 1 USDT_ETH

[[ethereum.tokens]]
symbol = "USDC_ETH"
decimals = 6
contractAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

minWalletBalance = 1_000_000 # 1 USDC_ETH

# POL (Polygon) Configuration
[polygon]
networkName = "Polygon Mainnet"
Expand Down Expand Up @@ -207,11 +232,11 @@ providerEndpoint = "https://dev.rpc.testnet.juiceswap.com"
[[citrea.tokens]]
symbol = "cBTC"

minWalletBalance = 100_000
minWalletBalance = 100_000 # 0.001 cBTC (in satoshis)

[[citrea.tokens]]
symbol = "JUSD_CITREA"
decimals = 6
decimals = 18
contractAddress = "0xFdB0a83d94CD65151148a131167Eb499Cb85d015"

minWalletBalance = 1_000_000 # 1 JUSD_CITREA
minWalletBalance = 1_000_000_000_000_000_000 # 1 JUSD_CITREA
100 changes: 46 additions & 54 deletions infrastructure/config/boltz/backend/prd-boltz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ maxZeroConfAmount = 0 # Disable 0-conf for security
base = "BTC"
quote = "BTC"
rate = 1
fee = 0.5 # 0.5% service fee
swapInFee = 0.25 # 0.25% for submarine swaps (chain -> lightning)
fee = 0
swapInFee = 0

# Swap amount limits (in satoshis)
maxSwapAmount = 10_000_000 # 0.1 BTC
Expand All @@ -112,31 +112,12 @@ minSwapAmount = 2_500 # 2,500 sats (pair level)
swapMaximal = 2880 # Maximum timeout (~48 hours = 288 blocks)
swapTaproot = 10080 # 1 week for taproot swaps (10080 blocks)

# Swap Pair Configuration: BTC/RBTC (Lightning BTC <-> RSK RBTC)
[[pairs]]
base = "BTC"
quote = "RBTC"
rate = 1
fee = 0.25
swapInFee = 0.1

# Swap amount limits (in satoshis)
maxSwapAmount = 10_000_000 # 0.1 BTC/RBTC
minSwapAmount = 2_500 # 2,500 sats minimum (Rootstock has lower fees)

[pairs.timeoutDelta]
chain = 1440 # Chain swap timeout (~24 hours = 144 blocks)
reverse = 1440 # ~24 hours for reverse swaps (lightning -> chain)
swapMinimal = 1440 # Minimum timeout for submarine swaps (~24 hours = 144 blocks)
swapMaximal = 2880 # Maximum timeout (~48 hours = 288 blocks)
swapTaproot = 10080 # 1 week for taproot swaps (10080 blocks)

[[pairs]]
base = "BTC"
quote = "cBTC"
rate = 1
fee = 0.25
swapInFee = 0.1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000 # 0.1 BTC/cBTC
minSwapAmount = 2_500 # 2,500 sats minimum (Citrea Testnet has low fees)
Expand All @@ -150,13 +131,13 @@ minSwapAmount = 2_500 # 2,500 sats minimum (Citrea Testnet has low fees)

[[pairs]]
base = "USDT_ETH"
quote = "USDT_CITREA"
quote = "JUSD_CITREA"
rate = 1
fee = 0.25
swapInFee = 0.1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000_000 # 10,000 USDT_ETH/USDT_CITREA
minSwapAmount = 1_000_000 # 1 USDT_ETH/USDT_CITREA
maxSwapAmount = 10_000_000_000 # 10,000 USDT_ETH/JUSD_CITREA
minSwapAmount = 1_000_000 # 1 USDT_ETH/JUSD_CITREA

[pairs.timeoutDelta]
chain = 1440 # Chain swap timeout (~24 hours = 144 blocks)
Expand All @@ -167,13 +148,13 @@ minSwapAmount = 1_000_000 # 1 USDT_ETH/USDT_CITREA

[[pairs]]
base = "USDT_POLYGON"
quote = "USDT_CITREA"
quote = "JUSD_CITREA"
rate = 1
fee = 0.25
swapInFee = 0.1
fee = 0
swapInFee = 0

maxSwapAmount = 10_000_000_000 # 10,000 USDT_POLYGON/USDT_CITREA
minSwapAmount = 1_000_000 # 1 USDT_POLYGON/USDT_CITREA
maxSwapAmount = 10_000_000_000 # 10,000 USDT_POLYGON/JUSD_CITREA
minSwapAmount = 1_000_000 # 1 USDT_POLYGON/JUSD_CITREA

[pairs.timeoutDelta]
chain = 1440 # Chain swap timeout (~24 hours = 144 blocks)
Expand All @@ -182,19 +163,23 @@ minSwapAmount = 1_000_000 # 1 USDT_POLYGON/USDT_CITREA
swapMaximal = 2880 # Maximum timeout (~48 hours = 288 blocks)
swapTaproot = 10080 # 1 week for taproot swaps (10080 blocks)

# RSK (Rootstock) Configuration
[rsk]
networkName = "RSK Mainnet"
providerEndpoint = "[PROVIDER_ENDPOINT]"

[[rsk.contracts]]
etherSwap = "0x3d9cc5780CA1db78760ad3D35458509178A85A4A"
erc20Swap = "0x7d5a2187CC8EF75f8822daB0E8C9a2DB147BA045"
# Swap Pair Configuration: USDC_ETH/JUSD_CITREA (Ethereum USDC <-> Citrea JUSD)
[[pairs]]
base = "USDC_ETH"
quote = "JUSD_CITREA"
rate = 1
fee = 0
swapInFee = 0

[[rsk.tokens]]
symbol = "RBTC"
maxSwapAmount = 10_000_000_000 # 10,000 USDC_ETH/JUSD_CITREA
minSwapAmount = 1_000_000 # 1 USDC_ETH/JUSD_CITREA

minWalletBalance = 10_000
[pairs.timeoutDelta]
chain = 1440 # Chain swap timeout (~24 hours = 144 blocks)
reverse = 1440 # ~24 hours for reverse swaps (lightning -> chain)
swapMinimal = 1440 # Minimum timeout for submarine swaps (~24 hours = 144 blocks)
swapMaximal = 2880 # Maximum timeout (~48 hours = 288 blocks)
swapTaproot = 10080 # 1 week for taproot swaps (10080 blocks)

# ETH (Ethereum) Configuration
[ethereum]
Expand All @@ -212,6 +197,13 @@ providerEndpoint = "[PROVIDER_ENDPOINT]"

minWalletBalance = 1_000_000 # 1 USDT_ETH

[[ethereum.tokens]]
symbol = "USDC_ETH"
decimals = 6
contractAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

minWalletBalance = 1_000_000 # 1 USDC_ETH

# POL (Polygon) Configuration
[polygon]
networkName = "Polygon Mainnet"
Expand All @@ -228,23 +220,23 @@ providerEndpoint = "[PROVIDER_ENDPOINT]"

minWalletBalance = 1_000_000 # 1 USDT_POLYGON

# Citrea Testnet Configuration
# Citrea Mainnet Configuration
[citrea]
networkName = "Citrea Testnet"
providerEndpoint = "https://dev.rpc.testnet.juiceswap.com"
networkName = "Citrea Mainnet"
providerEndpoint = "[CITREA_MAINNET_RPC]"

[[citrea.contracts]]
etherSwap = "0xd02731fD8c5FDD53B613A699234FAd5EE8851B65"
erc20Swap = "0xf2e019a371e5Fd32dB2fC564Ad9eAE9E433133cc"
etherSwap = "[CITREA_MAINNET_ETHER_SWAP]"
erc20Swap = "[CITREA_MAINNET_ERC20_SWAP]"

[[citrea.tokens]]
symbol = "cBTC"

minWalletBalance = 100_000
minWalletBalance = 100_000 # 0.001 cBTC (in satoshis)

[[citrea.tokens]]
symbol = "USDT_CITREA"
decimals = 6
contractAddress = "0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe"
symbol = "JUSD_CITREA"
decimals = 18
contractAddress = "[CITREA_MAINNET_JUSD]"

minWalletBalance = 1_000_000 # 1 USDT_CITREA
minWalletBalance = 1_000_000_000_000_000_000 # 1 JUSD_CITREA