Friday 20 June 2014

XMM Utilities.

sourcecode: https://github.com/ripplerm/XMM-utilities

The page contains some basic tools that I had developed to perform tasks related to XMM. Currently there's only two on the list.


1. Holder Statistic: (http://ripplerm.github.io/XMM-utilities/holders.html)

This will show a simple statistics of XMM holders, categorised with holding-size . For those who are not familiar with maths language,  an " [100 -1000) " expression means 'greater-or-equal to 100, and less than 1000'.

The "List All Holders" checkbox, if ticked, will return a full list of holder's account, together with their number of holdings in XMM units.


2. XMM's value Estimation: (http://ripplerm.github.io/XMM-utilities/nav.html)
The tool do a simple calculation of the NAV (Net-Assets-Value) of XMM units.

It's performing the task in three simple steps:

  1. sum up the assets from all accounts of XMM. 
  2. check with RippleCharts.com the prices of USD, CNY, and BTC measured in XRP.
  3. measure values of XMM's assets with the exchange rates, and hence NAV per XMM.


Several thing worth pointing out here -- 

First, we are using 1-hr-average exchange-rates from RippleCharts.com (see RippleData-API ). In my opinion, average prices over certain time-range is the more suitable figures than spot prices for measuring the value of assets. I think one-hour-average is a good reference given the high volatility of XRP, but people may have different arguments regarding the best range.

Then, though we understand that same kind of IOUs by different issuers may have different market value, for sake of simplicity I use only single price for each assets class. (to be particular, prices of USD.Bitstamp, BTC.Bitstamp and CNY.RippleChina are used for USD, BTC and CNY). And for those IOUs of low trading volume (EUR, XAG, etc), their market rates in Ripple are sometimes absent or too volatile due to thin-volume and high-spread. Hence their prices in XRP are instead calculated with price of USD and a given exchange-rates (this is what those input-boxes are there for). 

I hope this tool could help some XMM holders to evaluate the underlying-value of our Fund. A similar codes were used by the bot that's performing our automatic redemption/new-issue offers. 


Warning:
I'm newb in codings... So, please be aware that these tools may contain tons of bugs and unpredictable behaviour. Do not expect them to always provide accurate result.


Thanks:
to hmalmedal (https://github.com/hmalmedal), whose ripple-utilities codes helped me a lots in learning basic javascript with ripple-lib.

and also Steven Zeiler, whose videos on Youtube is another great resource!
https://www.youtube.com/playlist?list=PLtDBLDfob7PNhdvhl4Gy2zPkK4z3rPBxR