This type is used inside a PortfolioElement to define what type of data will be stored inside the element.

You can find all different ElementType here, their is (currently) 4 different types :

  • single : this will contain 1 item (nft, token, generic) inside the element

  • multiple : this will contain 1 or more items inside the element

  • liquidity : this will contain an array of PortfolioLiquidity, which can be used to represent assets deposited into liquidity protocols (AMMs, CLMMs, etc...). They also comes with an array of rewards and yields.

  • borrowlend : this will contain arrays representing the borrowed and lent assets on a protocol but also some additional values like healthRatio which inform of the status of the account regarding the liquidation process.

With those 4 types we're able to represent almost any type of assets that exists on-chain.

This list might change in the future, please refer to our repository for up-to-date information. https://github.com/sonarwatch/portfolio/blob/main/packages/core/src/Portfolio.ts#L54

Last updated