You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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
andonBehalfOf
. 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 inlending.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
The text was updated successfully, but these errors were encountered: