ARC: Deploying Aave on StarkNet
Summary
A proposal for the progressive bootstrapping of the Aave ecosystem over StarkNet, StarkWare’s permissionless and decentralized ZK-Rollup.
Proposer
Yael Doweck, Product Manager at StarkWare, is submitting this proposal on behalf of StarkWare, the creator of StarkNet.
Abstract
We offer to onboard the Aave protocol onto StarkNet. This ARC details the opportunities for the Aave community from this effort and a concrete suggestion for the way forward. It is inspired by similar cooperation, which is already live between StarkWare and MakerDAO.
Motivation
With the success of the Polygon and Avalanche markets, deploying on StarkNet incurs additional value for Aave.
New Market
Sidechains, by nature, are not coupled with Ethereum’s state, with each sidechain having its own security model. However, in L2 solutions, and especially Validity rollups, security is strongly coupled with L1 security. I.e., the L2 Operator(s) can’t steal the user’s funds without compromising the L1 state.
Therefore, StarkNet attracts many users and applications that prioritize the security of their funds - users and applications that would be hesitant to onboard to sidechains.
New Opportunities
Liquidity Sharing protocol
StarkNet’s high level of security and its capital efficiency compared to Optimistic Rollups (i.e. shorter withdrawal period) would allow StarkNet’s Aave deployment to connect the liquidity between networks efficiently.
In addition, StarkNet would be highly interoperable with other platforms.
The opportunities in a Scalable Non-EVM compatible environment
The scalable environment of StarkNet offers a unique opportunity to revisit tradeoffs that have been done originally on L1 due to gas constraints and contract size limit - leading to a positive evolution of the protocol. The improved protocol logic could then be copied to other scalable environments such as Polygon.
An example of a system that evolved in the same process is dYdX. Like Aave, it is a liquidation-based L1 protocol that has been re-written in Cairo into a successful L2 protocol. In this process, dYdX was able to add cross-margin logic that was not feasible on L1 but simple to implement on L2. Although they run more complicated contracts on L2, they still enjoy a 1500x scale factor in their gas consumption.
Proven Performances
- StarkEx, which is based on the same technology as StarkNet, is a leading L2 solution. It has 4 projects in production, including DeFi projects, and has proven 40 TPS regularly with unlimited peaks. Some of StarkEx’s clients will move to StarkNet as well and contribute to the ecosystem.
- STARK Cairo Verifier has been in production for a while. There is one shared Verifier for all dApps running on Cairo. This significantly increases the assurance for this component.
StarkNet’s Ecosystem
StarkNet’s ecosystem is thriving with new DeFi and gaming applications (see the full list here) and partnerships with CEXs such as OKEx. In addition, StarkNet has many new development tools and they are progressing fast.
Implementation
General mindset
Following, and learning from, the similar effort done with Maker, we suggest the development of Aave protocol over StarkNet be done with an emphasis on the following aspects:
- Working closely with Aave DAO: all the design considerations and risk analysis will be done with the consent of the Aave DAO to assure new novel ideas to the protocol and the actual implementation are in line with the DAO’s considerations and goals.
- Accessibility: All the products of this effort will be available to the DAO for usage, learning, and audit purposes.
- High development standard: All code written in this effort goes through an audit by external, respected audit entities. We will also test the product extensively to ensure it works as intended.
- Working closely with the StarkWare team: This ensures the team is always well-informed with StarkNet’s technology updates, can advance quickly and take part in discussions regarding StarkNet’s design.
- Divide the project into short phases: Since StarkNet contracts are written in Cairo, this requires a learning curve for the developers of the project, it makes sense to start with a small project first that will allow this learning experience and then progress to the full Aave implementation on StarkNet. Another benefit of this approach is to allow the Dao to monitor the progress more closely and make decisions in the second phase based on the gained knowledge from the first phase.
Project Roadmap
Phase I
The goal of this phase is to build something simple and useful that will show the potential of the technology. In this phase, the development team will focus on onboarding to the Aave protocol and StarkNet development stack.
One suggestion for phase 1 is an initial protocol for depositing assets to Aave on Ethereum L1 directly from StarkNet using a DeFi-Pooling scheme. This requires developing a smart contract that aggregates deposits from multiple users on StarkNet onto a pool of funds and deposits the funds to Aave on L1. The contract will distribute the aTokens from Aave L1 to StarkNet users according to their proportion in the pool. The contract will also provide the reverse strategy, aggregate aTokens from users, and deposit them to Aave on L1 to redeem their collateral.
This project would open the StarkNet market for the Aave protocol while keeping the project relatively small in scope.
We are open to more project ideas from the community for phase I.
Phase I will also include a deep-dive into the plans of phase II (detailed below) and writing a proposal for the DAO to approve phase II of the project.
Phase II
Phase II will focus on implementing the full Aave protocol on StarkNet and exploring possibilities to optimize it given the nature of the Rollup environment.
Organization, Funding and Budget
This project will be the official development for the Aave community built on StarkNet.
StarkWare, the core StarkNet protocol developer, proposes to co-fund this effort alongside the DAO on a 50/50 basis. The facilitator of this effort will determine the exact budget.
Next steps
- Gather general feedback from the community about the initiative, and specifically about Phase I.
- Define the final Phase I scope (facilitator), including budgeting and contributors.
- Create a Snapshot vote.
Acknowledgments
Special thanks to Ernesto Boado (@eboado) and Emilio Frangella (@Emilio) for their ideas and research on how to take this project forward and their initiative to act as facilitators of the project.