Describe the bug
Right now frontend displays recent transactions based on latest created positions on given market, which is realized by following query:
The thing is, that positions once created are immediately marked to market with known oracle price, so price that is in this position does not represent creation price of the position.
Position Creation and Position M2M are two independent operations represented by separate events. Right now, for Market.PositionCreated new record is created in the database and for Market.PositionMarkedToMarket position price is updated to oracle price.
Expected behavior
Indexer provides information about latest transactions with prices before M2M settlement
Additional data stored in database for this task follow market lifetime (Market.MarketCreated, Market.MarketRemoved) events
Describe the bug Right now frontend displays recent transactions based on latest created positions on given market, which is realized by following query:
The thing is, that positions once created are immediately marked to market with known oracle price, so price that is in this position does not represent creation price of the position.
Position Creation and Position M2M are two independent operations represented by separate events. Right now, for
Market.PositionCreated
new record is created in the database and forMarket.PositionMarkedToMarket
position price is updated to oracle price.Expected behavior
Screenshots
Additional content