TON DEX PnL Calculator
This week, I wanted to publish an article about Onchain Token Audit with tutorials, but while dton.io is moving to new servers, let's talk about PnL.
What is it and why is it needed?
DEX PnL calculator allows you to see how much profit or loss wallet received when trading certain tokens.
This allows:
- understand which tokens are more profitable to trade
- look at other people’s trading strategies
- evaluate real results, not advertising about 100x
What is the problem with the calculation?
Tokens are bought and sold at different times, with different TON prices, the price of TON is also not stable. Also, not all tokens can be sold, how to count them then.
I put together such a DEX PNL calculator for TON, transactional calculation based on realized PnL for StoneFi (what this means is described below)
LINK: https://tonlearn.tools/
Now let's look at what this means:
Realized/Unrealized PnL
Realized PnL
profits from an investment you've made
Realized PnL = Entry price - Exit price
Unrealized PnL
potential profit you can make from held investments
Unrealized PnL = Entry price - Current price
Okay, what date should I take the price for?
First-in, first-out
The purchase price is taken at the time of the first purchase, and the sale price at the time of sale, for example:
Suppose Alice first bought 1 TON at $1,100 and a few days later bought 1 TON at $800. A year later, he sold 1 TON at $1,200.
Alice's initial cost = (1 TON x $1,100) = $1,100
Current market value = (1 TON x $1,200) = $1,200
FiFO PnL = $1,200 - $1,100 = $100 (profit)
Last-in, first-out
The LIFO method requires the seller to use the most recent purchase price of an asset in the calculation. Using the same example as above:
Alice’s initial cost = (1 TON x $800) = $800
Current market value = (1 TON x $1,200) = $1,200
PnL = $1,200 - $800 = $400 (profit)
Weighted average cost method
Means to calculate the weighted price for each purchase. For our example:
Weighted average cost = ((1 TON x $800) + (1 TON x $1100)) / 2 TON = $950
Current market value = (1 TON x $1200) = $1,200
PnL = $1,200 - $950 = $250 (profit)
Transaction-based
A transaction-based calculation requires a person to calculate the PnL for each specific transaction.
Realized PnL = - $1,100 - $800 + $1,200 = -700$
P.S This is still an MVP, but I will be glad if you try it, especially if you have transactions through Stonefi and you can check the service in your wallet. I will add other Exchanges as soon as i have time.
This week, I wanted to publish an article about Onchain Token Audit with tutorials, but while dton.io is moving to new servers, let's talk about PnL.
What is it and why is it needed?
DEX PnL calculator allows you to see how much profit or loss wallet received when trading certain tokens.
This allows:
- understand which tokens are more profitable to trade
- look at other people’s trading strategies
- evaluate real results, not advertising about 100x
What is the problem with the calculation?
Tokens are bought and sold at different times, with different TON prices, the price of TON is also not stable. Also, not all tokens can be sold, how to count them then.
I put together such a DEX PNL calculator for TON, transactional calculation based on realized PnL for StoneFi (what this means is described below)
LINK: https://tonlearn.tools/
Now let's look at what this means:
Realized/Unrealized PnL
Realized PnL
profits from an investment you've made
Realized PnL = Entry price - Exit price
Unrealized PnL
potential profit you can make from held investments
Unrealized PnL = Entry price - Current price
Okay, what date should I take the price for?
First-in, first-out
The purchase price is taken at the time of the first purchase, and the sale price at the time of sale, for example:
Suppose Alice first bought 1 TON at $1,100 and a few days later bought 1 TON at $800. A year later, he sold 1 TON at $1,200.
Alice's initial cost = (1 TON x $1,100) = $1,100
Current market value = (1 TON x $1,200) = $1,200
FiFO PnL = $1,200 - $1,100 = $100 (profit)
Last-in, first-out
The LIFO method requires the seller to use the most recent purchase price of an asset in the calculation. Using the same example as above:
Alice’s initial cost = (1 TON x $800) = $800
Current market value = (1 TON x $1,200) = $1,200
PnL = $1,200 - $800 = $400 (profit)
Weighted average cost method
Means to calculate the weighted price for each purchase. For our example:
Weighted average cost = ((1 TON x $800) + (1 TON x $1100)) / 2 TON = $950
Current market value = (1 TON x $1200) = $1,200
PnL = $1,200 - $950 = $250 (profit)
Transaction-based
A transaction-based calculation requires a person to calculate the PnL for each specific transaction.
Realized PnL = - $1,100 - $800 + $1,200 = -700$
P.S This is still an MVP, but I will be glad if you try it, especially if you have transactions through Stonefi and you can check the service in your wallet. I will add other Exchanges as soon as i have time.