Read Contract Data
Read the long and short staked token amounts for the current market and wallet address from the Staker contract. Those two values are then multiplied by the most recent long and short token prices (in DAI), which are passed in by the SystemStateUpdated event. The result is the long and short wallet balances for the market in DAI. Those two balances are then added together to get the total wallet balance for the market.
Last updated