Open this-username-is-taken opened 2 years ago
positionCounts
to snapshots (market/usage)Make these two fields of the Market entity in the lending protocol optional, outputToken is already optional.
Yield Aggregatort
yield ags
withdraw.amount / amountUSD
should include withdrawal fee if applicable.withdraw.feesUSD
Based on convo with @bye43
add oracle to lending protocols
add aggregated token data info in dex subgraphs (similar to uniswap)
Consider allowing multiple input tokens in lending protocols. For the case of Compound V3 markets
Consider having rewards on the protocol level. In the case of TrueFi that is what is happening. @corerouter feel free to add any other comments or notes on this front! Thanks for bringing it up
How can we show variable vs stable debt in lending positions? prolly by separating the two into different positions, but we need schema changes to allow for this i think
from
and to
fields in the swaps? A user should always be swapping with a pool, though, they may interact with a Router as a proxy. So I am thinking about removing from
and to
and just having user
, pool
, and maybe router
in the case of swaps. I think this is more clear. Should positiion.liquidationCount
increment when collateral is transferred to the liquidator, and specify this in schema.
Consider adding an asset
field to the position
entity. In the case of abracadabra the borrows are always in MIM no matter what market you are in. Without this the whale watcher data app will have to have unique logic for abracadabra.
schema
and protocol type
one to one? If not, should we consider adding schema into the protocol entity? Rename PositionSide.LENDER to PositionSide.Collateral or Depositor in extended lending schema? Protocols like makerdao do not lend collaterals (only DAI); it is a bit odd to call them the lender side.
Make the liquidate.position field a list in the extended lending schema, because multiple positions will be changed by a liquidation (lender and borrower side).
Integrate flash loans into lenfing schema. Otherwise a new schema for it. Could make for some cool data apps 😉
How do we classify position token (ie, aToken / cToken) transfer? Should this be a new position, should it count as a withdraw / deposit?
How do we classify position token (ie, aToken / cToken) transfer? Should this be a new position, should it count as a withdraw / deposit?
That's correct. These is a fairly long discussion on this in the Discord if you try searching through
use immutable where possible per #964
Add native token balances where possible, this would include borrow balances in native unit. Per discussion with @yulesa (feel free to add more detail if necessary here)
Let me give examples of where this is useful. Imagine you're analyzing a pool and it's TVL went down, but that's only beacuse the price tanked, in native terms the pool is only went up. Native terms remove price fluctuations but you can't combine different pools.
yeild ags should have isActive
on the vaults, beefy finance has deprecated vaults for example
Add entity count to make fetching large number of paginated entities easier (instead of blindly fetching until the end of pagination)
Liquidate
entity in lending subgraphs: https://github.com/messari/subgraphs/pull/686#discussion_r934097812pricePerShare
to BigInt