Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Latest commit

 

History

History
72 lines (49 loc) · 2.01 KB

dex-fuctions.md

File metadata and controls

72 lines (49 loc) · 2.01 KB

Dex Fuctions

The Dex will have four parts:

  • Atomic Swap
  • Low fees (0.005%)
  • Without KYC
  • Lightning Native Swap

HOW WORKS?

For make Swap between chains different wil be necessary have HTLC(Hashed TimeLock contract), where alllow commucation with A and B that have information:

  • sender
  • recipient
  • amount of BTC
  • expiration
  • hashlock=hash(secret_A)
  • PHold (Payment Hold)

Example: LBTC<>BTC:zap:.

  1. User A creates an HTLC on source layer with the desired LBTC (1 LBTC) to be swapped and B as the recipient (generally found and negotiated off-chain like 1 BTC on LN).
  2. B checks if the source contract is correct and finalized, then B will create another HTLC with reversed sender/recipient, i.e., sender = B and recipient = A with the amount of token (1 LBTC) that user A wishes to receive. An important note is that B will copy the hashlock on the source contract even B has no idea the secret is.
  3. User A checks if the destination contract matches the user’s swap request and is finalized, then user A will unlock 1 LBTC by revealing secret_A.
  4. At this moment, LP B can learn the secret and unlock 1 LBTC at the source contract, which completes the swap.
  5. And A received BTC on Lightning Network using Invoice (PHold).

LIQUIDITY PROVIDER

We'll use hosting channels or funding channels for create liquidity provider safe and unique.

Channel A<>L-BTC + BTC

Remember the L-BTC will be "token" synthetic inside Lightning

GRAPHIC PORTICO 1

GRAPHIC PORTICO 2

FEATURES and COMPATIBILITY

  • Fedimint
  • Lightning Network (LND/LDK/CLN)
  • Liquid Network
  • Sequentia
  • Spacechain
  • Softchain
  • Statechain
  • RGB
  • Fabric Protocol / PortalOS
  • Tor and I2P
  • Drivechains
  • Ark
  • BIP-199
  • DLCs
  • PTLCs
  • DHT (HyperCore)
  • Taproot
  • Covenants
  • Taproot Channels