1. Executive Summary
The XDC Network is an enterprise-grade, EVM-compatible blockchain designed for trade finance and tokenized real-world assets. Its native support for ISO 20022 messaging standards (via the Impel protocol) makes it a natural counterpart for JIL Sovereign's institutional settlement infrastructure. With approximately 2-second block times, deterministic finality in under 6 seconds, and a thriving ecosystem of tokenized trade instruments, XDC represents one of the highest-value cross-chain integration targets in the institutional DeFi space.
This specification defines the JIL-XDC Bridge: a lock-and-mint bridge secured by JIL's 14-of-20 decentralized validator set, enabling bidirectional transfer of assets between the JIL L1 ledger and the XDC Network. Because XDC is fully EVM-compatible (Solidity 0.8.24), JIL leverages its existing JILBridge.sol contract suite with zero code changes, deploying the same battle-tested contracts already validated on Ethereum and Sepolia.
JILBridge.sol, JILWrappedERC20.sol, and DefaultComplianceHook.sol contracts that secure billions on Ethereum work identically on XDC, reducing audit surface and deployment risk to near zero.
2. XDC Network Overview
XDC Network (formerly XinFin) is a delegated proof-of-stake blockchain optimized for international trade and finance. It provides the throughput and finality characteristics required for institutional settlement while maintaining full compatibility with the Ethereum toolchain.
| Property | Value |
|---|---|
| Chain ID | 50 (Mainnet) / 51 (Apothem Testnet) |
| Consensus | XDPoS 2.0 (Delegated Proof of Stake) |
| Block Time | ~2 seconds |
| Finality | ~6 seconds (3 block confirmations) |
| EVM Version | Solidity 0.8.24 compatible |
| Address Format | xdc prefix (equivalent to 0x) |
| Native Token | XDC |
| Testnet | Apothem (Chain ID 51) |
| Token Standard | XRC-20 (ERC-20 equivalent) |
| ISO 20022 Support | Native via Impel protocol integration |
3. Architecture
The JIL-XDC Bridge follows a lock-and-mint model secured by JIL's decentralized validator set. Assets deposited on one chain are locked in the bridge contract, and corresponding wrapped assets are minted on the destination chain. Withdrawals reverse this process: wrapped assets are burned and original assets are released after validator approval.
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
│ JIL L1 │ <─────> │ Bridge Relayer │ <─────> │ XDC Network │
│ Ledger │ │ (lock-and-mint) │ │ (Chain 50) │
└─────────────┘ └──────────────────┘ └─────────────┘
│ │ │
JILBridge.sol 14-of-20 Validator JILBridge.sol
JILWrappedERC20 Consensus Layer JILWrappedERC20
ComplianceHook Merkle Proof Relay ComplianceHook
3.1 Bridge Flows
Deposit Flow (XDC to JIL):
- User calls
deposit()on JILBridge.sol deployed on XDC - XRC-20 tokens or native XDC are locked in the bridge contract
- Bridge relayer detects the deposit event on XDC
- Relayer submits Merkle proof to JIL L1 validators
- 14-of-20 validators approve the mint
- Wrapped tokens (wXDC, wJIL) are minted on JIL L1
Withdrawal Flow (JIL to XDC):
- User calls
burn()on JIL L1 to destroy wrapped tokens - Burn event is recorded on JIL L1 ledger
- Bridge relayer generates burn proof
- 14-of-20 validators sign the withdrawal approval
- Challenge period elapses (24h for amounts >$100K)
- Relayer calls
release()on XDC to unlock original assets
3.2 Relayer Architecture
The bridge relayer is a stateless service that monitors events on both chains. It does not hold custody of any assets. Its role is strictly limited to relaying proofs between chains and submitting validator-signed transactions. The relayer runs as a redundant cluster with at least 3 instances for fault tolerance.
4. Smart Contracts
The JIL-XDC bridge reuses the same audited contract suite deployed on Ethereum. Because XDC is fully EVM-compatible, the contracts compile and deploy with identical bytecode.
| Contract | Description | Key Features |
|---|---|---|
| JILBridge.sol | Core lock-and-mint bridge contract | 14-of-20 validator threshold for standard withdrawals, configurable large withdrawal delays, Merkle proof verification, pausable by governance |
| JILWrappedERC20.sol | XRC-20 wrapped JIL token on XDC | ERC-20/XRC-20 compatible, compliance hooks on transfer, mint/burn restricted to bridge contract, permit (EIP-2612) support |
| DefaultComplianceHook.sol | Transfer compliance enforcement | Blocklist enforcement, large withdrawal delay (>$100K triggers 24h hold), KYC status verification, governance-updateable parameters |
4.1 Contract Interfaces
// JILBridge.sol - Core deposit and withdrawal interface
interface IJILBridge {
function deposit(address token, uint256 amount, bytes32 destChainId) external payable;
function release(address token, address to, uint256 amount, bytes32[] calldata proof) external;
function setValidatorThreshold(uint8 threshold) external; // governance only
function pause() external; // emergency governance action
}
// JILWrappedERC20.sol - Wrapped token interface
interface IJILWrappedERC20 {
function mint(address to, uint256 amount) external; // bridge only
function burn(address from, uint256 amount) external; // bridge only
function setComplianceHook(address hook) external; // governance only
}
// DefaultComplianceHook.sol - Compliance checks on transfer
interface IComplianceHook {
function beforeTransfer(address from, address to, uint256 amount) external view returns (bool);
function addToBlocklist(address account) external; // compliance officer
function setLargeWithdrawalThreshold(uint256 amount) external; // governance
}
5. Supported Assets
The JIL-XDC bridge supports bidirectional transfer of the following asset types at launch. Additional XRC-20 tokens can be whitelisted through governance proposals.
| Asset | Type | Deposit (XDC to JIL) | Withdrawal (JIL to XDC) | Notes |
|---|---|---|---|---|
| XDC | Native token | Lock XDC - Mint wXDC on JIL | Burn wXDC on JIL - Release XDC | Wrapped as wXDC on JIL L1 |
| wJIL | Wrapped JIL on XDC | Burn wJIL on XDC - Release JIL on L1 | Lock JIL on L1 - Mint wJIL on XDC | XRC-20 with compliance hooks |
| XRC20-USDT | Tether on XDC | Lock USDT - Mint wUSDT on JIL | Burn wUSDT - Release USDT on XDC | Subject to compliance hook checks |
| XRC20-USDC | USD Coin on XDC | Lock USDC - Mint wUSDC on JIL | Burn wUSDC - Release USDC on XDC | Subject to compliance hook checks |
6. Security Model
The JIL-XDC Bridge inherits the full security model of JIL Sovereign's decentralized validator infrastructure. Every cross-chain operation requires cryptographic approval from a supermajority of validators distributed across 13 jurisdictions.
| Security Feature | Description |
|---|---|
| 14-of-20 Validator Threshold | Every withdrawal requires signatures from at least 14 of 20 validators. Validators are geographically distributed across 13 jurisdictions, preventing single-nation seizure or coercion attacks. |
| Large Withdrawal Delays | Withdrawals exceeding $100,000 USD equivalent are subject to a mandatory 24-hour delay. This provides a challenge window for validators to flag suspicious transactions before funds leave the bridge. |
| Merkle Proof Verification | Every deposit and burn event is recorded in a Merkle tree. The bridge relayer submits inclusion proofs that are verified on-chain, ensuring no fabricated events can trigger mints or releases. |
| Compliance Hooks | All bridge transfers pass through DefaultComplianceHook.sol, enforcing blocklist checks, KYC verification, and large withdrawal delay rules before any token movement is approved. |
6.1 Challenge Period
After a withdrawal is approved by the validator set, a challenge period begins before finalization. During this window, any validator can submit a fraud proof to halt the withdrawal. Standard withdrawals (under $100K) have a 1-hour challenge period. Large withdrawals (over $100K) have a 24-hour challenge period.
6.2 Emergency Controls
The bridge contract includes a pause() function callable only by a governance multi-sig (5-of-9 core team members). When paused, no new deposits or withdrawals can be initiated, but in-flight operations continue to settle. Unpausing requires a governance vote with 14-of-20 validator approval.
7. Address Normalization
XDC Network uses a non-standard address format with an xdc prefix instead of the Ethereum-standard 0x prefix. While both formats refer to the same underlying 20-byte address, tooling and user interfaces must handle the conversion correctly.
7.1 Format Conversion
| Format | Example | Context |
|---|---|---|
| XDC Format | xdc7A3B22F6c8b4e5D9a1C3E8F2b6A4d0C5e8f1a2 |
XDC wallets, block explorers, user-facing UIs |
| 0x Format | 0x7A3B22F6c8b4e5D9a1C3E8F2b6A4d0C5e8f1a2 |
Smart contracts, RPC calls, Hardhat/Foundry tooling |
7.2 Bridge Relayer Normalization
The bridge relayer automatically normalizes addresses between the two formats. When a user submits a deposit with an xdc-prefixed address, the relayer converts it to 0x format before passing it to the smart contract layer. When displaying addresses to users, the relayer converts back to xdc format for XDC-side transactions.
// Address normalization utility
function normalizeXdcAddress(address: string): string {
if (address.toLowerCase().startsWith('xdc')) {
return '0x' + address.slice(3);
}
return address;
}
function toXdcFormat(address: string): string {
if (address.toLowerCase().startsWith('0x')) {
return 'xdc' + address.slice(2);
}
return address;
}
0x format. The xdc prefix is a display convention only. The bridge relayer handles this conversion transparently so users can interact with the bridge using either format.
8. Configuration
The bridge deployment requires the following environment variables and Hardhat network configuration. All sensitive values (deployer keys, validator keys) must be stored in a secure vault and injected at deploy time.
8.1 Environment Variables
| Variable | Description | Example |
|---|---|---|
| XDC_RPC_URL | XDC Mainnet JSON-RPC endpoint | https://rpc.xdc.org |
| XDC_APOTHEM_RPC_URL | Apothem testnet JSON-RPC endpoint | https://rpc.apothem.network |
| DEPLOYER_KEY | Private key for contract deployment | 0x... (64 hex chars) |
| VALIDATOR_THRESHOLD | Minimum validator signatures required | 14 (of 20 total validators) |
| LARGE_WITHDRAWAL_THRESHOLD | USD amount triggering 24h delay | 100000 ($100,000 USD) |
| CHALLENGE_PERIOD_STANDARD | Challenge window for standard withdrawals | 3600 (1 hour in seconds) |
| CHALLENGE_PERIOD_LARGE | Challenge window for large withdrawals | 86400 (24 hours in seconds) |
8.2 Hardhat Network Configuration
// hardhat.config.ts - XDC network configuration
const config: HardhatUserConfig = {
networks: {
xdc: {
url: process.env.XDC_RPC_URL || "https://rpc.xdc.org",
chainId: 50,
accounts: [process.env.DEPLOYER_KEY],
gasPrice: 250_000_000, // 0.25 Gwei (XDC gas is very cheap)
},
apothem: {
url: process.env.XDC_APOTHEM_RPC_URL || "https://rpc.apothem.network",
chainId: 51,
accounts: [process.env.DEPLOYER_KEY],
gasPrice: 250_000_000,
},
},
solidity: {
version: "0.8.24",
settings: {
optimizer: { enabled: true, runs: 200 },
},
},
};
9. Deployment
Bridge deployment uses the deploy-xdc.ts Hardhat script, which handles contract deployment, validator registration, and compliance hook configuration in a single atomic sequence.
9.1 Apothem Testnet Deployment
# 1. Install dependencies
npm install
# 2. Compile contracts
npx hardhat compile
# 3. Deploy to Apothem testnet
npx hardhat run scripts/deploy-xdc.ts --network apothem
# 4. Verify contracts on Apothem explorer
npx hardhat verify --network apothem <BRIDGE_ADDRESS>
npx hardhat verify --network apothem <WRAPPED_TOKEN_ADDRESS>
npx hardhat verify --network apothem <COMPLIANCE_HOOK_ADDRESS>
9.2 XDC Mainnet Deployment
# 1. Ensure deployer wallet has sufficient XDC for gas
# Estimated: ~5 XDC for full deployment (bridge + wrapped token + compliance hook)
# 2. Deploy to XDC Mainnet
npx hardhat run scripts/deploy-xdc.ts --network xdc
# 3. Verify contracts on XDC BlocksScan
npx hardhat verify --network xdc <BRIDGE_ADDRESS>
npx hardhat verify --network xdc <WRAPPED_TOKEN_ADDRESS>
npx hardhat verify --network xdc <COMPLIANCE_HOOK_ADDRESS>
# 4. Register validators (14-of-20 threshold)
npx hardhat run scripts/register-validators.ts --network xdc
# 5. Configure compliance hook parameters
npx hardhat run scripts/configure-compliance.ts --network xdc
9.3 Post-Deployment Verification
- Confirm bridge contract is deployed and unpaused on XDC BlocksScan
- Verify all 20 validator addresses are registered in the bridge contract
- Test a small deposit/withdrawal cycle on Apothem before mainnet
- Confirm compliance hook is correctly linked to the wrapped token
- Verify address normalization works for both
xdcand0xformats - Run the bridge relayer health check:
curl http://relayer:8080/health - Monitor first 100 mainnet transactions for anomalies before full launch