Case Study: Velodrome Finance Rewards Distribution Automation
Introduction
Velodrome Finance is a next generation AMM (Automated Market Maker) optimized for capital efficiency and long-term protocol alignment on the Optimism network. As the platform scaled rapidly, Velodrome sought to automate key protocol operations such as rewards distribution. Our team was brought in to design, implement and deploy a full automation layer using Chainlink that interfaced securely with Velodrome’s smart contracts.
Project Specifications
- Industry: Decentralized Finance (DeFi)
- Services: Protocol Automation, Chainlink integration, Smart Contracts Development
- Technologies Used: The project is built on technologies such as Solidity, Hardhat, along with Chainlink Automation and TypeScript.
Development Process
The automation aimed at eliminating manual execution of recurring tasks, ensure high uptime, transparency, and error tracking for on-chain automation. The architecture design took several refactoring and polishing phases to reach the version which is gas efficient and the unnecessary on-chain calls are reduced. The architecture was later abstracted to be able to be reused to support future infrastructure operation automations.
Challenges
- On-chain timing sensitivity: Key actions had to be executed in narrow windows (e.g. fitting in epochs)
- Gas Efficiency: Performing bulk operations could incur high gas costs and reach block or Chainlink service limits.
Unique Features and User Experience
Velodrome’s emissions system ensures that liquidity providers are rewarded consistently and transparently. To automate and optimize this process, the protocol uses a modular upkeep system composed of two main smart contracts – GaugeUpkeepManager and GaugeUpkeep.
The GaugeUpkeepManager smart contract’s purpose is managing the list of active gauges that should receive emissions. Its responsibilities are automatic registrations by listening for key events on the Voter contract and coordinating when and which gauges are due for emissions distribution. This ensures that only live and valid gauges receive rewards, and that the upkeep system adapts automatically as the protocol evolves (e.g. new pools launching or old ones being deprecated).
The GaugeUpkeep smart contract executes the actual reward distribution logic which runs on a set interval, iterates trough the list of gauges and calls the distribution logic, processed this in batches. By batching emissions updates, the system stays gas-efficient and avoids missing reward cycles, ensuring fairness and trust for liquidity providers.
Technological Innovation and Impact
- Protocol Trust: Stakeholders gained confidence in consistent, timely execution of key processes.
- Fully Automated: No human intervention required for gauge maintenance.
- Event-Driven: Reacts in real-time to protocol state changes.
- Scalable: Efficiently handles dozens or hundreds of gauges with batched calls.
- Resilient: Ensures gauges are only maintained if they’re active and eligible.
This automation is a vision for a more fair and transparent Decentralized Finance application design which aims to set a standard for DeFi protocols to follow.
Conclusion
The Velodrome Finance automation initiative streamlined critical operations reduced costs, and enhanced protocol resilience. The system now serves as a foundation for future scalability and multi-chain expansion.
Have a project in mind?
We have the expertise! Drop us a line and lets talk!