If the balance is derived from a deposit, then we either use the value stored in the acquired unit price for the deposit (this is added and adjusted by you) or by using archive data to lookup the value of the asset on the date it was acquired.
In order to determine the value of the asset we use the same currency that was used to in the sell trade. So if you sold Ethereum for USD, the deposit of Ethereum found is valued in USD. If, on the other hand you sold Ethereum for Bitcoin, we lookup the ETHBTC price on the deposit acquired date to determine the source value. The lookups are made in our archived data that is updated daily.ys holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.
If the balance is derived from a purchase we have two options to determine the purchase price and hence it's value. In most cases the purchase and sell trades were made with the same currency. In these cases we can just use the buy price of the trade.
In some cases, the asset may have been purchased with a different currency that was used to sell asset. This can occur if you purchase the asset with one currency but sell it for another currency. You may purchase Ethereum with USD but sell your Ethereum later for Bitcoin. In these cases we use archived data to determine the value of the purchase using the currency of the sell trade.