Peercoin Analytics

This thread is to outline a computer program that would supplement the core client. The goal would be to provide higher level user interface features that would be risky or expensive to implement in the core client.


  1. Import txn history from client. Plot address balances as a function of time, as well as their total sum. Make the charts customizable by date window, logarithm, what have you. Can label charts using the addressbook.

  2. Use the txn history to lookup PeerAssets that may be involved in those txns by interacting with an external PeerAssets service, like a web-app. Because Peercoin Analytics would not have any private keys, this is entirely safe to do hot.

  3. Plot dates of NFT/PeerAssets reception as little graphic popups on the chart. Do this for each address as well as the total wallet. For events close in date, have a visual indicator that indicates how many near that time, then becomes more explicit as you zoom in.

  4. Badge page for NFT. Certain supported PAs would have associated graphics, website links, descriptions, etc. Unsupported PAs can have quick human readable stats about the PA, like it’s issuance mode and so on.

  5. Stats about how you are minting. Up time, frequency, even integrating findstake.js would be awesome.

  6. Something about message signature verification or something? I’m not sure the application here, maybe I’m trying to think of a way to create a sterilized front end for interaction with websites? Like a message signing system to give your IP address the virtual authority of your private key when interacting with specific websites that don’t exist yet. Or something, I dunno.

  7. Maybe a ‘share’ button of some form for social media integration.

1 Like


How do you plan to connect it to the core client as far as I understand you’ll need a third party app that can show analytics from a wallet.
I’ve started working on some raspberry Pi UI connected to the headless client. So far I’ve been able to render minting in real time as well as adresses. It can be extended to displays some analytics as well.
Is it something you would consider or just something else that you had in mind?

This is basically just spitballing, I don’t have an actual plan of attack. For how it interacts with the core wallet, i was thinking just having it query the txn history using RPC or something. For the signing applications, that might have to be done manually. The point is to not give the analytics program any private keys, keep it local to your computer so anonymity can be preserved if desired, and to allow it to be coded in whatever language is convenient. So yes, it is essentially ‘third party’, just imports txn history and calculates a bunch of graphs and fun(ctional) analytics.

1 Like

1 Like

You got your GUI and functionality figured out. You may want to have a look at low-code/no-code tools like Appian. Challenge might be to find a RPC integration, but at least you could get some results quickly. Technically also on mobile within home network where the RPC port is possibly made accessible beyond the internet firewall. Just thinking loud.

Totally! One thing I was thinking about was maybe a standard archive file for utxo history. So like a batch process or something that takes a synced Peercoin directory (wallet closed) and outputs like a human-readable excel spreadsheet that can be imported into Peercoin Analytics. But yah, rpc might be way easier to start with.

For the coding, I’d prefer to pay someone to do it for me, lol. I got 4k ppc I’m willing to put toward this, I’m just trying to settle on what exactly we want. I’m told that the base level of what I’m asking for here is doable, even for a windows .exe. Use electron, or python or something.

Hi. @Cybnate do you think a no-code tool can make this ?
I’m willing to take a bet on it. I think you can get a pretty good Most Valuable Product (MVP) but surely not a production app. At least not yet.

@Nagalim There a lot of works to make a real usable library but it’s a start

It’s a Javascript library that just connect to RPC and give access to the basic RPC commands available on Javascript then you can use it on whatever HTML page that you want ( I use ReactJS on it ). It is pulling data from RPC to make it available as a Javascript variable.

In the end you can use it like this

    this.peercoin = new Peercoin(""); // testnet port
1 Like

It seems like MVP (minimum viable product, not most valuable) is a script that takes the txn/mint history of a client and outputs it as a file that can be imported into e.g. excel. The entire analysis program could be built inside a program like excel, so we have to refocus on what our goal is.

  1. Program is intended to use a local record of the blockchain as opposed to an external server. This is for privacy reasons at the very least. Program must be open source.
  2. Program will perform tasks that are deemed risky in the standard wallet. This includes interacting with central databases and having updates pushed to it. For this reason, the program is never intended to touch the private keys, the encryption password, or the wallet.dat.
  3. It would be beneficial for the program to be able to run in an ‘online’ and an ‘offline’ mode. When offline, Program can be run using last known value of variables.

Tasks that also demand these things might be able to glom onto this effort. For example, perhaps we have a warning system that tells people when the Peercoin Foundation has put out an update. This program could possibly gather information like the client version on this node and check it against the central database, then pop up a warning to the user that they should update their client. Various troubleshooting scripts could be put in here, it could be a general toolbox for easy fixes.

Peercoin Analytics could be a one-stop-shop for a client doctor, a scoreboard, and a deep data dive. We could wire it up with price feeds and make it a place to watch your investments in real time. We could allow for limited analysis of other coins, or milk the PeerAssets category for more, or talk more about the social media connections. I think it starts pretty simply, just see your txn history as a string of data that can be self-analyzed to your benefit.

Maybe it’s two things:

  1. A script that can be run offline that interacts with the wallet and outputs a file that contains metadata and txn/mint history in an ascii format. This is MVP.

  2. A program/template/what have you that imports this history file and analyzes it. It could potentially come in many different flavors/iterations for various different purposes.

@blackout7 No-code is pushing it a bit for this application. Low-code should be possible imo. At the end of the day it is just a database you read and display with minimal manipulations. Ideal for low-code/no-code. e.g. Appian front-end would provided 80%+ of functions mentioned. But RPC integration might be a challenge to find a low-code app for as that type of integration is still not very common. I couldn’t find something obvious with a Google search, but that doesn’t mean it is not possible. Offerings are very broad and it is hard to track what each app can do especially when limited to limited demo/trial versions as I am.

Once you got that, you only need Appsheet and off you go.

You’re right about MVP (mininum viable product). A program that output a file from the wallet should be straight forward to do.

But to me it should be included in the wallet itself with an export command for example

I think we can try to aim for this ultimately, but coming to consensus on archive formatting can be done in advance with a few iterations before we try to push it into the core client.

For example, what is in the metadata? Client version, for sure. But maybe other things can be included, like uptime or something. It is tempting to include metadata that is useless on its own, but can become valuable when shown to others, or a centralized entity. For example, having a central server that gathers records of reliable nodes, and have Peercoin Analytics talk to this server in order to give it data as well as to receive a list of good nodes, maybe even preformatted into a .conf file. The issue with this kind of scheme is that it is easy to manipulate the central server with false analytics. Really no info that is given out by analytics can be taken as truth by anyone other than the user, because ultimately they should have full control over the program. So while it may be a way for central entities to contact minters and users, the concept of gathering metadata from multiple users really just isn’t a thing. Therefore, any metadata stored in the archive file should be desired for the Analytics program itself, e.g. comparing reported client version to latest release.

Maybe a section in the share tab where you can send your debug.log directly with others. If we combine that with a standard toolbox of debug and log-analysis tools, we could empower users to help troubleshoot each other better.

1 Like

I’m trying to figure out how to do characteristic frequencies. I want to either do some kind of fourier transform, or really lean into the binning concept.


PeercoinAnalytics.xlsm (25.2 KB)
PeercoinAnalyticsLibre.ods (10.4 KB)

You will have to allow macros for this to work. For excel, that should be easy as pie. For .ods, you have to go into tools>options>security>macro security and use ‘Medium’, then reopen the document and allow macros.

If you’re using the .ods, you have to copy in the sheets manually. Open both the peercoin_export.xlsx and the PeercoinAnalyticsLibre.ods, then right click on the mints tab and click ‘move or copy sheet’ and change the book to be ‘PeercoinAnalyticsLibre.ods’ and add it at the end. Then do the same with the monetary tab.

Anyway, long story short, excel is going to be way easier to do this in than libreoffice or openoffice.

i really want to try it, is it possible to use the csv that you can export from the official wallet in the peercoin qt client or is your open office ods file relying on some information not present in official csv export?

Peercoin Analytics is made up of two functions.

The first is an export function, the current implementation being an API-based interaction with the core client that can be done cold, off-line, open source. It does not need access to your keys, but it does need to talk to your running client. We could hypothetically put this into the core client in the future, if there already is a function for this then what Peerchemist did here is possibly redundant.

The second is an online, potentially proprietary, data analysis program. This software could come in many, potentially competing, forms. It would be mainly a graphing and math software, where it process a large amount of information in easily consumable and potentially sharable forms and metadata.

My current implementation of the second bit is done in Excel using Visual Basic. All it does right now is imports your data and plots your wallet balance as a function of time, including minting. I then tried to build support for libreoffice and OpenOffice, and ran into some fundamental issues regarding window and file manipulation, but the graphing works alright. I am leaning toward forging ahead with Excel and disregarding OpenOffice for now, in favor of later porting over to a python integration. However, Excel is certainly the easiest thing to sandbox in, so that’s where I’m starting.

Aha, found this. Ok, cool, didn’t know this was here. This is close to what is needed, you could certainly spit out the total balance as a chart. I’ll try to add support for this, thank you! However, while much of it is here, there is some information missing that would lend itself to some really powerful analytics, i.e. the txout amount that corresponds to the mint reward. I’ll give this a think.

1 Like

PeercoinAnalytics.xlsm (34.0 KB)

Now includes support for the official csv if you just leave out the ‘advanced file name’. Just download the csv in the ‘Transactions’ tab of the client, then open the above excel sheet and allow macros.

Also added was a new ‘Math’ button that doesn’t do much yet, but an indicator of where it might go next.

I want to check out Google Apps Script next to see if we can port this into Google Docs.

1 Like