edicted Blog Banner

edicted

Magitek Schedules: Infinite Loop

close InfinityEternityEndlessLoop85696133.jpg

Old habits die hard.

It's easy to get stuck in loops during life. Some of those loops might be simple and healthy day to day activities & upkeep. On the flip side, drug/alcohol abuse would be an extremely damaging loop to get stuck inside.

We all have goals, big and small, short term and long term. The only way to get a big project completed is to grind on day after day until it's done. This is a loop in itself.

image.png

Infinite loop

In the context of programming, an infinite loop is pretty much a catastrophic bug that often will just crash the program or lock up the entire app until it gets killed. This MySQL code I wrote produced an infinite loop while I was testing it. Can you see why?

What if temp == 0 ?

If the temporary variable I'm manipulating here were to be zero it wouldn't matter how many times I multiplied it by 10, the result would always be zero and the code would simply run forever because temp would never be greater than or equal to 100. This code crashed my development environment (MySQL Workbench) and I had to reboot it.

It was actually kind of refreshing to have a bug like this in my code. It's been a long long time since I've had to deal with an infinite loop situation (corrected easily and immediately). It's the bugs that take forever to diagnose that make you want to stab your eyes out with an ice pick. And then when you figure it out, 90% of the time it was something really really dumb.

viruscomputerbugcartoonillustration.jpg

So what does this code do?

Surprisingly I was able to get my voting system up and running quickly with very few bugs. This snippet of code calculates the deviation of the variable that will be modified up or down based on governance votes. The deviation tracks multiples of 10 away from the schedule range.

Schedule

A schedule in the context of my dapp is a grouping of numbers with a range from 100 to 1000. All schedules must start at 100 and end at 1000, making jumps along the way to make it the full x10. The deviation mechanic allows numbers outside of the schedule range to still be valid. 10000 would have a deviation of +1 while 0.1 would have a deviation of -3 (0.1 x 10^3 = 100). This allows number to be modified with a near infinite range, moving exponentially fast should the community need to manipulate variables quickly due to pump/dumps or other emergencies.

I detailed this concept in my sliding-scale post.

100 125 150 175 200 225 250 300 350 400 450 500 600 700 800 900 1000

This is the default schedule I came up with. I also made an auxiliary one that makes some of the jumps less severe. For some variables it might not be appropriate to make a 25% jump from 100 to 125 (or 0.0100 to 0.0125 or 100000 to 125000).

It's a super clunky and weird system but I like it. Kind of reminds me of how clunky the Bitcoin halving event is. It doesn't have to be a good solution: just good enough. And the advantage of taking such big steps is that a variable can be modified x10 in either direction with 16 votes that pass (16 days minimum).

Of course there are some variables we will be able to vote on where exponential changes make zero sense, so I've also added a linear system on top of this. Most variables will be on the default schedule, but those listed as tick will move linearly. For example, if a variable was tick: 0.01 it would move +/- 0.01 up/down depending on which ballot passed.

boredkid.jpg

Who cares?

It's sort of hard to quantify the importance of these things to anyone but myself at this point. All I can say is that this voting system is pretty awesome and will allow dozens of variables to be modified in order to achieve stability in one of the most volatile arenas ever (crypto).

No one in the world is even attempting to do what I am doing here. If crypto is ever going to be considered a unit of account it needs to be able to LOWER demand and price of the underlying asset. This is obviously something that no one talks about, because everyone in this space is a greedy goblin that wants to get rich quick (including me).

A mooning token price isn't good for the network. It forces new users to buy at an inflated price, then they get wrecked and ragequit. That's not useful, as it completely hamstrings network growth over time. This isn't about the old-guard being able to buy a Lambo. It's about forging an entirely new economy on flat architecture where everyone stands on even ground.

More on why decreased inflation equates to a lower token price.

This voting system I've implemented is going to allow the network to decide how much inflation to allocate to the network on top of exactly where and how much to allocate to each individual farm.

t1.png

Did the price crash too far and investors are pissed? No problem, we can increase yield and give the economy an injection of liquid capital to get things back on track.

Did that not work? Uh oh, that means we are hyper-inflating and the network has valued the governance token too highly. To counteract this we can lower inflation back to normal (or lower) and expect price to crash further. Or if that isn't acceptable to investors we can cannibalize the LP pools by lowering the multiplier in the pools while raising the multiplier in the mana cache. This would highly incentivize users to pull their money out of the LP pools and shove all the liquidity into mana to farm the "den" (cache).

Magitek tokenomics

Did Ice break it's peg to the downside and we need to increase value? No problem. Increase the yield allocated to the Ice cache so that more users have an incentive to buy it and farm there. Even better, increase the yield in the mana/ice LP pool (Potions) to boost the value of ice on top of adding liquidity to the pair. Do the opposite if Ice is overvalued. Or, because all ice is collateralized by cache loans, lower the yield of the caches that aren't ice so that users will be incentivized to pay back their ice loans and increase the price.

magitekarmor2.png

THE FED

Just like a real economy, modifying one area of this system may throw another part of it off balance and then we'll have to rebalance that side using some other tactic. As @taskmaster4450 has been pointing out lately, the FED is in a lot of trouble right now and they are completely out of options when it comes to running an ideal economy. There are reasons why they should be tightening their grip on the economy, but they can't do that because the entire thing could just collapse.

Like I said before, crypto networks also need to build the tools for tightening the economy. Literally none of them are even trying to do so at this point. All I hear is moon moon moon. No one understands the importance of balance it seems.

The FED is extremely gimped when it comes to the tools at their disposal. The legacy economy is completely analog in this regard. All they can really do is print money or manipulate interest rates. Meanwhile crypto, being programmatic currency, can really do anything we program it to. It is the digital solution to the fiat/counterfeiting problem.

Unit of account

Before yield farms became popular I thought it would be impossible for crypto to become stable enough to actually price goods/services directly with such volatile assets. Now that yield farms exist, the path becomes clear. The goal of every DEFI project should be to maintain a stable price while offering the highest yields possible. In essence: the key to the future economy is ironically:

hyperinflation.

This is something that no one seems to understand yet. Because Bitcoin has been killing it for ten years, everyone seems to think that deflationary economics are a good idea. They are not. In fact, they are a terrible idea and we have hundreds of years of financial history to prove it.

So rather than HODLing Bitcoin and waiting for supply shocks to give us an x2 gain per year, we should instead be more focused on a stable defi token that doesn't gain any value whatsoever. But rather allows its users to realize the same x2+ gain per year because the token has a 100%+ hyperinflation rate.

It's somewhat comical to me that people haven't seemed to realize this yet: hyperinflation is awesome. Even as they farm these ridiculous 1000% yield farms they still don't seem to realize it, as the answer stares them right in the face. If you are farming a 1000% yield defi token... you automatically embrace hyperinflation, by definition. Funny how many users seem to be in complete denial about the powers of inflation. Bitcoin has done some serious deflationary brainwashing on the crypto crew.

Again, inflation doesn't matter. It's liquidity that matters. If there is more than enough liquidity for everyone in the pool in question, everyone is happy. It's when the well runs dry that users get thirsty and desperate.

In the world of fiat, we are at the mercy of central banks, which is why everyone thinks that inflation is bad. A corrupt group of individuals control it and they are constantly consolidating power and giving their cronies backdoor favors.

In a defi yield farm, everyone controls inflation equally. This is flat architecture. The inflation is totally decentralized. Therefore, it should be obvious that inflation doesn't really matter in that scenario except as a tool to balance the network. This is the future of crypto.

Posted Using LeoFinance Beta

Posted Using LeoFinance Beta


Return from Magitek Schedules: Infinite Loop to edicted's Web3 Blog

Magitek Schedules: Infinite Loop was published on and last updated on 18 Jun 2021.