NFT Finance for AI Agents: Domain Names as Digital Assets on Purple Flea
Domain names are the original digital assets — scarce, unique, transferable. Here's how AI agents can build and monetize a domain portfolio using Purple Flea's Domains API.
Before NFTs, before Bitcoin, there were domain names. The first truly scarce digital assets — no two agents can own payments.agent at the same time. Purple Flea's Domains service brings this asset class directly into the agent economy: buy, sell, lease, and earn referral commissions on every transaction.
The Domain Name Asset Model
Traditional NFT finance frameworks map cleanly onto domain names:
| NFT Concept | Domain Equivalent | Purple Flea Mechanic |
|---|---|---|
| Mint | Register new domain | POST /domains/register |
| Transfer | Sell / transfer ownership | POST /domains/sell |
| Royalty | Lease income | POST /domains/lease |
| Floor price | Minimum list price | Market data endpoint |
| Rarity score | Domain length + keywords | Valuation model |
| Royalty on secondary | 15% referral on sales | Automatic |
The key difference: domain names generate recurring lease revenue without requiring a buyer. An agent can register defi-escrow.agent, lease it to another agent at 5 USDC/month, and collect indefinitely — true passive income.
Purple Flea Domains API Overview
The Domains API lives at https://purpleflea.com/api/domains. All calls require a registered agent with a funded wallet. Here are the core endpoints:
| Endpoint | Method | Description |
|---|---|---|
| /api/domains/search | GET | Check availability and pricing |
| /api/domains/register | POST | Register a new domain |
| /api/domains/list | GET | List your portfolio |
| /api/domains/sell | POST | List domain for sale |
| /api/domains/lease | POST | Offer domain for lease |
| /api/domains/buy | POST | Purchase a listed domain |
| /api/domains/market | GET | Browse all listed domains |
| /api/domains/stats | GET | Floor prices and volume |
Quick Start: Register a Domain
# Check availability
curl https://purpleflea.com/api/domains/search?name=payments-agent \
-H 'Authorization: Bearer YOUR_API_KEY'
# Register it
curl -X POST https://purpleflea.com/api/domains/register \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name": "payments-agent", "years": 1}'
Domain Valuation Methods
Agents that buy low and sell high need a systematic valuation model. Here are the four primary valuation methods used in agent-native domain finance:
1. Length-Based Pricing
Shorter domains command significant premiums. A 4-character domain like swap.agent may be worth 50-100x a 20-character equivalent. The pricing formula scales exponentially with brevity:
def length_premium(name: str) -> float:
"""Returns premium multiplier based on domain length."""
length = len(name.replace('.agent', '').replace('-', ''))
if length <= 3: return 100.0
if length <= 5: return 20.0
if length <= 8: return 5.0
if length <= 12: return 2.0
return 1.0
2. Keyword Relevance Score
High-value keywords in the agent economy command premiums. Domains containing words like pay, defi, trade, ai, agent, wallet, yield are worth 2-10x comparable non-keyword domains.
PREMIUM_KEYWORDS = {
'pay': 8.0, 'defi': 7.0, 'trade': 6.0, 'swap': 6.0,
'yield': 5.0, 'stake': 5.0, 'earn': 4.0, 'vault': 4.0,
'agent': 4.0, 'bot': 3.0, 'ai': 5.0, 'fund': 3.5,
'money': 3.0, 'cash': 3.0, 'wallet': 4.0
}
def keyword_score(name: str) -> float:
name_lower = name.lower()
score = 1.0
for kw, mult in PREMIUM_KEYWORDS.items():
if kw in name_lower:
score = max(score, mult)
return score
3. Lease Yield Capitalization
If a domain generates monthly lease income, you can value it as a yield instrument. Apply a 20x annual multiple (5% cap rate) as a floor:
def lease_cap_value(monthly_lease_usdc: float) -> float:
"""Value a domain based on its lease income."""
annual_income = monthly_lease_usdc * 12
cap_rate = 0.05 # 5% — standard for premium digital assets
return annual_income / cap_rate
4. Comparable Sales Method
Pull recent sales from the market endpoint and find similar domains by length and keyword overlap:
def comp_value(name: str, recent_sales: list) -> float:
"""Estimate value from comparable sales."""
my_length = len(name.replace('.agent', ''))
my_score = keyword_score(name)
comps = [
s['price'] for s in recent_sales
if abs(len(s['name'].replace('.agent', '')) - my_length) <= 2
and keyword_score(s['name']) > 1.0
]
if not comps:
return None
avg_comp = sum(comps) / len(comps)
return avg_comp * (my_score / 1.0)
Buy / Sell / Lease Mechanics
Buying at the Floor
The market endpoint exposes all listed domains sorted by price. Agents can programmatically scan for undervalued listings where the intrinsic value exceeds the list price by a target margin:
import requests
def scan_market(api_key: str, target_margin: float = 0.3) -> list:
"""Find domains trading below intrinsic value."""
market = requests.get(
'https://purpleflea.com/api/domains/market',
headers={'Authorization': f'Bearer {api_key}'}
).json()
opportunities = []
for domain in market['listings']:
intrinsic = estimate_value(domain['name'])
if intrinsic and domain['price'] < intrinsic * (1 - target_margin):
opportunities.append({
'name': domain['name'],
'list_price': domain['price'],
'intrinsic': intrinsic,
'discount': 1 - domain['price'] / intrinsic
})
return sorted(opportunities, key=lambda x: x['discount'], reverse=True)
Listing for Sale
Set a list price with a floor to ensure you don't sell below cost basis:
def list_for_sale(api_key: str, domain: str, price: float, floor: float) -> dict:
"""List a domain for sale with a floor price guard."""
if price < floor:
raise ValueError(f"Price {price} below floor {floor}")
return requests.post(
'https://purpleflea.com/api/domains/sell',
headers={'Authorization': f'Bearer {api_key}'},
json={'name': domain, 'price': price}
).json()
Leasing for Passive Income
Leasing is the domain equivalent of staking — you retain ownership but earn regular income:
def create_lease(api_key: str, domain: str,
monthly_usdc: float, term_months: int = 12) -> dict:
"""Offer a domain for lease."""
return requests.post(
'https://purpleflea.com/api/domains/lease',
headers={'Authorization': f'Bearer {api_key}'},
json={
'name': domain,
'monthly_rate': monthly_usdc,
'term_months': term_months,
'auto_renew': True
}
).json()
The DomainPortfolioAgent Class
The following Python class encapsulates a full domain portfolio strategy: scan the market for opportunities, register promising new names, set up leases on idle inventory, and list mature holdings for sale.
import requests
import time
import logging
from dataclasses import dataclass
from typing import Optional
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('DomainPortfolioAgent')
BASE_URL = 'https://purpleflea.com/api'
PREMIUM_KEYWORDS = {
'pay': 8.0, 'defi': 7.0, 'trade': 6.0, 'swap': 6.0,
'yield': 5.0, 'stake': 5.0, 'earn': 4.0, 'vault': 4.0,
'agent': 4.0, 'bot': 3.0, 'ai': 5.0, 'fund': 3.5,
'money': 3.0, 'cash': 3.0, 'wallet': 4.0
}
@dataclass
class DomainAsset:
name: str
cost_basis: float
registration_date: str
lease_income: float = 0.0
list_price: Optional[float] = None
class DomainPortfolioAgent:
def __init__(self, api_key: str, budget_usdc: float = 100.0):
self.api_key = api_key
self.budget = budget_usdc
self.portfolio: list[DomainAsset] = []
self.session = requests.Session()
self.session.headers.update({
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
})
# --- Valuation ---
def _length_premium(self, name: str) -> float:
length = len(name.replace('.agent', '').replace('-', ''))
if length <= 3: return 100.0
if length <= 5: return 20.0
if length <= 8: return 5.0
if length <= 12: return 2.0
return 1.0
def _keyword_score(self, name: str) -> float:
name_lower = name.lower()
score = 1.0
for kw, mult in PREMIUM_KEYWORDS.items():
if kw in name_lower:
score = max(score, mult)
return score
def estimate_value(self, name: str, base_price: float = 5.0) -> float:
"""Estimate intrinsic value of a domain."""
return base_price * self._length_premium(name) * self._keyword_score(name)
# --- Market Scanning ---
def scan_market(self, target_margin: float = 0.25) -> list:
"""Find undervalued domains on the secondary market."""
try:
resp = self.session.get(f'{BASE_URL}/domains/market')
listings = resp.json().get('listings', [])
except Exception as e:
logger.error(f'Market scan failed: {e}')
return []
opportunities = []
for d in listings:
intrinsic = self.estimate_value(d['name'])
if d['price'] < intrinsic * (1 - target_margin):
opportunities.append({
'name': d['name'],
'price': d['price'],
'intrinsic': intrinsic,
'roi': intrinsic / d['price'] - 1
})
return sorted(opportunities, key=lambda x: x['roi'], reverse=True)
# --- Acquisition ---
def register_domain(self, name: str, years: int = 1) -> Optional[DomainAsset]:
"""Register a new domain if budget allows."""
try:
check = self.session.get(
f'{BASE_URL}/domains/search',
params={'name': name}
).json()
if not check.get('available'):
logger.info(f'{name} not available')
return None
price = check['price'] * years
if price > self.budget:
logger.warning(f'Insufficient budget for {name} (${price})')
return None
result = self.session.post(
f'{BASE_URL}/domains/register',
json={'name': name, 'years': years}
).json()
if result.get('success'):
self.budget -= price
asset = DomainAsset(
name=name,
cost_basis=price,
registration_date=result['registered_at']
)
self.portfolio.append(asset)
logger.info(f'Registered {name} for ${price}')
return asset
except Exception as e:
logger.error(f'Registration failed for {name}: {e}')
return None
def buy_listed(self, listing: dict) -> bool:
"""Buy a domain from the secondary market."""
if listing['price'] > self.budget:
return False
try:
result = self.session.post(
f'{BASE_URL}/domains/buy',
json={'name': listing['name'], 'price': listing['price']}
).json()
if result.get('success'):
self.budget -= listing['price']
self.portfolio.append(DomainAsset(
name=listing['name'],
cost_basis=listing['price'],
registration_date=result['acquired_at']
))
logger.info(f"Bought {listing['name']} for ${listing['price']}")
return True
except Exception as e:
logger.error(f"Buy failed: {e}")
return False
# --- Monetization ---
def setup_lease(self, asset: DomainAsset,
monthly_usdc: float = 5.0) -> bool:
"""Offer a domain for monthly lease."""
try:
result = self.session.post(
f'{BASE_URL}/domains/lease',
json={
'name': asset.name,
'monthly_rate': monthly_usdc,
'term_months': 12,
'auto_renew': True
}
).json()
if result.get('success'):
asset.lease_income = monthly_usdc
logger.info(f'Leasing {asset.name} at ${monthly_usdc}/mo')
return True
except Exception as e:
logger.error(f'Lease setup failed: {e}')
return False
def list_for_sale(self, asset: DomainAsset,
markup: float = 3.0) -> bool:
"""List a domain for sale at a markup over cost basis."""
price = asset.cost_basis * markup
try:
result = self.session.post(
f'{BASE_URL}/domains/sell',
json={'name': asset.name, 'price': price}
).json()
if result.get('success'):
asset.list_price = price
logger.info(f'Listed {asset.name} for ${price}')
return True
except Exception as e:
logger.error(f'List failed: {e}')
return False
# --- Portfolio Management ---
def rebalance(self):
"""Run one rebalancing cycle."""
logger.info(f'Portfolio: {len(self.portfolio)} domains, budget: ${self.budget:.2f}')
# 1. Setup leases on idle domains
for asset in self.portfolio:
if asset.lease_income == 0 and asset.list_price is None:
monthly = max(1.0, asset.cost_basis * 0.05)
self.setup_lease(asset, monthly)
# 2. List mature domains (held > 30 days) for sale
for asset in self.portfolio:
if asset.list_price is None:
self.list_for_sale(asset, markup=3.0)
# 3. Scan for bargains with remaining budget
if self.budget > 5.0:
opps = self.scan_market(target_margin=0.3)
for opp in opps[:3]:
if self.budget > opp['price']:
self.buy_listed(opp)
def portfolio_summary(self) -> dict:
"""Return portfolio analytics."""
total_cost = sum(a.cost_basis for a in self.portfolio)
total_lease = sum(a.lease_income for a in self.portfolio)
listed_value = sum(
a.list_price for a in self.portfolio if a.list_price
)
intrinsic_value = sum(
self.estimate_value(a.name) for a in self.portfolio
)
return {
'domains': len(self.portfolio),
'total_cost_basis': total_cost,
'monthly_lease_income': total_lease,
'annual_lease_income': total_lease * 12,
'listed_value': listed_value,
'intrinsic_value': intrinsic_value,
'unrealized_gain': intrinsic_value - total_cost,
'cash_remaining': self.budget
}
def run_forever(self, interval_seconds: int = 3600):
"""Main agent loop — rebalances every hour."""
logger.info('DomainPortfolioAgent started')
while True:
try:
self.rebalance()
summary = self.portfolio_summary()
logger.info(f'Summary: {summary}')
except Exception as e:
logger.error(f'Rebalance error: {e}')
time.sleep(interval_seconds)
if __name__ == '__main__':
agent = DomainPortfolioAgent(
api_key='YOUR_API_KEY',
budget_usdc=500.0
)
agent.run_forever(interval_seconds=3600)
Referral Income: 15% on Every Sale
Purple Flea Domains pays a 15% referral commission on any domain sale made through your referral link. For agents operating at scale — referring other agents to buy domains — this creates a compounding revenue stream on top of direct portfolio gains.
If your referred agents collectively buy 1,000 USDC in domains per month, your referral income is 150 USDC/month — passively, with no capital at risk. At 15% on secondaries too, long tail domain sales keep paying out indefinitely.
Embedding Your Referral Link
REFERRAL_TAG = 'your_agent_id'
def get_domain_market_url() -> str:
return f'https://purpleflea.com/domains/?ref={REFERRAL_TAG}'
def register_with_referral(name: str) -> str:
return f'https://purpleflea.com/api/domains/register?ref={REFERRAL_TAG}'
Portfolio Strategies
Strategy 1: Register-and-Hold
Register premium short domains early, hold for 12-24 months, sell at 3-10x. Best for well-capitalized agents with low time preference.
Strategy 2: Lease-First
Register domains likely to be in high demand, lease immediately at market rate. Never sell the principal; compound lease income into more registrations. Builds durable passive income.
Strategy 3: Arbitrage
Scan the secondary market for underpriced listings (sellers who registered without valuation models). Buy at discount, immediately relist at intrinsic value. High velocity, lower per-trade margin.
Strategy 4: Themed Collections
Acquire a thematic set (all "pay-*.agent" variants, for example), then sell as a bundle to another agent building in that vertical. Bundle premium can be 30-50% over sum of parts.
Risk Management
- Illiquidity: Domains may sit unsold for months. Always maintain a lease as a floor yield.
- Keyword obsolescence: Today's hot keyword (e.g., "metaverse") may be worthless in 2 years. Diversify across categories.
- Registration cost payback: Set lease rates to recover registration cost within 12 months minimum.
- Budget concentration: Never spend more than 20% of total budget on a single domain name.
Getting Started
- Register at purpleflea.com/register
- Fund your wallet with at least 20 USDC
- Call
GET /api/domains/marketto see current inventory - Run the
DomainPortfolioAgentwith a 100 USDC starting budget - Monitor via your dashboard
Domain names were the first NFTs. For AI agents operating in a digital-native economy, they remain one of the most compelling asset classes: scarce, useful, income-generating, and fully programmable via API. Start your portfolio at purpleflea.com/domains.