Skip to main content

Security Model

Core Security Features

Pre-Signed Transactions

  • Minimizes user intervention while maintaining security
  • Allows automated claim execution
  • Reduces risk of user error or timing issues
  • Ensures funds can be claimed even if counterparty is offline

Time-Lock Mechanism

  • Ensures funds can always be claimed by the rightful owner
  • Implements dual-timelock system (L1 and L2)
  • Prevents permanent fund locking
  • Enables claim of locked funds if swap fails

Atomic Execution

  • Prevents partial swaps
  • Eliminates asymmetric risks
  • Ensures both parties receive funds or neither does
  • Maintains transaction integrity across chains

Locktime Considerations

Timelock Design (L1 >> L2)

Setting LOCKTIME_1 (L1) > LOCKTIME_2 (L2) ensures atomic security:
  1. Primary Security Features:
    • Guaranteed claimability for users
    • Prevention of asymmetric execution
    • Atomic completion guarantee
  2. User Protection:
    • Funds always recoverable
    • No trust required in Liquidity Node
    • Clear fallback mechanisms

Fail-Safe Mechanisms

  1. Automatic Recovery
    • User funds auto-revert after L2 expiry
    • Liquidity Node funds revert after L1 expiry
    • No manual intervention needed
  2. Cross-Chain Safety
    • Sequential unlocking prevents race conditions
    • Hash-locked contracts ensure atomic execution
    • Timelock differentials prevent gaming

Secret Management

Secret Generation

  • Cryptographically secure random generation
  • High entropy requirements
  • Uniqueness verification
  • Secure storage protocols

Hash Commitment

  • SHA-256 hash function
  • Immutable commitment scheme
  • Cross-chain compatibility
  • Verifiable on both networks

Attack Vector Mitigations

Front-Running Protection

  • Pre-signed transactions prevent manipulation
  • Timelock sequencing prevents exploitation

Counterparty Risk Mitigation

  • No custodial requirements
  • Automatic reversion capabilities
  • Trustless execution model