Case Study

How Aave Transformed Development With Virtual TestNets to Focus on Its Core Mission

Organization: Aave

Website: aave.com

Industry: DeFi

How Aave Transformed Development With Virtual TestNets to Focus on Its Core Mission

"Virtual TestNets solved numerous problems for us. We just focused on the core mission. Everything else just worked."

Josh Stevens

SVP of Engineering at Aave

Key highlights:

  • The problem: The Aave engineering team needed a shared staging environment to build and test V4 across contract, backend, and frontend teams simultaneously. However, local nodes aren’t a shared environment, and public testnets introduce faucet bottlenecks, missing mainnet data, and stale Chainlink oracle prices that make realistic testing impossible.
  • The solution: Aave integrated Tenderly Virtual TestNets as their shared development and staging infrastructure, giving all engineering teams a single source of truth synced with mainnet state. With admin control over contract state, built-in CCIP support for cross-chain testing, and demo environments, the team could focus entirely on building V4 logic, testing scenarios that would otherwise be impossible to recreate.
  • Key results: Aave built a suite of 500+ end-to-end tests on a Virtual TestNet, amounting to 2,000 tests running across 4M+ Virtual TestNet instances, built the Aave Pro developer preview on a public Virtual TestNet, and spun partner demos with custom Hub and Spoke configurations in under 30 minutes, all while eliminating the infrastructure overhead that previously pulled engineers away from core product development. As more fintech and institutional teams integrate with and build on top of Aave, they will also be able to build and test on Virtual TestNets, shipping powerful onchain applications with confidence.  

As one of the pioneers in the space and the underlying liquidity protocol behind numerous onchain systems, Aave powers decentralized finance and the onchain lending and borrowing economy. With a mission to bring onchain finance to everyday users, Aave continuously innovates on the blockchain, building new standards for global markets. 

Handling tens of billions of dollars across chains, the Aave protocol requires a scalable architecture that can support the growing demands of today’s market. With that in mind, the Aave engineering team has been working on V4, a new version of the protocol based on the Hub and Spoke model that eliminates liquidity fragmentation while isolating risks more effectively.

To build a powerful yet flexible protocol that can be easily integrated and built upon, the Aave contract, backend, and frontend teams need to work closely together. While the protocol team builds V4, the backend team develops indexers and other backend systems on top of the protocol, and the frontend team configures the frontend using internally built SDKs, all striving toward the same end goal.  

To ensure alignment throughout the development cycle, Aave integrated Virtual TestNets as a shared development infrastructure solution, ensuring that each team can focus on core product development while building on a consistent state.  

How local nodes and public testnets take away from core product development

Initially, the Aave engineers deployed contracts to their local nodes. However, aside from requiring additional time and resources for node maintenance and indexing, local instances don’t provide a shared, consistent state for multiple teams to work together. This was a major limitation for V4 development. 

Public testnets weren't a viable alternative either because they introduce a different set of challenges, from faucet bottlenecks to a lack of mainnet data. Additionally, since the Aave protocol relies on Chainlink oracles, the team needs to fork the mainnet state and stay synced. Otherwise, stale oracle prices create inconsistencies in execution and make realistic testing impossible, which could introduce major risks in production. 

“When you deploy to a testnet, you have to worry about all of the things around it. You have to build mock contracts, get the funds to pay for gas, and get synced data. All of these things went away with Tenderly. Virtual TestNets solved numerous problems for us. We just focused on the core mission. Everything else just worked.” – Josh Stevens, SVP of engineering at Aave

The Aave team needed a staging environment where they could deploy contracts once and keep building, without constantly redeploying contracts or working around the limitations of traditional testing infrastructure.

“If we’re to work together as a team, we need to have a shared state between each other and not worry about it. We needed a staging environment where we could deploy our contracts once and not have to keep deploying them. That's where Tenderly Virtual TestNets came straight in for us.” – Josh Stevens

Focusing on Aave V4 core product development on Virtual TestNets

With Virtual TestNets, the Aave contract, backend, and frontend teams have a shared staging environment as a single source of truth for building V4. All engineers can build and test in parallel while still working toward the same goal. The team can deploy and redeploy contracts as needed, sharing the environment across teams for faster and easier development and testing.

“We found it really useful that the engineers are all working on a single source of truth. It makes it a lot easier to develop the product, split the tasks, and test complex DeFi interactions that we wouldn't be able to do otherwise.” – Josh Stevens

Instead of worrying about and spending resources on all the dependencies surrounding public testnets, the Aave team can focus on building the core product. 

“With Virtual TestNets, we don’t have to focus much on our infrastructure, but on building our logic. We can just spin up staging environments, deploy our contracts, and test and develop without worrying about all the problems that testnets bring.” – Josh Stevens

Validating the V4 logic with 500 end-to-end tests on a Virtual TestNet

The shared staging environments on Virtual TestNets made end-to-end testing faster and more robust for the Aave team. The Aave V4 test suite includes over 500 end-to-end tests on a single Virtual TestNet, amounting to 2,000 tests across 4M+ instances. These tests allow the team to simulate large deposits, verify complex logic, and catch issues that would be nearly impossible to reproduce in a traditional testing environment.

Additionally, the Aave staging environments on Virtual TestNets is continuously synced with production chains while giving the team full admin control over the state. The Aave engineers can modify contract states, inflate token balances, and simulate real-world conditions without needing actual admin keys or testnet faucets, unlocking new testing capabilities. 

“At scale, Aave behaves differently; large deposits shift utilization, rates, and risk parameters in ways small test amounts never reveal. Being able to inflate token supplies and do proper tests has been massive from a business point of view. We now have over 500 end-to-end tests that all run on the Virtual TestNets and allow us to verify problems you can't simulate without something like this." — Josh Stevens

Since a major aspect of Aave's math logic is computed off-chain, even small changes to that logic need to be verified carefully before reaching production. With Virtual TestNets, the Aave team has a reliable yet fully flexible environment to catch potential issues early and push changes to the logic with confidence and peace of mind. 

“It’s not a single feature, but how Virtual TestNets are built is exactly what we need. The sandbox environment, the ability to change state on a contract without requiring the admin keys, and being able to inflate balances. All of these things are massive for us.” – Josh Stevens

Additionally, all other Aave’s infrastructure components are seamlessly connected to Virtual TestNets as their primary testing environment. The team uses Virtual TestNets together with Foundry, indexing tools, and relaying components, with all of their APIs pointing to and pushing changes to the same environment. 

Launching V4 and spinning up demo environments in 30 minutes

Aside from serving as a staging environment for testing V4 deployments and logic, the Aave team used Virtual TestNets to run the public developer preview of Aave V4. They launched V4 and Aave Pro on a public Virtual TestNets, enabling the community to interact and test V4 without spending real assets.

Aave also uses Virtual TestNets to run private partner demos on demand. When a partner wants to see the Aave V4 protocol running with a specific Hub and Spoke configuration, the team can deploy the contracts with a customized setup and have a fully functional demo ready in under 30 minutes. Plus, since Virtual TestNets come with the Admin and Public RPCs, the team can maintain privacy while being able to showcase what V4 will look like once it goes live.

"Virtual TestNets allow us to spin up a new sandbox, deploy our contracts with a new config, and map it to our API. This way, we can create demos for clients in 30 minutes, which was unheard of before." — Josh Stevens

Enabling the multichain vision with the CCIP bridge integration on Virtual TestNets

With the Aave app, the team is building a product with a multichain vision, enabling seamless DeFi interactions for everyday users across chains. However, building a product that relies on cross-chain interactions has been one of the most challenging infrastructure problems in Web3 development.

Aave is among the first teams to run cross-chain tests using the CCIP bridge integration natively supported within Virtual TestNets. Tenderly has been collaborating closely with Chainlink to enable the bridge integration and build a powerful infrastructure for cross-chain testing workflows. The integration has enabled the Aave team to spin up multichain environments, deploy contracts once, and test end-to-end across chains without managing separate infrastructure for each network.

"With the Aave app, this is the first time we're building this multichain vision where actions need to go between chains. That's where we started using the CCIP integration on Virtual TestNets. It really streamlined our development environment and allowed us to test things we couldn't before." — Josh Stevens

Key results: building the product vision without infrastructure worries 

By introducing Virtual TestNets as their staging infrastructure and public demo environments, the Aave team eliminates the dependencies that come with local nodes and public testnets, saving valuable engineering resources and unlocking powerful testing capabilities. With Virtual TestNets, the Aave team enabled: 

  • Primary focus on the product development and vision, without having to worry about infrastructure setups, maintenance, or cross-chain testing.
  • A powerful suite of 500+ end-to-end tests, amounting to 2,000 tests running across 4M+ Virtual TestNet instances, covering real-world scenarios that couldn't be tested otherwise.
  • 30-minute demo environments for partners, with custom Hub and Spoke configurations ready for partners in under half an hour.
  • The Aave V4 developer preview on a public Virtual TestNet, giving external developers a production-grade experience ahead of mainnet launch.
  • Improved team alignment on a shared state, enabling faster and easier development and collaboration between contract, backend, and frontend teams.

Building the future of the global economy on a flexible, multichain infrastructure

As one of the core DeFi primitives powering onchain finance, Aave will continue to be the underlying building block not only for Web3 teams, but also for financial institutions shaping the new global economy. Virtual TestNets can empower fintech and institutional teams building on top of the Aave protocol by unlocking new testing capabilities in safe, yet production-like environments, enabling them to ship powerful payment applications.

Virtual TestNets will remain at the center of Aave's development processes, from V4 development and multichain testing to partner demos and the public developer preview. As the protocol evolves, the developer community integrating with Aave will be able to continuously test protocol integrations under realistic conditions, making it easier for more teams to build on Aave with confidence.

"Developers want to build on top of our protocol with their custom configurations, but they can't on testnets because the contract config is already deployed. Redeploying it is more complex and brings in many more issues. Virtual TestNets are empowering that, without changing the contracts, without having to build mocks, without having to worry about the infrastructure." — Josh Stevens

Building a multichain product? Focus on core product development without the infrastructure overhead. Reach out to our team to learn more about the CCIP integration natively supported on Virtual TestNets.