Acala and Karura: The Overlords of DeFi

Yung Beef Big Bags
15 min readJun 28, 2021

--

The Dotsama ecosystem is like an onion — it has layers

Acala and Karura are the DeFi hubs of Polkadot and Kusama, respectively. They’ve taken the best parts of DeFi and combined them into a simple package that is loaded with utility — loans, a Decentralized Exchange, liquid staking, oracles, governance, and a Decentralized Sovereign Wealth Fund. Let us explore…

Loans

I used to work in a mortgage bank office. Getting a loan to buy a house takes forever. Even getting a personal loan for anything at a bank branch takes way too long. On Acala and Karura, you can borrow as much as you want, it takes less than a minute to take out a loan, and has near zero fees.

The future is here.

The key difference? Overcollateralization.

Karura

Karura has just secured Kusama’s first parachain slot (with Acala expected to secure Polkadot’s first parachain slot soon), and while it is not officially live yet, it has been on the testnet for a while. The numbers are sure to change based on governance and/or supply and demand, but we have some idea of how it will work.

If you want to borrow $10,000 of aUSD (Acala’s stablecoin), you can put up multiple assets for collateral, such as DOT, LDOT (Liquid DOT— a token minted when you stake your DOT through Acala), XBTC (a cross-chain version of BTC), or other tokens. On the testnet, the minimum collateralization rate is 140%, and the liquidation ratio is 120%. This has a built in 20% buffer to attempt to reduce the volatility that results from loans being liquidated. If you put up DOT for collateral, you’d need $14,000 of DOT to borrow $10,000 of aUSD. If DOT is $35 each at the time of taking out the loan, that’s 400 DOT you are required to deposit. If DOT drops to $27.5 each, your collateral is now only worth $11,000 (110% collateralization), which is below the liquidation ratio of 120% for your $10,000 aUSD loan, and some or all of your collateral will be liquidated to bring the ratio back over 120%. In the process you will lose $2,000 to the liquidation fee as a penalty for letting your loan be in risky territory.

Currently on the testnet the liquidation fee is 20%, which I cannot imagine will be true on the live net. If it is, you’ll lose 20% of your loan value when liquidated. That number will either be determined through on-parachain governance or it will be based off of supply and demand for loans. It is likely the minimum collateral ratio will be lower than 140% for something like BTC, but many tokens will have much higher collateralization ratios due to their volatility.

A low liquidation penalty means more people will take risky positions and get liquidated. Lots of liquidation can be bad news for aUSD/kUSD as they are pegged to the USD algorithmically. Riskier assets will likely have higher collateralization ratios and liquidation penalties.

Here is an excellent video showing how to take out a loan on Acala/Karura.

I know what you’re thinking. Overcollateralized loans? Why would anyone get one of those? Here are two reasons you might want to take out a loan on Acala or Karura even though you have to overcollateralize it.

#1: Sticking It To The Man

Perhaps the most advantageous reason is that depositing crypto as collateral and taking out a crypto loan is not a taxable event. This lets you leverage your crypto to do things such as invest in another token, without selling and incurring tax costs. In addition, if your collateral appreciates in value, you can still capture those gains. As with all leverage, it amplifies the movements of the market. If your collateral depreciates too far in value, it will be liquidated and your bags will be decimated.

#2: The Infinite Money Glitch

Here’s a fun thing you can do with loans on Acala. Stake your DOT through Acala and receive LDOT, plus staking rewards. Use your LDOT as collateral to borrow aUSD through Acala. Sell the aUSD to buy more DOT and repeat the process. It’s a cycle with constantly increasing liquidation risk due to massive leverage (GUH), but if you pulled it off you could make some big gains, especially if DOT appreciates in value. If you ever wanted to get “Jacked to the tits!” now is your time. This will also work on Karura, using KSM, LKSM, and kUSD.

You could also use XBTC or another token as collateral, borrow aUSD/kUSD, and buy more of the same token with it. Personally, I prefer to get staking rewards on my infinite money, and will likely stick with tokens that feature staking.

This strategy will work much better if you borrow a token that has a low minimum collateral. The amount you can leverage goes down the higher the collateral requirements are.

While those two reasons are good, the uses of overcollateralized loans only go so far. It’s unlikely many people will use overcollateralized loans to buy houses, for instance.

This is where another future parachain comes in. KILT will essentially allow us to develop on-chain credit scores, and I’m sure people will be able to take out undercollateralized loans in the future — on Acala and Karura. I will be writing an article about KILT in the future, as it will be monumental to the future of the world.

The DEX

If you are reading this, you have probably heard of Uniswap, Ethereum’s biggest Decentralized Exchange — a true breakthrough in Decentralized Finance technology. It allows swapping between various assets without a centralized authority, as it all runs on smart contracts. Market participants will deposit their tokens in pairs to form liquidity pools (LPs) for token swap pairs, based on the current swap rate at that time.

Liquidity Pools

For example, if KSM is trading at $400 on the Karura DEX, you will need a 1:400 ratio of KSM:kUSD to deposit to the KSM/kUSD liquidity pool.

Let’s say you have 100 KSM and $40,000 of kUSD, and deposit it all to the pool. I come along with 400 kUSD and want to buy some KSM. I interact with one of the DEX’s smart contracts and swap my 400 kUSD for slightly less than 1 KSM due to a small transaction fee of .1%. I now have .999 KSM, and the liquidity pool now holds 99 KSM and $40,400 kUSD. This is now a ratio of 1:408.08 repeating (aka, the price of KSM has increased to $408.08). The small transaction fee of ~.001 KSM is paid to you as a reward for providing liquidity.

Note that, since the pool was originally made up of 100% tokens that you deposited, you own 100% of the pool, and if you withdrew your KSM and kUSD at this point, you would receive 99 KSM and 40,400 kUSD, as well as the extra .001 KSM from the transaction fee that I paid. If you run the calculations on the value of this, you’ll notice that you actually lost a little bit of money. This is referred to as impermanent loss or price divergence loss, and is explained here. If I turned around and swapped my .999 KSM right back to kUSD and paid a .1% fee again, the KSM:kUSD ratio in the pool would be much closer to what you originally deposited, and the fees you earned would likely make up for the very small price divergence loss in regards to what you could withdraw from the liquidity pool.

Next, Donnie comes along, and he wants to deposit his KSM and kUSD tokens to the liquidity pool so that he can earn some liquidity provider rewards. Like you, he has 100 KSM and 40,000 kUSD. Unlike you, he cannot deposit all of it into the LP, because you are only able to deposit into the pool based on the current price or ratio of tokens in the pool. Due to me buying 1 KSM for 400 kUSD, the ratio has changed from 1:400 to ~1:408.08. The most that Donnie can deposit to the LP is 40,000 kUSD and ~98.02 KSM — a ratio of 1:408.08 (if he wanted to put all of his funds into the LP, he could take his leftover 1.98 KSM and swap some of it for kUSD at a 408.08 ratio, so that his total KSM:kUSD holdings had a 1:408.08 ratio).

Donnie deposits 40,000 kUSD and 98.02 KSM, and the pool now contains 80,400 kUSD and 197.02 KSM. You and Donnie both own 50% of the LP, and can withdraw up to half of the KSM and kUSD at any time. As people continue to swap back and forth between KSM and kUSD, the ratio of KSM:kUSD will continue to fluctuate. Every swap incurs a .1% transaction fee that is split among liquidity providers based on their percentage of ownership of the LP, which in this case is 50/50 (depositing token pairs to a LP results in the DEX’s smart contract minting LP Tokens for that pair, and you can then look up how many of those LP tokens are in existence and use that number to figure out what % of the LP you own). So, you and Donnie both earn a .05% fee every time anyone swaps between KSM and kUSD, as you each hold 50% of the LP tokens for that pool.

On high volume trading pairs, the fees can be quite lucrative, which incentivizes people to deposit their tokens into the liquidity pool for that pair. Having lots of liquidity is always a good thing in any market, as it allows the price to remain much more stable.

In reality, in the above example, I would have walked away with slightly less than .999 KSM, due to price slippage. This is because, despite swapping 400 kUSD for KSM in one transaction, the DEX does swapping so that each bit of kUSD is traded for KSM one at a time, which affects the price. KSM gets more expensive relative to kUSD every time a kUSD token is swapped for a part of a KSM. Due to the small size of my swap versus the massive amount of liquidity in the pool, the slippage most likely would not be that bad, and I’d still end up with around .99 KSM. The more liquidity in the pool, the less price slippage there is.

That’s the gist of a Decentralized Exchange. Liquidity Providers deposit their various tokens to form Liquidity Pools for various token trading pairs, and earn transaction fees in return. It allows for anyone to swap between assets in a permissionless, trustless, and decentralized manner. The Automated Market Maker, as it is known, is quite genius.

Acala and Karura

Acala and Karura are first and foremost Decentralized Exchanges. They will feature liquidity pools for trading pairs and offer rewards to liquidity providers.

An additional (non-exclusive — some other DEXs have this) feature of Acala and Karura is being able to stake your LP tokens. So not only do you earn rewards from the transaction fees (currently set to .1% on the testnet) when people swap, you will also earn aUSD/kUSD as a stability fee, and ACA or KAR tokens from a distribution program (this will likely be temporary as a way to incentivize people to provide liquidity at the outset).

Some other DEXs offer extra distribution rewards for staking your LP tokens (but no stability fee rewards), but they require one transaction to deposit to the liquidity pool and receive LP tokens, and a second transaction to stake the LP tokens. Acala and Karura let you do it with two transactions, or you can deposit liquidity to the pool and stake your LP tokens all in one transaction.

Why would you ever do it in two transactions? Well, LP tokens work just like any other token, and are transferrable. You can sell your LP tokens if you wish. So, you might just want to deposit to the pool and receive LP tokens. As with all staking, if they are staked, they are not transferrable.

I do not expect many people to leave their LP tokens unstaked, but it is nice to have the option, and it’s fantastic that we can deposit liquidity to a pool and stake LP tokens all in one transaction.

One last thing: Uniswap, currently the world’s biggest DEX, has a transaction fee of .3%. The Dotsama ecosystem will soon have bridges to it from Ethereum and other chains, allowing anyone to use Acala or Karura and save .2%. It doesn’t sound like much, until you are making massive swaps. I predict swap traffic will migrate to Acala and Karura, and Uniswap will have to lower its fees to compete. Good ol’ free market crypto capitalism. You love to see it, unless you provide liquidity on Uniswap!

Liquid Staking

Talk about immense utility. Normally, when you stake your tokens, you can’t do anything with them. They earn you staking rewards and increase your purchasing power, which is great, but beyond that they are useless to you. No longer!

Let me tell you just how big this is.

You own some KSM and want to stake it to stay ahead of Kusama’s inflation. But, you also want to buy some kUSD, as well as be a liquidity provider to earn rewards. Liquid staking lets you do all of that. You can stake your KSM through Karura, and Karura will mint you LKSM tokens. You can then either swap your KSM or LSKM for kUSD, and then deposit liquidity to the kUSD:LKSM liquidity pool to earn rewards (you are now earning from 3–4 sources at once: staking, swap transaction fees, stability fees, and possibly the initial ACA/KAR distribution program).

In order to receive the interest payments from staking, you will have to deposit LKSM again, which returns your KSM plus interest. But in the meantime, the ecosystem is your oyster!

When you deposit your LKSM to redeem your KSM, you will have three options:

  1. Receive KSM immediately and pay a small fee
  2. Receive KSM on a future day within the next 7 days and pay a smaller fee
  3. Receive KSM 7 days from now and pay no fee

Polkadot and Kusama have unbonding periods when you unstake your tokens. On Polkadot, the unbonding period is 28 days, while it’s just 7 days on Kusama. Depositing LDOT on Acala will let you pay a fee to get your DOT immediately, or you can wait 28 days to avoid the fee.

Remember in the last section how I mentioned liquidity is good? This makes it even better. I imagine all sorts of weird stuff will be going on with this, but we’ll just have to wait and see what happens. Speaking of seeing…

Oracles

Oracles are one of the most crucial puzzle pieces in regards to real use cases for blockchain technology. I believe blockchain oracles were pioneered by Chainlink. The purpose of oracles is to transfer data from the “real world” onto a blockchain. The most common example is weather data from a weather station.

The way oracles work is quite simple. Any entity can be an oracle, and they can input data on chain for whatever the oracle is needed for, whether it’s weather data, the price of $TSLA, or who won an election.

Obviously, anyone can do this, even bad actors. So what actually happens is you have multiple oracles, and they ought to all agree on the correct data, just like how Proof of Stake works. The more people you have certifying one result, the higher the likelihood of it being correct, and anyone that disagrees is clearly a bad actor.

Data provided by oracles is used by smart contracts. For example, a platform that allows users to bet on horse racing with crypto. The betting platform would be one or multiple smart contracts that handle it all, and the contract(s) will receive data on who won the race from oracles.

Decentralized exchanges benefit from receiving oracle data about the prices of tokens on other exchanges. DEXs by nature will have varying prices for the same asset due to the way they work. The discrepancies are usually handled by arbitrageurs who make a small profit by buying low on one DEX and selling high at another DEX.

Acala and Karura have integrated oracle price data for tokens trading on their DEXs. This let’s you compare the prices of those tokens at other DEXs vs. Acala/Karura. The price data is also used when taking out loans, to determine the value of your collateral vs. the aUSD of the loan, and the loan protocol constantly uses oracle data to manage the risk profile of the system.

The oracles will be compensated with tokens as a reward for providing their service. If an oracle is deemed to be a bad actor they will be cut off from this revenue stream, providing a financial incentive for all oracles to behave.

Governance

Want to change anything about the platform? Think the transaction fees are too high? Not high enough? Want to get a new token listed? Think the liquidation ratio for loans backed by Bitcoin is too high? You can easily submit proposals for all of these and more, and all you have to do is hold some ACA or KAR tokens. Like most on-chain governances, anyone holding any amount of the governance token can participate in the governance of the protocol.

Actual governance will be run by an on-chain council of elected members, and anyone that holds ACA or KAR tokens is able to vote. Imagine if every holder of US Dollars got to vote on who worked at the FED? Or if we could just vote to shut it down? ACA/KAR tokens also will allow us to participate in managing Acala and Karura’s Sovereign Wealth Funds, which I will explain later on.

Acala and Karura will have more than one council. There is a general council and there will be specialized councils. For example, there will be a separate council to oversee the liquid staking protocol — all LDOT or LKSM holders will be able to participate in this.

Important note: most DEX’s have governance tokens, like UNI for Uniswap, but they are useless beyond governance. ACA and KAR let you take out loans, and is used to pay transaction fees and to make the interest payments on loans (though Acala can automatically convert aUSD into ACA, so you can make interest payments however you wish).

The Decentralized Sovereign Wealth Fund

This is truly a first. Other DAOs technically have what could be called Decentralized Sovereign Wealth Funds (DSWFs), but never before (to my knowledge) has an entire blockchain had a DSWF.

Most SWFs just focus on growing their wealth, which makes sense. But the new opportunity with crypto DSWFs is to plan for utility in your portfolio, so the DSWF can access other chains and services.

Acala plans to bootstrap the DSWF with some ACA tokens at launch, as well as continue to fund it via protocol revenue (loan fees and liquid staking fees). It will hold ACA, DOT, and other tokens in the Dotsama Ecosystem (possibly including any of the tokens that will be bridged from outside the ecosystem).

The #1 goal of the DSWF is to enable self-sustainability of Acala, by being able to fund its own parachain auction bid. It is likely the DSWF’s biggest holding will be DOT tokens until it has enough to safely secure a parachain slot for the network. Beyond that, the DSWF will be used to safeguard the future evolution of the protocol.

As long as the next parachain auction is more days away than the length of the unbonding period of staking (28 days on Polkadot, 7 on Kusama), all DOTs in the Fund will be locked up in staking to earn more DOT. For the second round of parachain auctions, if the DSWF does not have enough DOT to self-fund the auction, it will contribute what it has, and receive ACA tokens as a reward, which will be sold for DOT that will again be staked.

Once self-funding has been achieved, the Fund will begin to diversify, and hold other strategic tokens. I imagine Bifrost and Moonbeam will be in there. The sky is the limit, as there will be loads of bridges to other chains by then.

The excess funds can also be used to pay developers for work, or even just pay every ACA holder a Christmas bonus — we can vote on it!

Karura’s DSWF will work to accumulate KSM to fund its own parachain lease as well.

Tokenomics

At genesis, there will be 100M ACA and KAR created. Per the whitepaper, token distribution is as follows:

5% reserved for ecosystem development

~20% for the development team

~12% reserved for the Decentralized Sovereign Wealth Fund

~29% for investors

~34% for parachain crowdloan contribution rewards, liquidity providers, oracles, and parachain collators.

Most of those tokens will vest over 12 to 24 months, so most will not be available at genesis. 30% of the crowdloan rewards will be available. Right around 11M KAR will be paid out from the Karura crowdloan, with only 3.3M available right away. The initial supply will seem pretty scarce but there will be some massive “inflation” in the first year or two (I suspect circulating supply will remain small, as investors and developers will hold long term). However, after that, there will be no inflation at all due to a fixed supply, and the tokens will become quasi-deflationary as demand increases while supply remains fixed.

None Can Stand Before Them

It is clear that Karura will imminently be the single greatest DeFi dApp to exist in the space, with Acala joining it shortly. The duo will be the undisputed powerhouse of DeFi for the Dotsama ecosystem.

Near instant loans, a low fee DEX, liquid staking, built-in oracle pricing, governance features, and a decentralized sovereign wealth fund. It’s simply incredible what the team has built. Karura and Acala are like MakerDAO + Uniswap + Ethereum (it runs the Ethereum Virtual Machine) + a financially responsible nation state.

The on-chain wallets for Acala and Karura are multi-asset wallets, and NFTs are supported as well. The platforms natively support cross-chain bridging. Once the bridge building gets going… well, you’ll see.

Expect Chaos.

Polkadot: 14x6ah3J21QonWASv6QKwqd8SWrS7ddqmMzyRCmGQWMaPzae

Kusama: GXR6g86nbAG6cyNjAANhe9yjV92Dztt9F7Eea3sLDYYxbRq

Karura: sFNedNX6LQd2yQAAMSWy3kXcPznZ6g1GtS2Lfug7M7UeStv

--

--