Accounting on StarkNet for DEXes

Let’s say a user performs a few trades in a single block. Since StarkNet aims to publish only state diffs, we’ll only see the final account balances, rather than all the trades.

Users might be interested in seeing all the transactions, for accounting purposes, as required in many jurisdictions today. One answer that I got from @guthl is that you can use Voyager for that.

Is data on Voyager verifiable? For example, is there a transaction root output in every block that users can check inclusion? Is this desirable at all, or are there alternatives?

26 Likes

All data on Voyager comes from the sequencer anyways, so you can just query the sequencer API for those.

One way to do it is thru the starknet command from cairo-lang. Or if you want to do it programmatically, you can look into the code for the actual requests made to the gateway.

10 Likes

Isn’t this data trusted? Or can I verify it somehow?

10 Likes

Hello!

Soon you’ll be able to add events to your contracts, and these events will be held by full nodes; so you’ll be able to read history from the events list.
Events should be available with the next Alpha version, next week

9 Likes

Nice, that sounds very promising! And there’ll be an event root output in blocks?

8 Likes

Yes, there will. We’ll have more details out shortly, and we’ll probably talk about it in the next community call.

9 Likes

This sounds great. Looking forward to it!

9 Likes

Is there a community call calendar?

8 Likes

Hi! They are organized rather informally. They happen ~every two weeks, in the beginning of the week. Next one is next Tuesday.
We usually announce them on Discord.
You are right though, we should make the schedule a bit more visible. Thanks!

13 Likes

In the discord, will be there Tues!

7 Likes

Good to have you here @kobigurk! StarkNet OG and the Breaker of Gateways :smile:

As @henri.lieutaud answered - events will allow doing this, and a commitment to the events in a block will part of the proof output, thus it will be verifiable.

I just wanted to add that there will also be a transactions commitment in the block, so transactions will also be verifiable and not trusted.

You can see more in the technical documentation about block structure.

11 Likes

Thanks Tom - that’s wonderful and exactly what I was looking for.
Is the block structure the one that’s already deployed?

8 Likes

You can check all available resources here - Technical Documentation - StarkNet

We are adding more and we are also in the process of moving it to an open repository, so you will be able to contribute/ask for what is missing.

7 Likes

it will be great to close transaction history for every one but users or wallets you want yourself, hope this is achivable here. seems as a nice point I think

8 Likes

Хорошая мысль,
поддерживаю
!

6 Likes