Skip to content

Conversation

@AdekunleBamz
Copy link

Summary

This PR adds pool analytics tracking to enable real-time monitoring of the miniDEX stable pool.

New Features

Volume Tracking

  • totalUSDCVolume - Total USDC swapped through the pool
  • totalUSDTVolume - Total USDT swapped through the pool
  • Updated swap() to increment volumes on each trade

Activity Metrics

  • totalSwapsCount - Total number of swaps executed
  • totalLPs - Total number of LP providers

Analytics Dashboard

  • getPoolAnalytics() - Returns comprehensive pool stats:
    • Current USDC/USDT reserves
    • Total swap volumes for both tokens
    • Total swap count
    • Total LP count
    • TVL (Total Value Locked)

Changes Made

  • Added totalUSDCVolume, totalUSDTVolume, totalSwapsCount, totalLPs state variables
  • Modified swap() function to update analytics on each trade
  • Added getPoolAnalytics() view function for dashboard integration

Usage

// Get all pool analytics at once
(usdcRes, usdtRes, usdcVol, usdtVol, swaps, lps, tvl) = pool.getPoolAnalytics();

SmartFlow Developer and others added 2 commits January 4, 2026 16:35
- Implement bulkSwap for executing up to 10 swaps in one transaction with aggregated fees
- Implement bulkAddLiquidity for bulk liquidity additions (up to 5 operations)
- Implement bulkRemoveLiquidity for bulk liquidity removals (up to 5 operations)
- Add getBulkLimits and estimateBulkGas utility functions for planning
- Maintain stable-swap math precision and near-zero slippage for bulk operations
- Bulk operations preserve proportional calculations and slippage protection
- Compatible with existing single-operation workflow while providing significant gas savings
- Track total USDC/USDT swap volumes
- Track total number of swaps executed
- Add getPoolAnalytics() for real-time pool statistics
- Enable monitoring of pool TVL and trading activity
@vercel
Copy link

vercel bot commented Jan 9, 2026

@adekunlet is attempting to deploy a commit to the phessophissy's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants