Libre Chain Docs
WebsiteAppWalletCreate Account
  • The Libre Platform
    • Libre is a Decentralized Lending Marketplace
    • Borrow
    • Lend
    • Run A Libre Node
    • Validators
    • The Smart Contract Platform
      • Building Smart Contracts on Libre
      • Libre Developer Tools
      • Libre Testnet
      • API Docs
  • DeFi on Libre DEX
    • DeFi
    • libreDEX
    • Ordinals
    • Building on Libre
      • How to add a trading pair
  • BitcoinFi on Libre
    • Glossary
  • The LIBRE Reward Coin
    • A reward system for validators and stakers
    • Supply
    • Mint Rush
    • Spindrop
      • How to Claim the LIBRE Spindrop
      • Eligibility Requirements for the LIBRE Spindrop
  • ACCOUNTS AND WALLETS
    • LIBRE Account Names
      • Cryptographic Keys
    • Creating Multiple Accounts
    • Bitcoin Libre Wallet
    • Anchor Wallet
      • Creating a Libre MainNet Account in Anchor
      • Creating a Libre Testnet Account in Anchor
      • Getting Testnet LIBRE Coins
    • Ledger Hardware Wallet
  • EARN
    • Staking
    • Mining
    • Referrals
    • Become a Validator
    • DAO Tax
    • Libre Lightning Provider
  • Governance
    • Voting Power
    • Validator Election
    • Libre DAO
    • Libre Governance Docs
      • Libre Blockchain Operating Agreement (LBOA)
      • Block Producer Agreement
      • Block Producer Minimum Requirements
    • Libre Mainnet Multisig Gov
      • Oct 2024
      • July 2023
      • June 2023
      • April 2023
      • March 2023
      • February 2023
      • December 2022
  • Technical Details
    • Libre Core Constants
    • Mint Rush Details
    • Staking Details
    • Verifying Code Updates
      • Deployed Smart Contract Versions
  • Cross-Chain Interoperability
    • Cross-Chain Overview
    • Bridge Comparison
    • Libre CrossLink Bridge
      • Technical Whitepaper
      • Bitcoin to Libre (Peg-In Process)
      • Libre to Bitcoin (Peg Out)
    • Bitcoin Lightning Network
    • USDT / Ethereum
    • Legacy pNetwork
    • Bitcoin Audit
Powered by GitBook
On this page
  • Features
  • Trading Interfaces
  • Liquidation Opportunities
  • Monitoring Tools
  • Technical Integration

Was this helpful?

Edit on GitLab
  1. DeFi on Libre DEX

libreDEX

PreviousDeFiNextOrdinals

Last updated 11 days ago

Was this helpful?

libreDEX is a fully on-chain smart contract decentralized exchange (DEX) on the Libre blockchain with near-instant finality for trading BTC/USDT pairs.

libreDEX functions essentially as a decentralized version of Binance, where anyone with a Libre account can place bids and offers into the orderbook using wrapped Bitcoin and Tether. This creates a permissionless trading environment with full on-chain transparency.

Features

  • Fully On-Chain: All trades and orders are executed and settled directly on the Libre blockchain

  • Near-Instant Finality: Transactions confirm quickly thanks to Libre's 0.5 second block time

  • Limit and Market Orders: Support for both advanced and basic trading strategies

  • Integration with Liquidation Engine: Provides market liquidity for the loan system

Trading Interfaces

  • Full DEX Interface: - Complete trading interface with limit and market orders

  • Simple Swap Interface: - Streamlined interface for quick market orders

Liquidation Opportunities

libreDEX plays a critical role in Libre's lending ecosystem:

  1. When a loan faces liquidation, the system automatically wraps the bitcoin collateral

  2. The wrapped bitcoin is then traded on libreDEX to recover the loan value

  3. This creates opportunities for traders to purchase liquidated assets at approximately 1% below current market rates

  4. Traders can monitor the DEX for these liquidation events to potentially profit from the discounted BTC

Monitoring Tools

  • API Access: Developers can access the DEX data directly by querying the dex.libre smart contract tables:

    • Available on both mainnet and testnet

    • Use the get_table_rows API method to retrieve current orders, trades, and other data

    • Self-hosting options available for high-frequency monitoring

Technical Integration

Developers can integrate with libreDEX through the Libre blockchain API. Key endpoints include:

  • Order placement and cancellation

  • Market data retrieval

  • Trade history

  • Liquidity information

Orderbook and Tables: provides tools to view the current state of the orderbook and other relevant data

For detailed API documentation, refer to the .

defi.libre.org/dex
defi.libre.org/swap
libre-tools.com
Libre API Docs