Logo
blank Skip to main content

Building a DeFi Aggregator for Smarter Asset Management

Background

A US-based FinTech company approached Apriorit with the goal of developing a custom DeFi data aggregator. They needed to aggregate several DeFi platforms and provide a common interface that would allow users to search for and select the best available offers. The goal was to simplify DeFi interactions while ensuring data accuracy, stability, and a seamless user experience.

The client needed specialists with deep knowledge of FinTech infrastructure, smart contract logic, and scalable architecture design. Our task was to deliver a fully functional DeFi dashboard that would visualize aggregated data, calculate the most profitable annual percentage yields, and allow users to interact with supported protocols directly through a user-friendly interface.

The client

Our client is a US-based company that focuses on delivering innovative blockchain-based FinTech solutions.

Our client:NDA-protected
Location:USA
Industry:FinTech
Collaboration with Apriorit:One-time project
Services we provided:– Backend development
– Frontend development
– API development
– Quality assurance
– Project management
– DevOps support

The challenge

The client was looking for a highly skilled technical team that was not just familiar with blockchain development but capable of building a custom DeFi data aggregation solution and integrating it with multiple decentralized finance protocols.

The initial scope of work included:

  • Aggregating real-time and historical financial data from various DeFi protocols
  • Calculating and displaying the most profitable APY options for selected tokens
  • Creating a user-facing dashboard with data filtering, sorting, and supply/borrow functionality

To meet these requirements, the client needed a dedicated team with hands-on experience in blockchain-based development. In Apriorit, they found a team with deep expertise in both smart contract development and DeFi ecosystem logic.

Building a DeFi solution from scratch?

Leverage our blockchain and API development expertise to create secure, scalable platforms tailored to your business needs.

The result

The client received a custom DeFi aggregator tailored to their organization’s needs, allowing their customers to collect live and historical data from multiple protocols and calculate optimal yields. This solution also provides users with a powerful dashboard for tracking assets, analyzing risks, and managing supply and borrow operations in one place.

Our approach

One of the client’s core requirements was the ability to aggregate historical DeFi data across multiple protocols, including interest rates, pool sizes, utilization levels, and liquidation thresholds. Initially, we planned to use subgraphs based on The Graph protocol, which is a widely adopted tool for indexing and accessing on-chain data.

However, during implementation, we faced several significant limitations:

  • Some DeFi protocols had no available subgraphs covering the required data.
  • Other subgraphs were outdated or abandoned, as requests often failed despite available documentation.
  • Functional subgraphs often lacked essential metrics or were updated too slowly for our client’s needs.

Since data reliability and accuracy were essential for the success of this project, we decided to move beyond third-party dependencies and create our own custom solution. 

To overcome these limitations, we revised our approach. For protocols with missing or unreliable subgraph support, we implemented custom data collection using direct RPC requests to the blockchain. This hybrid approach gave the client dependable access to both real-time and historical DeFi data, tailored to the unique architecture of each integrated protocol.

How we did it

Our team followed a structured and iterative approach to DeFi aggregator development. The process included five key stages:

DeFi aggregator project stages
Building a DeFi aggregator project details

Stage 1. Conducting research and technical analysis

Before starting the implementation, we dedicated time to thorough research. Our goals were to identify the necessary protocols to integrate and gain a deep technical understanding of the entire ecosystem, including: 

  • How each platform operates
  • What data can be collected
  • How to maintain stability and accuracy
  • What limitations should be considered during architecture design

We began by analyzing the target protocol stack specified by the client. This included reviewing public smart contracts, APIs, and documentation. Our team paid special attention to how protocols store data, calculate APYs, manage liquidations, and enforce lending limits.

We also evaluated the feasibility of collecting historical data through subgraphs, as our team explored service usage limits, overall reliability, and which data points could be retrieved.

Stage 2. Creating the indexer and collecting historical and live data

During this stage, we focused on setting up the backend infrastructure. We built a database on AWS DynamoDB to store historical values, including interest rates, liquidity levels, and lending limits. After that, we implemented a system for continuous data collection:

  • Live data was collected through direct smart contract calls.
  • Historical data was gathered from subgraphs wherever possible.

For protocols with missing or unreliable subgraph support, we implemented custom data collection using direct RPC requests to the blockchain. This approach allowed us to bypass subgraph limitations and provide accurate, up-to-date metrics across all supported protocols.

We also carefully optimized the data collection process to minimize the load on RPC endpoints and subgraphs, introducing scheduled data fetching to avoid exceeding service limits.

Stage 3. Developing the user interface

While backend development was ongoing, our frontend developer worked on the user interface. 

Key UI features included:

  • Displaying the best APY across all supported protocols for a selected token
  • Visualizing the user’s portfolio (deposits, loans, health factor)
  • Dynamically loading and sorting data
  • Enabling supply and borrow operations directly from the dashboard
  • Showing charts and statistical insights, including predictive analytics based on historical trends

As a result, we delivered a convenient, informative, and flexible dashboard that enables users to effectively manage their DeFi assets.

Stage 4. Integrating new protocols and expanding features

After we presented the aggregator to the client, they requested additional adjustments:

  • Integration of more DeFi protocols
  • Adjustments to how data is displayed in the UI
  • Addition of predictive data and analytics

Because of the modular backend architecture and flexible dashboard design, we managed to implement these changes quickly and without major revisions to the system’s core logic.

Stage 5. Testing and deployment

Before release, our QA engineer conducted thorough testing of both backend and frontend components. This included verifying the accuracy of APY calculations, validating data updates, and confirming the correct execution and reflection of supply/borrow operations in the interface.

Once the solution passed all quality checks, we deployed it to the client’s infrastructure. Thanks to the modular design and clean architecture, the deployed solution is stable, reliable, and easy to maintain or scale, whether by integrating new DeFi protocols or adding new features in the future.

The impact

As a result of our collaboration, the client received a fully customized DeFi data aggregation solution capable of reliably pulling live and historical data from various decentralized protocols in real time. The system successfully combines multiple data sources, offering accurate APY calculations, liquidity insights, and credit health metrics within a single dashboard.

Thanks to the flexible architecture and backend logic that Apriorit developers created, the aggregator continues to operate reliably even in the absence of stable subgraph infrastructure. The client was able to integrate and adapt the dashboard UI to match their brand, making it ready for production use. By avoiding reliance on third-party aggregators, the client now has full ownership of their infrastructure. As a result, they no longer pay licensing fees and are able to ensure long-term scalability.

By developing a scalable and fully custom DeFi aggregator that delivers real-time and historical data from multiple decentralized protocols, we helped the client take full control of their data infrastructure and eliminate third-party dependencies.

Take your blockchain product to the next level

Partner with Apriorit to build powerful DeFi infrastructure backed by deep blockchain development expertise.

Have a question?

Ask our expert!

Maryna-Prudka
Maryna Prudka

VP of Engineering

Tell us about
your project

...And our team will:

  • Process your request within 1-2 business days.
  • Get back to you with an offer based on your project's scope and requirements.
  • Set a call to discuss your future project in detail and finalize the offer.
  • Sign a contract with you to start working on your project.

Do not have any specific task for us in mind but our skills seem interesting? Get a quick Apriorit intro to better understand our team capabilities.

* By sending us your request you confirm that you read and accepted our Terms & Conditions and Privacy Policy.