Contract Reference
xendune currently deploys 32 smart contracts on any EVM-compatible blockchain. Owner permissions are controlled by a Gnosis Safe multisig wallet.
Core Infrastructure
| Contract |
Purpose |
| PlatformSettings |
Central configuration hub—fee rates, roles, blacklists, merchant risk data, global dictionaries (fiat currencies, payment methods, regions) |
| PlatformFeeSplitter |
Automatic 3-way platform fee split (30/30/40); payee addresses locked at deployment to prevent tampering |
| ArchiveStore |
Generational storage contract for unlimited historical data (1,000 records per generation) |
| ProductLib |
Shared library for settlement logic and safe transfer patterns |
Product System
| Contract |
Purpose |
| ProductFactory |
Deploys product contracts via EIP-1167 clones, manages product indexes and keyword mappings; up to 24 products per page |
| ProductFactoryReader |
Read-only view functions for product queries (pagination, filtering, random ordering) |
| ProductFactoryKeywords |
Keyword submission, approval, and blacklist management |
| ServiceLocationIndex |
City-based index for service products; supports queries by (language/keyword/country/province/city) |
| PhysicalProductTemplate |
Escrow template for physical goods—shipping, auto-confirm deadline, receipt confirmation |
| VirtualProductTemplate |
Escrow template for virtual/digital goods—delivery confirmation, auto-confirm |
| ServiceProductTemplate |
Escrow template for local services—geolocation, service items, completion confirmation |
| WantToBuyTemplate |
WantToBuy order template—buyer publishes demand, seller accepts and fulfills; 3% fee |
C2C OTC Trading
| Contract |
Purpose |
| C2CFactory |
Deploys sell-order/buy-order/trade contracts, manages C2C indexes and merchant listings |
| C2CFactoryReader |
Read-only view functions for C2C trade queries (pagination, filtering) |
| C2CSellOrderTemplate |
Sell-order template—merchant posts a USDT sell offer, locks USDT waiting for buyer to match |
| C2CBuyOrderTemplate |
Buy-order template—merchant posts a USDT buy offer, buyer sells USDT to receive fiat |
| C2CTradeTemplate |
C2C trade escrow template; 0.2% fee; buyer can force-claim after 24-hour timeout post payment confirmation |
Auction System
| Contract |
Purpose |
| AuctionFactory |
Deploys timed auction contracts, manages auction lifecycle |
| AuctionFactoryReader |
Read-only view functions for auction queries |
| AuctionTemplate |
Timed auction escrow—bidding, buy-now price, anti-snipe extension (last 5 min bid extends 10 min), 5% fee |
Shuifang Exchange
Community Arbitration
| Contract |
Purpose |
| CommunityArbitrationFactory |
Manages arbitrator qualifications, deploys case clones; minimum stake 1,000 USDT; arbitration fee rate 10% (community 90%, platform 10%) |
| CommunityArbitrationTemplate |
Individual case contract—evidence submission (24h), voting (48h), up to 13 arbitrators; ≥3 incorrect votes triggers 30-day cooldown |
Deposits and Trust
| Contract |
Purpose |
| DepositFactory |
Deploys merchant deposit contracts, manages deposit lifecycle, unified unlock cooldown, and zombie reclamation |
| MerchantDepositTemplate |
Per-merchant deposit—staking (500–1,000,000 USDT), freezing, arbitration deductions, 24h cooldown withdrawal |
Ranking and Discovery
| Contract |
Purpose |
| KeywordWeight |
Calculates product search ranking using weighted formula (sales volume, activity, arbitration history; each factor capped to prevent manipulation) |
| KeywordAuction |
Keyword bid ranking—Top 20 per keyword, daily reset, minimum bid 1 USDT |
Social and Identity
| Contract |
Purpose |
| InviteRegistry |
Two-tier referral tracking—records invite relationships, distributes rewards on settlement; L1 gets 20%, L2 gets 10%, platform 70% (all from fee portion) |
| CooldownManager |
C2C anti-fraud cooldown—buyer deposit cannot be withdrawn within 24 hours after the last trade completes |
Deployment Pattern
All template contracts (PhysicalProductTemplate, VirtualProductTemplate, ServiceProductTemplate, WantToBuyTemplate, C2CSellOrderTemplate, C2CBuyOrderTemplate, C2CTradeTemplate, AuctionTemplate, MerchantDepositTemplate, ShuifangEscrowTemplate, CommunityArbitrationTemplate) are deployed once as implementation contracts. Factory contracts then create lightweight EIP-1167 clones for each new instance, reducing deployment costs from ~3 million gas to ~100,000 gas.