feat: add arm history user tracking for earned and roi values#77
feat: add arm history user tracking for earned and roi values#77
Conversation
| state.assetsPerShare, | ||
| ) | ||
| const armDayApy = calculateArmDailyApy({ block, state, previousDailyStat }) | ||
| await updateDailyAddressEarnings(block, state) |
There was a problem hiding this comment.
My main concern is pulling and updating all addresses on every processing interval here. My move to improve it would be to hold the addresses in memory and avoid pulling from db when possible. Probably not a big deal here yet as I'd guess unique arm address count is low.
| timestamp: DateTime! | ||
| blockNumber: Int! @index | ||
| txHash: String! @index | ||
| type: HistoryType! |
There was a problem hiding this comment.
I see the use of the Yield field here but the Sent/Received I feel unsure about since we can take advantage of the ERC20 processing we already have. (createERC20EventTracker(...) added at the bottom of origin-arm.ts)
Perhaps better would be ArmAddressYield to track yield earnings over time.
tldr the point of the erc20 tables is so we don't have to recreate erc20 logic repeatedly.
|
I'll make some changes and ask for your input on them @toniocodo |
No description provided.