centrifuge / pools-subql

Subquery for Pools on Centrifuge
MIT License
1 stars 4 forks source link

Add realized P&L #133

Closed filo87 closed 1 month ago

filo87 commented 2 months ago

Specs: https://centrifuge.hackmd.io/ninkwnyPTcamdwlGZmyiZg?both

Provide solution design as well as first implementation MVP

filo87 commented 1 month ago

Suggest adding a dedicated table to keep track of positions

erDiagram
    Asset ||--|{ AssetTransaction : ""
    Asset ||--|{ AssetPosition : ""

    AssetPosition {
        string ID
        bigint holdingQuantity
        bigint purchasePrice
    }