AugurProject / augur-app

Augur Desktop Electron Application
MIT License
222 stars 22 forks source link

Incorrectly reports position in settled market is a huge negative number #327

Closed enolan closed 6 years ago

enolan commented 6 years ago

After trying to collect trading proceeds in this tx, the app says I have a position of -1,985,999,999,999,999,999.1790 in market 0x95f2301a56a94b1ef6b60b5e94085462e71432fb. I poked around in the browser console, and augur.trading.getUserTradingPositions({account: "0xbf473d6016f15e757c677c7a8cf88e22718b40d2", marketId: "0x95f2301a56A94b1eF6B60B5E94085462E71432FB"}, function(x,y) { console.log(x,y)}) reports that my numShares in both outcomes is 0, but my numSharesAdjustedForUserIntention is -1985999999999999999.179. On Etherscan, I see I have 10,000,000,000,000 shares in one of the outcomes and 82,100,000,000,000 shares in the other. I don't know enough to tell which token corresponds to which outcome, but AIUI one of them should've been destroyed and the other one should've been exchanged for ETH.

Also there is a "complete sets sold" transaction for that market from August 5 that is still showing up in the portfolio/transactions page when it's set to display the last 24 hours. That's on Etherscan here. No idea if that's related.

Let me know if I can do anything else to help debug this.

bthaile commented 6 years ago

Thanks, we’ve come across this issue, I’m thinking augur-node isnt converting from atto shares (2**18) before doing calculations. We are working the issue,

Will update this issue when fixed.

CptanPanic commented 6 years ago

Yes I have this issue also showing a net position on a market of -4,442,999,999,999,999,999.8570

bthaile commented 6 years ago

Known issue, thanks for reporting. Closing