117. [Hard] Terrarbitage, Part 1

    This dashboard looks at arbitrage opportunities in respect to bLUNA and LUNA price fluctuations over time. bLUNA, or bonded LUNA, is LUNA that has been bonded utilizing the Anchor protocol, and in theory should be worth almost the same as LUNA, despite a small discount accounting for the fact that it is bonded for 21 days. In reality, this is not the case, as increases in LUNA's price can lead to a larger price difference than intended. This opens the door for arbitrage opportunities, as users can swap their LUNA for the cheaper bonded LUNA, and then swap back once the exchange rate stabilizes. The first graph in this dashboard looks at the daily LUNA and bLUNA prices in USD. While we can see that there's a miniscule difference, it's hard to see much from tis graph as the prices are so similar. Since there's usually only very small price differences between LUNA and bLUNA, the next graph looks the daily price difference between the two. While most days have little difference, some days stand out, such as September 23rd of 2021, where the price of bLUNA was about $1.40 higher than LUNA. In this case, only someone already holding bLUNA could take advantage of the opportunity, as swapping from bLUNA to LUNA would yield a higher amount of LUNA than normal. The next graph looks at the percent difference in LUNA and bLUNa price. The price difference on September 23rd was a staggering 7%, with the next highest differences only around 4%. Interestingly, looking at both of these graphs, we can see that the largest arbitrage opportunities involve a higher bLUNA price compared to LUNA. This means that users can earn the most by swapping from bLUNA to LUNA, so when swapping from LUNA to bLUNA, it may make sense to hold the bLUNA until a high arbitrage opportunity occurs. The average daily percent difference in bLUNA and LUNA price is .2426%. The possible APR scenarios from arbitrage depend on the amount of compounding over the year, or how often advantageous trades from bLUNA to LUNA are made. Using the average price difference, we can assume each trade would net an increase of about .2426% of the LUNA traded. If a user made an advantageous trade every month, the APR would be ((1 + .002426)^12 - 1), or about 3%. Now if we change that to every week, the APR would be ((1 + .002426)^52 - 1), 13%, or every day, (1 + .002426)^365 - 1, 142%. This is assuming the trader started with a certain amount of LUNA, let's say 50, and then used that amount plus the gain from each previous trade on each subsequent trade. Looking at these numbers, we can see that if arbitrage opportunities in the bLUNA and LUNA price difference are taken often, a large amount of LUNA can be made.