💻Hacking On Aave V3
The Aave Protocol is a decentralized non-custodial liquidity protocol where users can participate as suppliers or borrowers. The protocol is a set of open source smart contracts which facilitate the logic of user interactions. These contracts, and all user transactions/balances are stored on a public ledger called a blockchain, making them accessible to anyone.
Contents:
Smart Contract Integrations
All deployed contract addresses can be found here.
Most of the core functionality such as supply
, withdraw
, borrow
, repay
, or flashloan
occurs in the Pool
contract (LendingPool
in V2).
For a breakdown of V3 features see the contract overview or dive even deeper with the V3 Technical Paper.
A specific guide for getting started building with flashloans can be found here.
Frontend Integrations
Aave Utilities is a JavaScript SDK for formatting protocol data and generating transactions for reading/writing protocol data.
The @aave/math-utils
library is necessary to compute realtime balances from contract or graphql queries since these queries will return static data. Balances in Aave are continuously increasing and must be constantly re-calculated with the current timestamp.
See the aave-ui repo (V3 branch) for examples of using the data formatting and transaction methods.
Data Analysis
Given that all Aave protocol data is publicly stored on-chain, there are lots of insights to be gained from analyzing these transactions. Two common tools for on-chain data analysis are
Dune Analytics: Query contract data and generate dashboards with SQL
The Graph: Query contract data with GQL using the Aave Protocol or Governance subgraphs
See the frontend integrations section for details on formatting this data for use in a GUI
Inspiration
With the new features of Aave V3, there is lots of room for potential innovation. Some examples include:
High leverage tokenized positions on EUR/stablecoins using eMode
Protocol for credit delegation with credit scoring
Bridge protocol that uses portals to move assets between L2 and L1
Cross market arbitrage using flashloans and portals
Combine portals and credit delegation of Aave V3 to build full positions teleportation
Mechanisms for permissionless listing that uses Listing admins
Risk management automated tool that changes risk parameters by evaaluating market conditions using risk admins
Token wrapper user-facing page (Convert your aTokens in waToken with fixed balance easily for tax optimization and easier protocol integrations)
A simple AIP builder choose to asset, Risk parameters input variables and script generate an AIP payload
Asset ready to join aave monitor check if an asset has a chainlink price feed and reach volatility and volume threshold to be a good candidate for aave.
Aave Forex tool. Short assets 10-50x using emode, flashloans and curve
Examples
Many DApps have already leveraged Aave's features to offer DeFi services, among them:
Capital effiency strategies with InstaDapp
“Stop-loss orders” and automated loan rebalancer with DefiSaver
Interest rate swaps derivatives with Opium Network
Collateral swaps to mitigate volatility with CollateralSwap
Flash Loans GUI with Furucombo
Leveraging Aave's interest rates and aTokens with yearn.finance
Additionally, doing a GitHub search for Aave functionality you are interested in implementing is a good way to find working code examples.
Hackathon Expectations
We're involved with a number of hackathons and see many, many submissions. Here are some guidelines on how to maximise your chances of 'winning' (the ones with emoticons are important!):
💯 Have your code well documented on Github.
✅ Have a front end that is available to be used on a public website.
🧪 If you created Solidity contracts, deploy them to a testnet and ensure your front end properly interacts with them.
🤯 Make sure you implement something innovative, novel, or difficult with your Aave integration. Simply calling
deposit()
on the LendingPool will not help your submission stand out and be special.Include a short presentation (PPT, Keynote, Google Slides) that goes over your idea, hack, and where you plan to take it.
If you include a video demo, please ensure it is between 2 minutes and 8 minutes. Anything longer will become boring.
If you have previously won a hackathon prize or received a grant from us, then you must highlight exactly what new things were built and why you deserve another prize (our prizes/grants are meant to help kickstart your journey, not provide on-going funding).
Hackathons are usually quite competitive, so if you're building to win, keep this in mind. A little polish goes a long way, in comparison with all other submissions.
Resources
Aave GitHub Organization: https://github.com/aave/
Developer Docs: https://docs.aave.com/developers/
Medium: https://medium.com/aave
Discord: https://aave.com/discord
General Aave overview presentation
Documentation Hub: https://docs.aave.com/hub/
Aave V2 Documentation: https://docs.aave.com/developers/v/2.0/
Aave V3 Documentation: https://docs.aave.com/developers/getting-started/v3-overview
Aave V3 Technical Paper: https://github.com/aave/aave-v3-core/blob/master/techpaper/Aave_V3_Technical_Paper.pdf
Last updated