TGStat
TGStat
Введите текст для поиска
Расширенный поиск каналов
  • Язык сайта
    flag Russian flag English flag Uzbek
  • Вход на сайт
  • Каталог
    Каталог каналов и чатов Региональные подборки Тематические подборки Платные каналы Поиск каналов
    Добавить канал/чат
  • Рейтинги
    Рейтинг каналов Рейтинг чатов Рейтинг публикаций
    Рейтинги брендов и персон
  • Аналитика
  • Поиск по публикациям
  • Мониторинг Telegram
  • Продвижение
    Реклама через Яндекс Бизнес Реклама в каналах через TGStat Agency Реклама на сайте TGStat.ru
TON_Learn

4 Nov 2023, 14:24

Открыть в Telegram Поделиться Пожаловаться

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.

28.3k 0 12 76
Каталог
Каталог каналов и чатов Подборки каналов Поиск каналов Добавить канал/чат
Рейтинги
Рейтинг каналов Telegram Рейтинг чатов Telegram Рейтинг публикаций Рейтинги брендов и персон
API
API статистики API поиска публикаций API Callback
Наши каналы
@TGStat @TGStat_Chat @telepulse @TGStatAPI
Почитать
Академия TGStat Исследование Telegram 2019 Исследование Telegram 2021 Исследование Telegram 2023
Контакты
Справочный центр Поддержка Почта Вакансии
Всякая всячина
Пользовательское соглашение Политика конфиденциальности Публичная оферта
Наши боты
@TGStat_Bot @SearcheeBot @TGAlertsBot @tg_analytics_bot @TGStatChatBot