edicted Blog Banner

edicted

Polycub: XPC Loans

loancollateralpropertyhouse.jpg

Breaking news:

https://leofinance.io/@leofinance/introducing-the-polycub-roadmap-or-xpolycub-bonding-and-collateralized-lending

Minutes ago this post came to light that details the expansion of polycub contracts extending into the over-collateralized loan department. This is something I've long talked about as an absolute necessity going forward, but the risk of printing coins out of thin air and relying on the data from price oracles (which can be manipulated/hacked) is quite significant.

However, it looks like the way xpolycub loans will work sidesteps this threat entirely by piggybacking on top of the security of another stable coin: USDC. Now, say what you want about stable-coins pegged to dollars in a bank, but polycub already uses USDC to provide half of all liquidity in existence, so this argument somewhat becomes moot. If USDC fails, we have bigger problems than just what happens to polycub, that's for damn sure.

One of the big differences between CUB and POLYCUB is that POLYCUB has a vault that stores assets that benefit the entire community. I must assume this vault (POL: protocol owned liquidity) will be ported over to CUB sooner or later, but until then it is unique to polycub. Probably a lot of bugs to fix and in-the-field testing to be done before that time.

In any case, instead of creating our own stable coin, we're going to utilize USDC in the Vault, which is an interesting way of going about it. The Vault will contain USDC, and it will allow xpolycub users to lock their xpolycub in the Vault and exchange it for USDC, with the intent of paying back that USDC later.

energy battery.jpg

This actually solves a lot of problems.

This isn't really a solution I had considered, so I find it quite intriguing. In theory, building our own stable coin creates a lot more value to the network as a whole, if you can assume that it won't be hacked... which you... can't. This is the next best thing. By piggybacking off of USDC we don't need a price feed or an oracle to tell us the value of USDC or polycub itself.

All of polycub's liquidity exists on polygon itself, so we already know the price and value of the token. The process of liquidating xpolycub to pay off the bad debt will probably have to be based on some kind of moving average (much like the way HBD works on a 3.5 day average) to avoid whales being able to liquidate each-other's positions instantly.

This protocol can also likely assume that the value of USDC is... you guessed it... $1. Not a lot of risk is making that assumption. Again, if the peg breaks we have bigger problems than bad debt sitting on polycub. Also... now that I think about it... the price would have to break... to the upside.

So in order for there to be a problem USDC would have to be worth more than $1, which is basically impossible because they can just print out more and dump the market and trade the proceeds back into USD. In the case of USDC breaking under $1 that actually means less value is owed back to the vault and less bad debt exists, giving everyone an opportunity to pay off their debt at a discount. Again, looking at possible failings of USDC... it seems like this solution totally sidesteps the oracle attack vector that other algorithmic stable coins suffer from.

Game-theory on xpc loans.

So imagine you lock in like $2000 worth of xpolycub into the vault. Maybe you pull out 1000 USDC. Now you owe back 1000 USDC and you can't get the xpolycub back until you pay it. If the xpolycub value drops 50% the protocol liquidates your position and dumps it for USDC to pay back the bad debt and get the money back into the vault... pretty cool.

Of course this assumes that the vault would wait until the last second to liquidate your assets, which clearly won't be the case. Like I said, a moving average will likely need to be used to avoid liquidity pool hacking, and also polycub has pretty thin liquidity, so liquidating too many loans at once could create a devastating long-squeeze that crippled the price of polycub by chain-liquidating bad debt.

Bad debt.

The interesting thing about bad debt in this context is... it can be allowed to exist if we allow it. If the Vault couldn't get back as much USDC as it loaned out... well, tough shit... the vault will then take a loss and the network itself loses some money, but overall this might not actually be that big of a deal depending on the numbers we are talking about.

It's also possible that the vault would double down and cancel liquidations in the event of a black-swan, instead opting to gamble on the price of the xpolycub tokens going up later. In some situations this would be the best option... like a brutal flash crash of 50%+ that's almost guaranteed to bounce back up in the short term.

mitigationdominoes.jpeg

To mitigate all these risks the vault would employ a conservative strategy of high interest rates, short moving averages, and high over-collateralization requirements.

High interest rates

The goal of the vault is to generate as much income as possible. That much should be obvious.

What's not so obvious is how much interest to charge on loans in order to capitalize on this feature. Charging too much will make it not worth it and no one will use the service. Charging too little may encourage so many loans to be taken out that the vault runs out of money to give. This would also greatly increase the chance of bad debt being created and the vault not being able to liquidate collateral fast enough to get paid back in a black-swan situation. Surely there is some kind of happy medium here that will be found, certainly somewhere between 1% and 10% given supply and demand.

Short moving average.

Without a moving average tracking the price for liquidations, even a troll like me could dump the price and liquidate the positions of every loan that was within the liquidation range. This could then create a cascade of long-squeezes that pushed the price down and let me buy at a much lower price after selling the top.

Clearly, some type of moving average will have to be used. The longer the moving average the easier it is to create bad debt, but the harder it is for whales to manipulate the system and capitalize on instantaneous liquidations.

So imagine the price crashes by 10%, and then by 10% again, and then by 10%. With a long moving average, none of the bad debt has been recovered, because the average hasn't been able to factor in the price dropping so quickly. If the price continues to crash quickly, by the time collateral is liquidated the vault will not be able to get back the USDC that it loaned out.

HBD uses a 3.5 day moving average for reasons similar to this (conversion manipulations). I think for something like this 3.5 days is probably way too long, and we could even think about doing a one day average on the safe side and a one hour average on the extremely short side, just to make sure that bots wouldn't be able to make moves instantly within seconds before anyone has a chance to act.

High collateral requirements.

As I have already described in my game-theory of MAKERDAO & Magitek, there are two kinds of collateral requirements. The first variable is how much it costs to mint/extract a given amount of stable coins. On MakerDAO, this over-collateralization is 150%. The other variable is what is the cutoff before collateral gets liquidated to pay off bad debt. On MAKERDAO, this is the same number: 150%.

Making the extraction collateral and the liquidation collateral the same number is... beyond stupid. There should always be a buffer in between these two numbers in order to avoid catastrophic failure and a terrible user experience. Conservatively I would start the process at 300% and start forcing liquidations at somewhere between 125% and 150%. The higher these numbers are, the more stable and safe the system becomes. If the overcollateralization requirement is something absurd like 1000%, the chance of that position actually ever getting liquidated is extremely tiny.

And while it wouldn't be much fun to require $10 collateral to take out a loan for $1, it's still better than the system we have now... which is... no option whatsoever. Always better to start small and ramp up the system later when it becomes more stable, but that's just me.

Interest rates

I've come to the conclusion multiple times now that charging interest rates on over-collateralized loans is ridiculous and unfair. Why would users have to pay interest on their own money? I've even concluded that negative interest rates are actually the way to go, to incentivize users to actually use the system and greatly increase velocity of money.

However, none of that really applies to a vault that's storing someone else's stable coins. Negative interest rates only work when the network itself controls all aspects of the situation. MakerDAO can't do it because MakerDAO is foolishly deflationary, and they can't mint ETH on demand. Polycub won't be able to do it because Polycub does not control USDC. Best rate possible would be 0%, and that again would be a loss leader in order to incentivize getting money in from the outside.

If it was my decision I probably would set interest rates here to 0% because literally no one else is. What's a better interest rate... than 0%? We could market the shit out of that and get everyone looking at polycub. Unfortunately, it's not like the vault has infinite USDC in it. We can't print these things on demand, and the vault would run out and lending would be cut off for everyone.

Still, it's possible to base the interest rate off of how much USDC is in the vault. If the vault had 100%-90% USDC, that could be 0%, while the next tier 91-80% would be 1%, then 2%...

money available interest rate
100-90% 0%
89-80% 1%
79-70% 2%
69-60% 3%
59-50% 4%
49-40% 5%
39-30% 6%
29-20% 7%
19-10% 8%
9-0% 9%
With a spread like this, we can still market the thing as "up to 0% interest rates" and not be lying, even if the actual interest rate never ends up being 0%.

Also important to note here is that if you take out the loan and get a 0% rate... don't expect it to last for long. The rates almost certainly won't be fixed (just like MAKERDAO) and when they go up/down everyone has to pay the new dynamic rate. Don't like it? Tough shit: pay back your loan then and get out.

Luckily DEFI users are such degenerates that they wouldn't mind paying a 9% rate, even on an overcollateralized loan that is their own money :D. This would be a very good way for the vault to bolster it's own reserves assuming that no bad debt gets created and the vault doesn't lose money during a black-swan.

Going long.

This system would allow us to "go long" so to speak. One could borrow USDC, but then immediately dump it for more xpolycub (and perhaps even create nested loans and pull out more USDC to buy more xpc). This is a very risky strategy, just like doing a x10 long on a centralized exchange is risky. Having a collateralized position liquidated is not fun at all, but having the option can be a huge benefit, as it can also be used to give ourselves tax-free loans without actually having to sell our crypto.

Going short

I assume if this protocol ends up working well, the exact opposite would be possible. Instead of locking xpolycub in a collateralized debt position smart-contract, you'd instead lock up USDC into the vault and pull out some other asset from it. If we look at the kingdoms, three of them are paired to ETH, so it's safe to assume that ETH is going to be one of the vault's primary assets.

As a hedge

In this example, we lock USDC and borrow ETH, which let's us short ETH by dumping it and borrow more USDC. This would be an excellent way to hedge the market assuming it had just spiked x2 or x3. Take a chunk of USDC and leverage it to more USDC. If the market goes up, great, you're still making money from all your other crypto assets. If the market goes down, your hedge worked and you lost a lot less money than you would have otherwise.

Using shorts as a hedge in this way is an amazing tool to lower volatility after the price of our assets has pumped. Sure, you'll make less money if the price goes up, but you'll still be making money. If the price goes down, you'll also lose less money. This is simply how hedges and taking gains works.

Conclusion

This is a pretty exciting announcement from the LEOfinance team. It might take a while before it is operational, but once it is, it looks quite promising with a lot of the crippling attack vectors created from algorithmic stable coins taken out of the mix.

I'm not advising that anyone should buy polycub right now due to this information, as the price is crazy volatile and who knows where it will end up, but this truly is a testament to the LEOfinance team in accordance with their tenacity and ability to grind out value in a space where other defi projects are dropping like flies. A protocol like this can add a lot of value to the network as a whole (that includes both CUB and LEO in said network). In addition, the mitigated attack vectors and streamlined processes of not reinventing the wheel are impressive.

This post was actually supposed to be about the pendulum and the bonding system, but obviously I got very sidetracked. I thought I'd be able to talk about both things, but no such luck. My next post will be about bonding, which is a technology that will be rolled out sooner than these loans. Stay frosty.

Posted Using LeoFinance Beta


Return from Polycub: XPC Loans to edicted's Web3 Blog

Polycub: XPC Loans was published on and last updated on 21 Mar 2022.