Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spell Design] Missing Context on Aave Macro #5504

Open
lgingerich opened this issue Mar 4, 2024 · 2 comments
Open

[Spell Design] Missing Context on Aave Macro #5504

lgingerich opened this issue Mar 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working in review Assignee is currently reviewing the PR WIP work in progress

Comments

@lgingerich
Copy link
Contributor

The current macro for Aave V3 has a single column for the user on borrows. aave_v3_ethereum.Pool_evt_Borrow has two columns that relate to the user: user and onBehalfOf. From a quick look, this also affects Aave V2, but I didn't check beyond that.

By omitting data in onBehalfOf, there is missing context in lending.borrow. It's not possible to calculate net borrow/lend since we don't know who's account funds were borrowed from.

So we need to add this onBehalfOf column back in somehow. I'm imagining we want to have both columns and not just swap these out. I wasn't part of the creation of the Aave model or any borrow/lend stuff, so I wanted to open an issue and get input from those that did work on it.

cc: @Hosuke @tomfutago @jeff-dude

@lgingerich lgingerich added the bug Something isn't working label Mar 4, 2024
@tomfutago
Copy link
Contributor

Hi @lgingerich - I used existing spells at the time of adding this macro (one of my early on Spellbook projects). Adding onBehalfOf sounds like a valid point - will have a look at adding it in. Any preference for the column name? I'd go with on_behalf_of to keep snake case convention as for other column names, but open to suggestions.

@lgingerich
Copy link
Contributor Author

on_behalf_of makes sense to me. The main reason I opened an issue for this is that it will of course effect the overall lending table schema. Before officially going with that name, I want to investigate if Compound and others have anything else we need to handle on this.

@jeff-dude jeff-dude added WIP work in progress in review Assignee is currently reviewing the PR labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review Assignee is currently reviewing the PR WIP work in progress
Projects
None yet
Development

No branches or pull requests

3 participants