Hey guys I need to create a spreadsheet that dynamically calculates the new balance between two tokens and works out the adjustment needed to bring the ratio back to the required ratio of 1 to 1.5.
Two tokens ABC and XYZ, The XYZ is paid as interest each week for holding both tokens and based on retaining close to the most valuable ratio of 1 to 1.5
The individual price of each token has to be considered in swapping/exchanging the XYZ token into the ABC token to rebalance back to the required 1 to 1.5 ratio.
The XYZ token will increase via an “interest payment” each week requiring say two weekly adjustments to keep the ratio as close to the 1 to 1.5 as possible.
So in my attached example sheet I need to take the 500 XYZ that is in excess of the 1 to 1.5 ratio and swap/exchange SOME OF THEM to ABC that will then retain the overall ratio of 1 ABC to 1.5 XYZ .
That is my dilemma?
Ultimately in the second phase of creating this I would like to be able to draw the token prices from a website but first I have to find out how to structure the calculation then deal with the hyperlink.
In the interim I will manually input the prices according to what I see on the website that provides the price feeds.
ABC to XYZ ratio.ods (10.5 KB)