zeitgeistpm / ui

Zeitgeist general prediction markets application.
https://app.zeitgeist.pm
Apache License 2.0
16 stars 5 forks source link

Unrealized PnL wrong or confusing. #2426

Open Boibit opened 4 months ago

Boibit commented 4 months ago

image

Smashball is the reported outcome of this market but I have negative unrealized PnL for the position in my portfolio.

Not sure if this is calculating total PnL of the entire market. I did have positions that were sold for a loss or held to 0 in the same market. If this is calculating the total PnL of the market, then it's confusing and counter intuitive. If not, this is a bug.

Robiquet commented 4 months ago

Maybe because price is incorrect

robhyrk commented 4 months ago

Issue seems to be caused by incorrect price shown. The curent formula for calculating unrealized PnL is: currentMarketPrice - avgCost) * totalQuantity