Degen Code

Degen Code

Aave — Part VI

Adding Positions to the Database

Dec 31, 2025
∙ Paid

Previous entries in the Aave Series focused on understanding the Aave platform and the necessary contract calls to identify users, inspect their positions, and perform liquidations.

Now let’s zoom out and build a means to monitor these positions over the long term.

We will focus on developing a database structure for Aave V3 using SQLAlchemy, writing an extractor function to pull the necessary events and update the database, then run some limited tests to verify the data behaves as expected.

This entry is heavily influenced by ideas from Domain-Driven Design. If you find it useful, consider reading the books “Domain-Driven Design: Tackling Complexity in the Heart of Software” by Eric Evans and “Implementing Domain-Driven Design” by Vernon Vaughan.

User's avatar

Continue reading this post for free, courtesy of BowTiedDevil.

Or purchase a paid subscription.
© 2026 BowTiedDevil · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture