Lend and borrow XPOW & APOW tokens; see also xpowermine.com! ⛏️⚡️
⚒️ Install dependencies: requires deno v2.0.0 (or higher)
deno run install👷 Build banq distributables: for Linux, macOS and Windows (64 bit)
deno run build-banq💾 Copy banq.x86_64-*.run (or *.exe) to an installation folder:
[sudo] cp ./dist/banq-mainnet.x86_64-linux.run /usr/local/bin/banq🏦 Mark banq as an executable: on Linux (et al.)
[sudo] chmod +x /usr/local/bin/banq📜 Define the contract-run version: optional
export CONTRACT_RUN=v11b # default; v10c, v11a, v11b.🌐 Define the URL of an Avalanche RPC provider: optional
export PROVIDER_URL=https://api.avax.network/ext/bc/C/rpc # default🔑 Define the private-key of your user account: conditional
export PRIVATE_KEY=0x... # required -- unless the Ledger HW is usedSecurity: Use a space-prefixed export to skip shell history, like
> export PRIVATE_KEY=0x...; never pass a private key as a CLI argument — it is visible viaps aux!
🏦 Invoke the banq command-line interface:
banq --helpbanq <command> <argument(s)> [--option(s)]💸 Supply APOW tokens: into pool=P000
banq supply 1.0 APOW [--pool=P000] [-Y|--broadcast]💳 Borrow XPOW tokens: from pool=P000
banq borrow 1.0 XPOW [--pool=P000] [-Y|--broadcast]🤑 Settle XPOW tokens: into pool=P000
banq settle 1.0 XPOW [--pool=P000] [-Y|--broadcast]💰 Redeem APOW tokens: from pool=P000
banq redeem 1.0 APOW [--pool=P000] [-Y|--broadcast]🎡 Reindex supplied APOW tokens: in pool=P000
banq reindex APOW --mode=supply [--pool=P000] [-Y|--broadcast]🎡 Reindex borrowed XPOW tokens: in pool=P000
banq reindex XPOW --mode=borrow [--pool=P000] [-Y|--broadcast]🏥 Health of $USER's positions: in pool=P000
banq health-of $USER [--pool=P000] [-Y|--broadcast] # USER=0x..💦 Liquidate $USER's positions: in pool=P000
banq liquidate $USER [--pool=P000] [-Y|--broadcast] # USER=0x..💱 Refresh XPOW/APOW feed: for oracle=T000
banq refresh XPOW APOW [--oracle=T000] [-Y|--broadcast] # permissioned?🔃 Retwap XPOW/APOW feed: for oracle=T000
banq retwap XPOW APOW [--oracle=T000] [-Y|--broadcast] # permissioned!📈 Supply and borrow rate(s) of XPOW: in pool=P000 at (±) index
banq rates-of XPOW [--pool=P000] [-@|--at=now] [-Y|--broadcast]📉 Supply and borrow rate(s) of APOW: in pool=P000 incl. history
banq rates-of APOW [--pool=P000] [-@|--at=all] [-Y|--broadcast]🔐 Show authorization matrix: compact role-to-address overview
banq acma [show] [-a|--addresses] [-Y|--broadcast]📋 Show all roles with metadata:
banq acma roles [-Y|--broadcast]👥 Show members with exec-delays:
banq acma members [-a|--addresses] [-Y|--broadcast]🎯 Show target function-to-role mappings:
banq acma targets [-Y|--broadcast]🌳 Show admin/guard hierarchy for exec roles:
banq acma hierarchy [-Y|--broadcast]⏱️ Show grant-delays and target admin-delays (named targets only by default):
banq acma delays [-a|--addresses] [-Y|--broadcast]📜 Show chronological event log with filters:
banq acma logs [-n 50] [-e granted,revoked] [-r POOL_CAP] [-a BOSS] [--asc] [--tx] [-Y|--broadcast]🏁 Initialize XPOW mining: run once per hour
banq xpow-init [-Y|--broadcast]⛏️ Mine XPOW tokens: piped to e.g. netcat (OpenBSD)
banq xpow-mine [-Y|--broadcast] -Pj --pow-level=8 | nc 127.0.0.1 8765⚡ Mint XPOW tokens: piped e.g. from netcat (OpenBSD)
nc -l 8765 | banq xpow-mint [-Y|--broadcast] -Pj [--batch-size=1] \
--max-priority-fee-per-gas=0 \
--max-fee-per-gas=500000000 \
--gas-limit=100000🐋 Docker:
🎁 Claim APOW tokens: for a single NFT
banq apow-claim APOW --nft-id=202500 [-Y|--broadcast]📦 Batch-claim APOW tokens: for multiple NFTs
banq apow-claim-batch APOW --nft-id=202500,202503 [-Y|--broadcast]Config lives in YAML (yml/banq.mainnet.yaml / yml/banq.testnet.yaml, plus gitignored yml/*.local.yaml overrides). cfg/generate.ts flattens it into .env/banq.{net}.env, consumed via --env.
npm run banq
# or:
deno run -A cfg/generate.ts --network=mainnet && deno run -A --env=.env/banq.mainnet.env ./cli/banq/banq-main.tsnpm testdeno lintdeno fmtdeno help© 2025 Moorhead LLC
