Skip to content

Add 1DEX volume #2967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 24, 2025
Merged

Add 1DEX volume #2967

merged 8 commits into from
Apr 24, 2025

Conversation

valiant-coder
Copy link
Contributor

No description provided.

@valiant-coder
Copy link
Contributor Author

Hi

@llamabutler
Copy link

The 1dex adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts dexs 1dex

🦙 Running 1DEX adapter 🦙
---------------------------------------------------
Start Date:	Sun, 20 Apr 2025 00:00:00 GMT
End Date:	Mon, 21 Apr 2025 00:00:00 GMT
---------------------------------------------------

EOS 👇
Backfill start time: 15/4/2025
Daily volume: 12.02 M
End timestamp: 1745107200 (2025-04-20T00:00:00.000Z)

@treeoflife2
Copy link
Member

treeoflife2 commented Apr 21, 2025

Hi

i was looking at docs for contract but couldn't find it, can we get more information like smart contracts, and information about trading fees(users pay on each trade)? if it's already in docs then only just send the doc link.

@valiant-coder
Copy link
Contributor Author

valiant-coder commented Apr 21, 2025

Hi  

i was looking at docs for contract but couldn't find it, can we get more information like smart contracts, and information about trading fees(users pay on each trade)? if it's already in docs then only just send the doc link.

We haven’t consolidated all contract addresses into the Docs yet. In the meantime, you can check the transactions that occurred on our DEX through the portal.1dex contract.

https://eoseyes.com/account/portal.1dex

@treeoflife2
Copy link
Member

treeoflife2 commented Apr 21, 2025

Hi  你好

i was looking at docs for contract but couldn't find it, can we get more information like smart contracts, and information about trading fees(users pay on each trade)? if it's already in docs then only just send the doc link.我正在查看合约的文档,但找不到,我们能否获得更多信息,例如智能合约,以及有关交易费用的信息(用户为每笔交易付费)?如果它已经在 Docs 中,那么只需发送 Doc 链接。

We haven’t consolidated all contract addresses into the Docs yet. In the meantime, you can check the transactions that occurred on our DEX through the portal.1dex contract.

https://eoseyes.com/account/portal.1dex

we need the volume to be pulled from onchain data, so it's easily verifiable, instead of relying on the direct APIs

@valiant-coder
Copy link
Contributor Author

But calculating trading volume directly from the contract requires significant computational resources.

@treeoflife2
Copy link
Member

But calculating trading volume directly from the contract requires significant computational resources.

That's fine, as 1dex is not very big dex, so we should be fine

@g1nt0ki
Copy link
Member

g1nt0ki commented Apr 21, 2025

hi @valiant-coder
Thanks for the PR, I tried looking at the transactions and got a bit confused, major volume is from BTC pair but I dont see trades from your UI in the txns

Also, can you give us a bit of technical info on how this dex operates, I tried looking at the docs but it was not clear, because users can deposit in EOS or in exsat evm network?
And what is the link between dex.velox & portal.1dex ?

@valiant-coder
Copy link
Contributor Author

hi @valiant-coder Thanks for the PR, I tried looking at the transactions and got a bit confused, major volume is from BTC pair but I dont see trades from your UI in the txns

Also, can you give us a bit of technical info on how this dex operates, I tried looking at the docs but it was not clear, because users can deposit in EOS or in exsat evm network? And what is the link between dex.velox & portal.1dex ?

Hi, please take a look at the emitfilled action in the event.velox contract — it shows trading volume. I tried writing a script to call the contract’s API, but since there are so many transaction records, the execution takes too long.

https://eoseyes.com/contract/event.velox

@llamabutler
Copy link

The 1dex adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts dexs 1dex

🦙 Running 1DEX adapter 🦙
---------------------------------------------------
Start Date:	Mon, 21 Apr 2025 00:00:00 GMT
End Date:	Tue, 22 Apr 2025 00:00:00 GMT
---------------------------------------------------

EOS 👇
Backfill start time: 15/4/2025
Daily volume: 4.77 M

Copy link
Member

@g1nt0ki g1nt0ki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, I am able to pull the events faster if I up the limit to 1000, but the api returns max 10k records? also, you havent answered my question

@valiant-coder
Copy link
Contributor Author

The upper limit of limit is 100.

There are currently two places on the UI that display transaction records. One is "Order History", which only displays the transaction records of the currently logged-in account. The other is Latest Trades on the right, but this does not display detailed information such as the on-chain transaction ID.

The underlying matching logic of dex is in the dex.velox contract, and the pools.velox contract records the supported trading pair information. The user entrance is app.1dex, and the user places an order by transferring to the app.1dex contract. The contract identifies the transfer memo to determine the user's order behavior and calls the dex.velox contract. portal.1dex is an asset charging and withdrawal contract that supports the charging and withdrawal of EOS native assets and exsat evm assets. In short, portal.1dex is responsible for the charging and withdrawal of assets, and dex.velox is responsible for matching transactions.

@llamabutler
Copy link

The 1dex adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts dexs 1dex

🦙 Running 1DEX adapter 🦙
---------------------------------------------------
Start Date:	Wed, 23 Apr 2025 00:00:00 GMT
End Date:	Thu, 24 Apr 2025 00:00:00 GMT
---------------------------------------------------

EOS 👇
Backfill start time: 15/4/2025
Daily volume: 16.19 M

@g1nt0ki g1nt0ki merged commit 96f46da into DefiLlama:master Apr 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants