in #hive-1679223 years ago

This is awesome, great work.

Like dagger suggested above, is it easy to include time stamps?

Also would it be easy to include the amount of SWAP.HIVE received (or whatever token they're swapping into) at the end?

miked.png

For example:

"At 9.50PM konvic sold 41.04 LEO for 7.75 SWAP.HIVE"

Posted Using LeoFinance Beta

Sort:  

Yes, that's already implemented actually. It's just that some transactions don't actually contain that data.

There are 2 types of swaps, and the json data in each is different.

The regular swap that a user would perform on tribaldex, would pretty much always provide the amount received.

But a lot of the transactions are done by bots... and those bots usually specify "exact input" and "max slippage" when they make the transactions. Those transactions don't provide output amounts in the json data.

Of course there are still ways to calculate this, like calculating someone's account balance before and after a transaction. But that wouldn't really be reliable.

For example, many of the bots are performing arbitrage and submitting multiple transactions in the same block. So calculating balances before and after that block wouldn't really tell us anything.

Either way I just got back and will be spending the next day making a lot of changes, it will be much more comprehensive soon :)

Posted Using LeoFinance Beta