For the second Developer Highlights, we get to speak with Sebastian Siemssen & Ivan Herger.
Ivan and Sebastian are long time members and developers in our community and have been working on subgraphs for Enzyme Finance (formerly Melon Protocol) for more than 2 years. They are going to share the challenges they faced and the lessons they learned along the way. In this episode we’ll explore some of the more demanding event tracking, data aggregation and scaling requirements of a DeFi subgraph and the patterns and solutions they came up with to solve them:
- Dealing with external contracts with non-ideal behavior (incomplete & missing events, etc.)
- Tips for filtering and paginating large data sets
- Tips for designing a graphql schema
- and more …
This is the first of two parts. I also recommend watching the second part.
Watch the full episode, or jump straight to each topic using the timestamps below the video.
00:00 Episode overview
25:40 Schema Design - Build the schema close to the data Requirements
27:11 Schema Design - Limitations to filter and sort
30:21 Schema Design - Low/High level data
32:22 Schema Design - Upgradable Protocols
42:01 Avoiding Fatal Errors - About
45:03 Avoiding Fatal Errors - Try/catch
49:25 Avoiding Fatal Errors - Don’t throw exceptions
51:06 Avoiding Fatal Errors - nonFatalErrors
54:02 Avoiding Fatal Errors - Required properties in the schema
55:55 Mappings - Save/Load performance Impact
We encourage anyone to ask questions about these topics below.