messari / subgraphs

Standardized subgraphs for blockchain data
MIT License
512 stars 241 forks source link

Future schema upgrades #389

Open this-username-is-taken opened 2 years ago

this-username-is-taken commented 2 years ago
steegecs commented 2 years ago
melotik commented 2 years ago
tnkrxyz commented 2 years ago

Make these two fields of the Market entity in the lending protocol optional, outputToken is already optional.

steegecs commented 2 years ago

Yield Aggregatort

melotik commented 2 years ago
melotik commented 2 years ago
melotik commented 2 years ago

yield ags

Based on convo with @bye43

this-username-is-taken commented 2 years ago

add oracle to lending protocols

this-username-is-taken commented 2 years ago

add aggregated token data info in dex subgraphs (similar to uniswap)

melotik commented 2 years ago

Consider allowing multiple input tokens in lending protocols. For the case of Compound V3 markets

melotik commented 2 years ago

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

melotik commented 2 years ago

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

steegecs commented 2 years ago
melotik commented 2 years ago

Should positiion.liquidationCount increment when collateral is transferred to the liquidator, and specify this in schema.

melotik commented 2 years ago

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.

steegecs commented 2 years ago
tnkrxyz commented 2 years ago

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.

tnkrxyz commented 2 years ago

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).

melotik commented 2 years ago

Integrate flash loans into lenfing schema. Otherwise a new schema for it. Could make for some cool data apps 😉

melotik commented 2 years ago

How do we classify position token (ie, aToken / cToken) transfer? Should this be a new position, should it count as a withdraw / deposit?

this-username-is-taken commented 2 years ago

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

melotik commented 2 years ago

use immutable where possible per #964

melotik commented 2 years ago

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)

yulesa commented 2 years ago

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.

melotik commented 2 years ago

yeild ags should have isActive on the vaults, beefy finance has deprecated vaults for example

this-username-is-taken commented 2 years ago

Add entity count to make fetching large number of paginated entities easier (instead of blindly fetching until the end of pagination)