Skip to main content

Aggregate Funds

Collect funds from multiple receipt wallets into your smart contract, preparing them for withdrawal.

Overview

When you use an address pool, payments are distributed across multiple receipt addresses. The aggregate feature collects these funds into your main smart contract, making them available for withdrawal.

When to Aggregate

Aggregate when:

  • ✅ You have funds in multiple receipt wallets
  • ✅ You want to prepare funds for withdrawal
  • ✅ You want to optimize gas costs (batch operations)
  • ✅ You need to consolidate balances

Best Practices:

  • Aggregate regularly (daily/weekly)
  • Aggregate when sufficient funds accumulate
  • Consider gas costs vs. fund amounts

Aggregate Process

Step 1: Navigate to Account

  1. Go to HashNut Dashboard
  2. Select your account
  3. Navigate to "Funds" or "Balance" section

Step 2: View Available Funds

View reclaimable balances:

  • Total balance per token
  • Number of wallets with balances
  • Estimated gas cost

Step 3: Configure Aggregation

Options:

  • Select Tokens: Choose which tokens to aggregate
  • Minimum Amount: Set minimum amount per wallet (gas optimization)
  • Wallet Limit: Limit number of wallets to process

Step 4: Confirm Transaction

  1. Review aggregation summary
  2. Check gas fee estimate
  3. Approve transaction in wallet
  4. Wait for confirmation

Technical Details

Batch Processing

  • Batch Size: Up to 50 wallets per transaction
  • Automatic Batching: Large pools processed in multiple batches
  • Progress Tracking: Real-time progress updates

Gas Optimization

Tips:

  • Set minimum amount threshold (skip wallets with small balances)
  • Aggregate during low gas periods
  • Batch multiple tokens in one transaction

Multi-Token Support

Aggregate multiple token types in one operation:

  • USDT
  • USDC
  • Other ERC20/TRC20 tokens

API Integration

Currently, aggregation is performed through the dashboard. API support may be available in future versions.

Best Practices

  1. Regular Aggregation: Don't let funds sit too long
  2. Gas Optimization: Set minimum amounts to skip small balances
  3. Monitor Balances: Track balances across wallets
  4. Batch Operations: Aggregate multiple tokens together
  5. Timing: Aggregate during low gas periods

Troubleshooting

Aggregation Failed

Causes:

  • Insufficient gas
  • Network congestion
  • Contract error

Solutions:

  • Increase gas limit
  • Retry during low congestion
  • Check contract status

High Gas Costs

Solutions:

  • Set higher minimum amount threshold
  • Aggregate fewer wallets at once
  • Wait for lower gas periods

Next Steps


Funds aggregated? Withdraw them →