Skip to content

Get map of liquidity info for given account #23

@marco-sundsk

Description

@marco-sundsk

There is a nature and strong requirement that a ref LP wanna know all his liquidity share throughout all the pools. But now, the contract is lack of liquidity record for given user. There are two ways to address that:

  • Using a backend dataserver to fetch all pool info and frontend using some complex SQL query to join data and fetch a whole liquidity view for given LP;
  • Adding LookupMap::<AccountId, HashSet<PoolId>> into contract storage to keep track of LP's relevant pools.

I would prefer the second way, cause the amount of LP woundn't be so large, and this would be a frequently query entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions