Skip to content
Anton Salikhmetov edited this page Jun 28, 2017 · 2 revisions

XMM trading bot executes in an infinite loop. Normally, it is launched in command line as while date; do xmm hedge rippleADDRESS -n 3 -y; done 2>&1 | tee -a rippleADDRESS.log. At each iteration, the trading bot makes sure that order pairs exist for selected (more on currency pair selection later in this document) pairs of currencies according to the following rules:

buy balanceA * delta / (1 - delta)
for balanceB * delta / (1 + delta)

and

buy balanceB * delta / (1 - delta)
for balanceA * delta / (1 + delta)

Once either of such orders is executed, the balances for currencies A and B become equal in value at the exchange rate at which the order was executed. Note that asset growth is measured in basis points (1% = 100 bp). As for the integral characteristic of the wealth associated with the Ripple wallet, the geometric mean of saldos for all currencies with positive balance is being used:

(balanceA1 * ... * balanceAn) ^ (1 / number_of_assets) / number_of_shares

TODO: XMM exchange rate wrt other currencies.

The XMM currency held by the investors can at any time be traded in just the same manner as any other currency - for instance, if and when investors want to withdraw wealth from the trading bot wallet, they sell their XMM funds for whichever other currency they might wish at that moment. Then, the negative XMM balance in the trading bot's wallet would go down in absolute value. XMM trading works just as well the other way around: an investor wishing to invest their funds buys XMM currency issued by the trading bot; thereby, the absolute value of the XMM balance in the trading bot's wallet would increase. Of course, and this is an important thing to understand, nobody is guaranteed to get the initial investment, denoted in whatever currency their XMMs were bought for, back. Therefore, due diligence includes full understanding of this paragraph.

One can follow the XMM trading bot operation using the Statistics page available at https://codedot.github.io/xmm/?rippleADDRESS=YYYY-MM-DD. In the latter URL, YYYY-MM-DD needs to be replaced with the date against which annual interest rate and total growth are desired to be calculated.

TODO:

  • only positive balances traded, negative balances are assumed to be number of shares;
  • list aliases for Ripple addresses --wallets and aliases for currencies in --assets;
  • --delta and --hedge options.

Clone this wiki locally