Merchant Deposits
The deposit system provides economic security for the marketplace. Merchants must stake USDT before listing products, creating economic incentives for honest behavior.
How It Works
Creating a Deposit
- Merchant calls
DepositFactory.createDeposit()staking USDT (minimum 500, maximum 1,000,000) - Factory deploys a MerchantDepositTemplate clone
- USDT transferred to deposit contract
- Deposit status: Active
Deposit Lifecycle
Active → Frozen (during arbitration) → Active
Active → Withdrawing (cooldown period) → Withdrawn
Active → Zombie (365 days no activity) → Reclaimed
Deposit Deductions
When a buyer wins arbitration, compensation can be deducted from seller's deposit:
- Product contract calls
merchantDeposit.deduct(amount, buyerAddress) - USDT transferred from deposit contract to buyer
- If deposit balance falls below minimum, merchant cannot list new products until replenishing
Withdrawal Process
- Merchant delists all active products
- 24-hour cooldown period begins (DELIST_COOLDOWN)
- After cooldown ends, merchant can withdraw deposit
- This delay protects buyers who may still need to file disputes
Arbitrator Qualification
To become a community arbitrator, a merchant's deposit balance must be ≥ 1,000 USDT (ARBITRATOR_MIN_DEPOSIT). After staking, a 30-day qualification cooldown (QUALIFY_COOLDOWN) must pass before the merchant can participate in voting.
Zombie Account Reclamation
Deposits inactive for 365 days (no product operations, no orders) are marked as "zombie":
- Admin triggers
adminRecycleDeposit()on DepositFactory - Factory forcibly delists all merchant's products
- USDT from deposit returned to merchant
- Deposit contract marked as reclaimed
This mechanism prevents USDT from being permanently locked in abandoned accounts.
Deposits as Trust Indicators
Deposit amount serves as an important merchant credibility metric:
- Higher deposits indicate greater merchant commitment
- Deposit balance is visible to buyers
- Arbitration deductions reduce balance, reflecting merchant's risk history
- Merchants can top up deposits anytime
Activity Tracking
DepositFactory tracks merchant activity to determine zombie status:
- Creating products refreshes activity time
- Creating orders refreshes activity time
- Shipping orders refreshes activity time
- If 365 days pass with no activity, deposit becomes reclaimable
Security Mechanisms
- Only authorized product contracts can deduct from deposits (set by factory when creating products)
- Deductions require deposit to be in Active or Frozen status
- Zero-amount deductions rejected
- Zero-address transfers rejected
- All deduction operations emit events for transparency and traceability