Torch Domain Auction Bot
Domain lending protocol on Solana. Domains become tokens. Tokens become collateral. Top holder controls the domain. Borrow SOL against your position -- but get liquidated and you lose the domain. Built on torchsdk v3.7.23 and the Torch Market protocol.
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install skilldb:mrsirg97-rgb~torchdomainauctionbotcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/skilldb%3Amrsirg97-rgb~torchdomainauctionbot/file -o torchdomainauctionbot.mdGit 仓库获取源码
git clone https://github.com/openclaw/skills/commit/e7d97e05c720198864a98d343c693e6b47cef86a# Torch Domain Auction
Domains become tokens. Tokens become collateral. Top holder controls the domain.
---
## The Idea
Every domain has a name. Every name has a price. But who decides that price?
On Torch Market, domains are launched as tokens with bonding curves. The market decides the price. After bonding completes and the token migrates to Raydium, the domain is permanently linked to that token. From that point forward:
- **The top token holder controls the domain.** Buy enough tokens, you get the domain. Someone buys more, they get it.
- **Holders can borrow SOL against their tokens.** Lock your domain tokens as collateral and extract liquidity — up to 50% LTV, 2% weekly interest.
- **Get liquidated, lose the domain.** If your loan goes underwater (LTV > 65%), anyone can liquidate you. Your collateral changes hands. The domain lease rotates to whoever is now the top holder.
This creates something that doesn't exist in traditional domain markets: **a continuously-priced, borrowable, liquid domain asset** with built-in consequences for overleveraging.
The bot in this kit runs the infrastructure side. It discovers promising domains, launches them as tokens, monitors all active lending positions, and liquidates underwater loans through a Torch Vault. When a liquidation happens, the domain automatically rotates.
---
## How Domains Work on Torch
### Phase 1: Launch (Bonding Curve)
A domain is launched as a Torch Market token. The bonding curve creates the initial market — early buyers get a lower price, the curve rises as demand increases. This is the price discovery phase.
```
domain "pixel.art" → token PIXEL → bonding curve → market cap grows
```
Anyone can buy in. The curve sets the price. Trading fees flow to the community treasury.
### Phase 2: Migration (Domain Becomes Permanent)
When the bonding curve completes, the token migrates to a Raydium liquidity pool. At this point, the domain is **permanently linked** to the token. There is no delisting, no expiry, no central authority. The token IS the domain.
### Phase 3: Lending (Borrow Against Your Domain)
After migration, Torch's built-in lending market activates. Any holder can lock their tokens as collateral and borrow SOL from the community treasury.
```
holder locks 10,000 PIXEL tokens → borrows 0.5 SOL → LTV = 40%
```
The loan accrues 2% interest per epoch (~weekly). As long as the loan stays healthy (LTV < 65%), the borrower keeps their position and their domain control.
### Phase 4: Liquidation (Domain Rotates)
If the token price drops or interest accrues enough to push LTV past 65%, the position becomes liquidatable. A keeper (this bot) pays off the debt using vault SOL and receives the borrower's collateral tokens at a 10% discount.
```
PIXEL price drops → LTV hits 68% → keeper liquidates → collateral moves to vault
→ top holder changes
→ domain lease rotates
```
The borrower loses their tokens. The domain rotates to whoever is now the largest holder. The keeper's vault profits from the 10% bonus.
**This is the key insight: liquidation has real consequences beyond money.** The borrower doesn't just lose capital — they lose control of the domain. This natural tension makes the lending market meaningful. Borrowers are incentivized to maintain healthy positions because the domain itself is at stake.
---
## What the Bot Does
```
┌─────────────────────────────────────────────────────────────────┐
│ DOMAIN AUCTION BOT │
│ │
│ DISCOVER │
│ scrape expiring domains → evaluate quality → generate tickers │
│ │
│ LAUNCH │
│ buildCreateTokenTransaction → bonding curve → domain = token │
│ │
│ MONITOR │
│ for each domain token: │
│ scan lending markets (getLendingInfo) │
│ discover borrowers (getHolders → getLoanPosition) │
│ profile wallets (SAID verification, trade history) │
│ score risk (LTV proximity, momentum, wallet, interest) │
│ │
│ LIQUIDATE │
│ if position.health === 'liquidatable' && risk > threshold: │
│ buildLiquidateTransaction(vault = creator) │
│ sign with agent keypair → submit → confirm │
│ │
│ ROTATE │
│ after liquidation or any holder change: │
│ check top holder → update domain lease │
│ │
│ All SOL from vault. All collateral to vault. Agent holds nothing. │
└─────────────────────────────────────────────────────────────────┘
```
### The Scan Loop
The bot runs a continuous loop:
1. **Scan** — discover all migrated domain tokens with active lending markets
2. **Score** — for each borrower, compute a risk score across four weighted factors:
- LTV proximity (35%) — how close to the 65% liquidation threshold
- Price momentum (25%) — recent token price trend (drops increase risk)
- Wallet reputation (20%) — SAID verification status and trade history
- Interest burden (20%) — accrued interest relative to principal
3. **Liquidate** — execute vault-routed liquidation for positions above the risk threshold
4. **Rotate** — check top holders and update domain leases
5. **Sleep** — wait for the next cycle
### The Agent Keypair
The bot generates a fresh `Keypair` in-process on every startup. No private key file needed. The keypair is disposable — it signs transactions but holds nothing of value (~0.01 SOL for gas).
On first run, the bot verifies vault linkage. If the agent isn't linked, it prints instructions:
```
=== torch domain auction bot ===
agent wallet: 7xK9...
vault creator: 4yN2...
scan interval: 60000ms
--- ACTION REQUIRED ---
agent wallet is NOT linked to the vault.
link it by running (from your authority wallet):
buildLinkWalletTransaction(connection, {
authority: "<your-authority-pubkey>",
vault_creator: "4yN2...",
wallet_to_link: "7xK9..."
})
then restart the bot.
-----------------------
```
### The Vault
All economic activity routes through a Torch Vault:
| Direction | What Happens |
|-----------|-------------|
| **Liquidation: SOL out** | Vault SOL pays off the borrower's debt |
| **Liquidation: tokens in** | Borrower's collateral tokens go to vault ATA at 10% discount |
| **Net per liquidation** | Vault receives collateral worth 110% of SOL spent |
| **Domain rotation** | Collateral changes hands → top holder changes → lease rotates |
The human principal retains full control:
- **Withdraw SOL** from the vault at any time
- **Withdraw tokens** (liquidated collateral) at any time
- **Unlink the agent** — revoke bot access in one transaction
If the agent keypair is compromised, the attacker gets dust and vault access you revoke instantly.
---
## Getting Started
### 1. Install
```bash
npm install torch-domain-auction-bot@2.0.1
```
### 2. Create and Fund a Vault
From your authority wallet:
```typescript
import { Connection } from "@solana/web3.js";
import { buildCreateVaultTransaction, buildDepositVaultTransaction } from "torchsdk";
const connection = new Connection(process.env.SOLANA_RPC_URL);
// C