About VeaxFlow
Inspiration
I was inspired by the challenge of building an institutional-grade liquidity management system for the 1T Hackathon's VeaxFlow bounty. The idea of using AI to dynamically optimize a blockchain pool like NEAR/USDT—handling millions in reserves—excited me as a blockchain developer passionate about data ingestion and indexers. I saw an opportunity to leverage real-time market intelligence to solve real-world DeFi problems like slippage and impermanent loss, all while pushing my skills to the limit in a tight 2-day window.
What I Learned
This project taught me the intricacies of liquidity pool mechanics—how fees, ranges, and reserves interplay to balance yield and risk. I deepened my understanding of NEAR’s ecosystem, mastered Veax’s APIs (/rpc/#get_pools and /rpc/#chart_volume). I also learned to iterate fast under pressure, pivoting from mock data to live endpoints while ensuring precision in a time crunch.
How I Built It
VeaxFlow is a Python-based AI agent that optimizes the NEAR/USDT pool:
- Data Fetching: Pulls live pool data (reserves, spot price) from
/rpc/#get_poolsand hourly volume from/rpc/#chart_volume. - AI Logic: Analyzes volume (e.g., 833.16 USDT/hour) against a $800 threshold. For high volume, it reduces fees (0.3% to 0.05%), boosts reserves by 10% to cut slippage, and widens price ranges to mitigate IL. For low volume, it increases fees for yield.
- Output: Runs in real-time, simulating adjustments with clean, actionable logs (e.g., reserves from 1073.87 NEAR/7240.72 USDT to 1429.32 NEAR/9637.40 USDT).
I used requests for API calls, pandas for data handling, and iterated over 3 cycles to mimic continuous optimization—all built from scratch.
Challenges Faced
- Time Crunch: With only 2 days, I had to prioritize an MVP—simulating reserve boosts instead of on-chain deployment due to testnet setup time.
- API Precision: Parsing live data (e.g., volume in NEAR vs. USDT) required quick unit conversions using
spot_price, and initial threshold tuning ($10M to $800) was tricky with fluctuating volumes. - Logic Bugs: Early range narrowing inverted bounds (e.g., 3.28-3.22); I fixed it with a flat ±0.02 step, ensuring stability.
VeaxFlow delivers a scalable, autonomous solution for high-volume providers, proving AI can enhance DeFi efficiency even under tight constraints.
Log in or sign up for Devpost to join the conversation.