# Libre DeFi > Libre DeFi (https://defi.libre.org) is a decentralized finance dashboard for the Libre blockchain, an Antelope-based chain bridged to Bitcoin and Ethereum. Users can lend USDT into a variable-rate pool, borrow USDT against Bitcoin collateral, swap and trade BTC/USDT on an on-chain orderbook DEX, stake LIBRE, participate in DAO governance, and contribute to mining. No signup or KYC — access is wallet-based. ## Pages - [Portfolio](https://defi.libre.org/): Wallet overview, token balances, transaction history, and connection to Libre, Bitcoin, and Ethereum wallets. - [Protocol](https://defi.libre.org/protocol): Protocol-wide stats — total value locked, lending pool aggregates, collateral, and bridge metrics. - [Borrow](https://defi.libre.org/borrow): Borrow USDT against a Bitcoin-collateralized vault at a variable utilization-based rate (max 50% LTV, liquidation at 80% with a 72-hour grace period). - [Lend](https://defi.libre.org/lend): Deposit USDT into the variable-rate Lending Pool (TPF shares) to earn yield. Legacy fixed pools (TP/TPA–TPE) are withdrawal-only. Redemptions queue when liquidity is out in active loans. - [Trade](https://defi.libre.org/dex): On-chain orderbook DEX (BTC-USDT, LIBRE-BTC). - [Swap](https://defi.libre.org/swap): Simple swap interface over the same orderbook, plus AMM liquidity pools. - [Earn](https://defi.libre.org/earn): Stake LIBRE for governance rewards and lock-period yield. - [Pools](https://defi.libre.org/pool): Manage AMM liquidity positions (BLLP = BTC/LIBRE, TBLP = BTC/USDT); add/remove liquidity. - [DAO](https://defi.libre.org/dao): Governance proposals and voting using staked LIBRE. - [Mining](https://defi.libre.org/mining): Contribution-based mining program with on-chain rewards. - [Validators](https://defi.libre.org/validators): View and vote for Libre block producers. - [Peg-in](https://defi.libre.org/peg-in): Bridge BTC from Bitcoin or USDT from Ethereum onto Libre. ## For bots and programmatic agents Libre is an Antelope (EOSIO) chain. Any Antelope tooling works: WharfKit (JS/TS), eosjs, cleos, pyntelope. Sign transactions with a standard Antelope key pair. ### Chain endpoints - Mainnet chain API + Hyperion history: https://api.libre.cryptobloks.io (chain_id 38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465) - Testnet chain API + Hyperion history: https://api.testnet.libre.cryptobloks.io (chain_id b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee) - Alternate mainnet API: https://lb.libre.org — testnet: https://testnet.libre.org - DEX price/candle API: https://dex-api.libre.org/dex/prices?pair=btcusdt (testnet: https://testnet-api.libre.org) - Read state with POST /v1/chain/get_table_rows; history with GET /v2/history/get_actions ### Creating an account - Easiest: download the Bitcoin Libre wallet (https://www.bitcoinlibre.io/ — iOS/Android) which creates a free Libre account, or use Anchor (https://www.greymass.com/anchor). - Programmatic: any funded Libre account can create another via the standard Antelope `eosio::newaccount` action (plus `buyrambytes`), assigning your bot's public keys to owner/active. - Tokens: BTC (8dp, contract btc.libre), USDT (8dp, usdt.libre), LIBRE (4dp, eosio.token), CBTC vault collateral (8dp, cbtc.libre), TPF lending shares (8dp, tp.libre). ### Trading BTC/USDT on the DEX (contract: dex.libre) Orders are placed by token transfer with a structured memo. Pair `btcusdt` uses SATS (base, btc.libre) and USDT (quote, usdt.libre). - Buy BTC: `usdt.libre::transfer { to: "dex.libre", quantity: " USDT", memo: "buy: SATS: USDT" }` - Sell BTC: `btc.libre::transfer { to: "dex.libre", quantity: " BTC", memo: "sell: SATS: USDT" }` - Cancel: `dex.libre::cancelorder { orderIdentifier: , pair: "btcusdt" }` - Read the book: table `orderbook2` on dex.libre, scope `btcusdt`; trade history in table `history2`. - AMM alternative (contract swap.libre): `transfer` to swap.libre with memo `exchange: TBLP, , ...` swaps against the BTC/USDT pool; pool state in table `stat`. ### Getting a USDT loan against BTC (contract: loan) 1. `loan::createvault { owner, vault }` — create a collateral vault (vault is a generated account name). 2. `loan::genaddr { owner }` — generate the vault's Bitcoin deposit address; read it from table `accounts` on v.libre. 3. Send BTC to that address; the v.libre bridge mints CBTC collateral into the vault (fee: $0). 4. `loan::borrowvar { account, amount: " USDT", pool_id: 6, max_apr_bps }` — borrow at the current variable rate; max_apr_bps caps the rate you'll accept (must be ≥ 1). If pool liquidity is short, the request queues (table `loanqueue`); cancel with `loan::cancelloan { account }`. 5. Repay anytime: `usdt.libre::transfer { to: "loan", quantity: " USDT", memo: "payback:" }`. 6. Withdraw collateral: `loan::withdraw { account, cbtc_amount, btc_address }`. Terms: max 50% initial LTV; liquidation threshold 80% LTV with a 72-hour sustained-breach grace period; liquidated BTC sold at a 1% discount. Authoritative parameters live in table `globalparams` on the loan contract; BTC price comes from the `oracle` contract (table `aggfeeds`, pair `btcusd`, median of independent feeders, never used if older than 5 minutes). ### Lending USDT - Deposit: `usdt.libre::transfer { to: "loan", quantity: " USDT", memo: "pool:6" }` — receive TPF shares (tp.libre). - Borrower APR follows a utilization curve (table `poolratecfg`): base 3% at 0% utilization, 9% at the 80% kink, 20% at 100%. Lender yield = borrower APR × utilization. - Redeem: `tp.libre::transfer { to: "loan", quantity: " TPF", memo: "pool:6" }`; queued redemptions fill as liquidity returns (`loan::processqueue { limit }` is permissionless). - Share value (NAV) = (available + outstanding − buyback_accrued) / TPF supply; pool state in table `poolstats` (pool_id 6). ## Cross-chain bridges - v.libre — Bitcoin vault (collateral) bridge. CBTC pegout fee: $0. - x.libre — wrapped BTC bridge. Pegout fee: 50 bps, capped at 0.005 BTC, min withdraw 0.0005 BTC. Generate a deposit address with `x.libre::newaccount { account }`. - t.libre — USDT bridge (Libre USDT ↔ Ethereum USDT). Pegout fee: 100 bps, min 5 USDT, max 30 USDT, min withdraw 10 USDT. Generate a deposit address with `t.libre::newaccount { account }`. ## Resources - [Libre Chain docs](https://docs.libre.org) - [Libre block explorer](https://www.libreblocks.io) - [Libre testnet explorer](https://testnet.libreblocks.io) - [Active loan stats](https://libre-tools.com/loans/mainnet/active) ## Optional - [Sitemap](https://defi.libre.org/sitemap.xml) - [Robots](https://defi.libre.org/robots.txt)