Decentralized Finance: On Blockchain- and Smart Contract-Based Financial Markets
research.stlouisfed.org
research.stlouisfed.org
It's essentially a system of smart contracts and surrounding system which create a stablecoin pegged to the dollar (1DAI=1$) backed by crypto collateral.
One of the benefits of that is, you can access your crypto and use it without selling your position, which means you're not paying any capital gains taxes. There's a 4% stability fee with borrowing against your collateral (notice it's not an interest, it's a fee, which means many people who can't deal or don't want to pay/receive interest can actually use it). 4% is a drop in the bucket when you consider gains on your assets and a lack of capital gains tax.
p.s. I'm a long term BTC believer who always thought most of these projects were scam until I've actually started researching and trying to understand it.
Unfortunately these seems to be the case for most people. What have you this notion that it's all a scam? What it news pundits? Twitter/Reddit threads?
I think there's still lots of scams out there, but the big projects like Maker, uniswap, compound, etc, have made me change my mind.
In other words, if you're really savvy, you can earn even more than "much more than that" by borrowing USD at low interest rates (or Euro at negative interest rates), and then buying crypto and doing whatever you would have done after directly borrowing crypto at the much higher interest rates.
Who is choosing to forsake borrowing fiat currency at lower interest rates and then converting to crypto to do profitable things in favor of borrowing crypto directly at (much) higher interest rates, and why?
With defi you can get a loan for millions of dollars just immediately, maybe for a couple of seconds or milliseconds. Without filling any form asking why you need it. Without even creating any account anywhere except your own machine. It's new "in internet nobody knows you are a dog".
Then the next logical question is: what if I never get my money back? What if I lend it to a "dog" who then buys highly leveraged calls on GME, only to be unable to pay me back. Do I, the lender, just write it off as a loss?
As you suggest, if you can get a loan for millions of dollars just immediately without filling any form asking why you need it or without even creating any account anywhere, then what's stopping me from just taking a bunch of loans in excess of the collateral and just never paying them back? After all, as a borrower, I don't have to worry about any sort of credit rating or rate limiting.
As a lender, how do I know that the borrower on the other end isn't running such a scam?
For borrowers that ostensibly need liquidity, it would be impossible for them to put down collateral equivalent to the loan amount, else they wouldn't need liquidity. If you do have access to collateral, why take a loan in the first place? It's just extra steps (and interest) to end up with the same amount of money that you already have. Is the collateral some lower amount? If so, a bad actor could always put down a lower collateral amount than the original loan amount and then never pay back, resulting in the lender losing {original loan amount - collateral} worth of money.
How is this fraud prevented? Is the interest rate baked into the collateral? If I'm borrowing on this platform, do I need to put down more money than what I seek to borrow in collateral? Who would ever want to do that? How many lenders actually receive, on the net, 10-20% APY successfully?
At least with high yield junk bonds, there are some safeguards built into the system in the form of credit ratings, KYC, and institutional friction (which functions as a rate limiter). How does any of this work in the DeFi world?
Now you might ask, if I already all that money, why the hell am I borrowing it? Because your asset is going to appreciate in value (like a ton of appreciation) whereas your debt is only going to go up 4%. So you want to hold on to your asset, yet you need cash to spend. Also you want to avoid capital gains taxes which happen when you sell the asset.
It's overcollateralized, but that's okay because you actually want to continue holding the asset to realize appreciation.
To your point about avoiding capital gains tax, at some point you would have to repay the full loan, at which point you'd have to pay capital gains tax anyway. I guess, at best, you could always guarantee that you pay the lower long-term capital gains tax rate rather than the higher short-term capital gains tax rate. What's the repayment schedule?
Technically, with a very simplistic math, if your asset appreciates let's say 20%, your cost for borrowing is 4% and you don't spend more than the 20-4=16% in any given year, you technically have a credit line that's worth 16% of your collateral every year, you can live off of, never have to pay your debt. You just need to make sure to never fall below 150% collateral then you'd get liquidated. Of course, there's potential bugs in the smart contract, etc, so don't put more than you can afford to lose, yadi yada.
edit: I highly recommend trying it or watching a Youtube video which shows you the UI and the process, it'll all makes sense and click.
In this case, you don't need to provide any collateral, but the smart contract is designed so that you cannot avoid repayment. It's just an atomic operation, like with database, where all of the actions happen, including repayment, or nothing at all. You can do that with defi.
It's used for market arbitrage, or maybe to restructure other loans, etc.
In addition to the sister comment, where else can I find these type of returns in traditional finance? There's tons of places you can find 50%+ interest, even up to 300%.
Once a giant like uniswap moves, the rest will follow. Should see transactions fees become a lot lower towards the end of the year.
Shameless plug: I work on the design of one of the protocols mentioned in the paper - https://enzyme.finance / https://twitter.com/enzymefinance - it makes running on-chain funds and strategies very easy. You can create an investment track record, manage outside capital in a trustless and transparent way, create your own active or custom index funds in 2 mins.
We are looking for a frontend dev, and a smart contract dev - DM on Twitter if interested
Imagine you program a smart contract which is the frontend of a algorithmic trading system.
That future is coming.
You can take a look at their litepaper [1] if you want to know more.
Things like the DeFi Pulse Index[2][3] I believe are automatically re-balanced by evaluating the weights on the third week of the month and then applied the first business day of the following month. I'm not sure if a human is involved?
[0] https://www.tokensets.com/portfolio/dpi
This really drove home how inefficient and full of opportunities Ethereum is if you know where to look.
Still, I'd say investing in IT stock is accessible for the layman today. Part of this is just that it's early days and we're right now in the midst of a cambrian explosion.
The tricky bit is the exchanges, though in my experience, the worst was around 60$ fee for a swap at a busy time.
For instance, I'm interested in options trading, and there is a lot of competing protocols [1] each one with it's advantages and disadvantages. One of the most popular, Hegic [2], employs liquidity pools pricing options at a really expensive value due to a simplified pricing model (good for writers).
Shameless plug: I myself have been playing with smart contracts in my free time and deployed a tokenizable options trading decentralized exchange [3] (on kovan testnet nonetheless!) trying to address some os these points. Learned a lot implmementing it, and I find amazing that anyone can come up with their own DeFi solution.
[1] https://medium.com/coinmonks/an-update-of-a-comparison-of-de...
Specifically what I'm struggling to understand is that most (all?) real-world contracts require some information about the real world: The price of corn (or corn futures), whether the rental apartment was as described, whether the sneakers were authentic, etc. But whenever you need this real world information, at some point you need an oracle, or a consensus of oracles, and at that point I don't really see the point of using blockchain as you have to trust the oracles.
Would really appreciate if anybody could provide some info or links that explain how this problem is handled or solved. More importantly, would appreciate a single example of an actual smart contract that responds to events that happen in the real world.
You are focused on off-chain interactions for smart contracts. The infrastructure is not there yet I’m afraid, but there is steady progress. I believe Taiwan is working on IoT infastructure for publishing high resolution air quality data by having individuals set up sensing nodes that gather the data and publish it. Not sure if there is any DLT involvement, but no reason there couldn’t be.
On chain contracts have lots of use cases in the meantime.
Thanks for responding. Can you suggest a starting point for learning more about what these use cases are, because I'm still struggling to understand what those would be. When I try searching for things like "uses for smart contracts" I'm pointed to things like this page, https://corporatefinanceinstitute.com/resources/knowledge/de..., which honestly is a bunch of pie-in-the-sky bullshit that is not actually technically feasible at present.
My main concern being: DeFi could get harsh competition from traditional financial actors by them getting up to date on accessibility. Thus appealing to a new, more decentralized userbase.
This user-spawned and self-replication smart contract factory, alongside the price storage, has been key to the DeFi boom over the past year. No oracle required.
People (organizations) are using oracles to try to keep markets with similar assets in sync, and for smarter routing for the best price. The arbitragers take care of that too, which is simply Oracle + Fund movement. Flash loan users in the repo market are arbitraging as well, which is simply Oracle + Borrow + Fund movement + Repay in a single transaction included in a single block.
It is a growth industry when you stop asking why and start asking how. A lot of oracles are ignoring some market pairs, and the oracles themselves could have their own inefficiency.
For a blockchain to know about the real world, it does indeed need so-called "oracles".
These are typically trusted external entities (e.g. an actuarial firm) who "inject" signed information into the blockchain that can then be consumed as input by smart contracts "living" in the blockchain.
For example, an Oracle could inject, say every day, signed with their published key pair, the average price of Bitcoin into the Ethereum blockchain, and you could image a family of smart contract paying out if and only if the oracle-published Bitcoin price meets certain conditions.
This solution is - of course - very far from ideal as the information is only as good as the trust you place in these external institutions.
On the other hand, this is not very different than the trust you place in well established institutions such as banks, rating firms, escrows, etc...
What benefit this brings is:
1. Transparency (anyone can check the chain to see what contracts are in place)
2. Automation
3. Complex hierarchical structures where the "building blocks" or "leaf cells" is provided by the oracles.
4. A single failure of the Oracle to inject "truth" into the chain would ruin their rep. for ever.
To compare this to a real world contract, one party that has - say - written a "promise to pay" if certain conditions occur could chose to reneg on that promise, which would lead to lengthy and costly legal proceedings.This latter scenario can't occur on a blockchain: the cheater would have to bribe the Oracle, a far more complicated affair.
[EDIT]: and as pointed out by another comment, there are federated oracles: a smart contract can use an aggregate of multiple sources that provide the same info and form a consensus based on those.
[EDIT2]: another interesting point is that as more and more financial activity "moves" to the blockchain, the need for Oracles diminishes as the information required by a smart contract becomes native. You can thus view oracles as a temporary onramp of legacy financial info into the blockchain.
> I think smart-contracts as envisioned by early cypherpunks where meant to run in a world where Governments are obsolete
"Governments" have existed in some form since the beginning of the species (families and tribal structures, etc.) and pretending that some piece of technology may make them "obsolete" belies a very simple understanding of human nature.
The example is basic, but now the 3rd party can't take the money, go broke, take risks using your bond, etc, etc, etc. There is clear-in-code records of what the powers of the parties are and when things happen. You can prove where the money ended up.
This isn't an earth-shattering example, and things can still go wrong. But the failure cases have shrunk vs using paper. It is an improvement on the status quo.
A notary in my juristication (Germany) is a quasi-employee of the government, so has little risk to go broke etc. The particular bonds for these cases are usually non-transferrable.
OTOH smart contracts introduce new risks like bugs and costs like high gas prices - for what gain?
Edit: To clarify, the modes of failure are vastly worse for the smart contract scenario. If the notary goes broke, my money will not be part of the insolvency estate. If OTOH the smart contract has a bug, everone's money is gone.
In a sense; precisely. At the moment, to fill that function, you need a quasi-government employee to have a trustworthy bondholder.
With a smart contract, literally I could be the notary and while that would be super weird, I can't actually do anything not specified in the contract.
Something is possible that wasn't possible before. That is why people can get excited about the idea.
So it only makes sense to hire them for when dealing with large amounts of money. So what do you do with small amounts of money?
Plus, not only notaries but also escrow services might be replaced with smart contracts. Smart contracts might be way cheaper.
It will be very interesting to see this play out. But I wouldn't just discard smart contracts because we have some ancient way of doing things right now. And let's be honest, every time I have to deal with a notary, the work looks like it comes from Medieval times.
for all those people, trust-less smart contracts is a replacement of institutions they don't have, available as long as its tech works.
Doesn't some 3rd part have to verify the damage? Doesn't the 2nd part then have to still take a part of the bond?
What if the 2nd part just says you broke something, when you didn't, who solves that?
At the end of the day, this third party escrow service is still the only one that needs to evaluate the performance of services rendered - so where did your "trustless" distributed network go?
I get that the smart contract can ensure that there are only 2 outcomes (money sent or money returned), but it's not like you can remove the legal system here - there is nothing to stop the 3rd party from colluding with one of the other parties to make the decision their way. Heck, even is you still wanted to use crypto, why not just get rid of the smart contract altogether and send the money to the 3rd party's escrow account? You still have a full audit trail so you're guaranteed to know is the 3rd party sent the money somewhere else.
Can someone with knowledge of defi point out any deficiencies or inaccuracies here? Are there better ‘intro to defi’ papers that newcomers should read?
If you want to break into this space, start with the bitcoin white paper, read this book[0], then do the Ethereum white / yellow papers, start messing around with smart contracts, then consume every possible piece of knowledge you can, because it's all spread out everywhere without good central repositories of knowledge.
Defi is protocolized finance. It's making building blocks of financial tools that people and projects fit together in new ways to accomplish various things (earn interest, hedge, go leveraged long, buy insurance, etc. etc. etc.). The possibilities are truly endless and the space is open for innovation like never before as there are no rules and regulations, and there never will be any! Good luck!
[0] https://www.amazon.com/Mastering-Bitcoin-Programming-Open-Bl...
https://en.wikipedia.org/wiki/Virtual_currency_law_in_the_Un...
https://www.wired.com/story/janet-yellen-consider-limiting-c...
---
Governments around the world, at any time, could outlaw bitcoin or cryptocurrency. At the moment, it's accepted, but the minute it's seen as 'uncontrollable' expect that regulations will be attempted.
Literally the reason why people should stay the hell away from all this. No rules and regulations == Wild West.
https://messari.io/pdf/messari-report-crypto-theses-for-2021...
It might be worth it to get a pro subscription at messari.io or theblockcrypto.com for a saner alternative to crypto twitter and other news outlets.
The quickest way to learn is to actually use it. Make trades on uniswap, earn fees with a liquidity pool, get some sushis, stake them, etc. etc. Unfortunately these days eth gas fees are very expensive though and you will spend a lot of money in fees.
It's nice to read about the history how everything involved and get to know some of the characters behind. Two books i enjoyed: - Bitcoin Billionaires - from the guy who wrote that book from the facebook movie - Out of Ether, how Ethereum got started
It scales by allowing each market to have separate infrastructure and it executes trades chain-to-chain. It's a natural way to shard the ecosystem based on markets. The degree of decentralization can vary based on the market.
1 MATIC GWEI on the MATIC PoS Ethereum sidechain! Rapidly growing liquidity on Quickswap, MATIC PoS Universe 1 has Gas Limits of 30,000,000 GWEI. Restart your higher frequency strategies there!
15 BNB GWEI on the Binance Smart Chain EVM! Rapidly growing liquidity on PancakeSwap and Julswap
These gas prices are equivalent to cents, compared to the hundreds of dollars in gas needed on Ethereum mainnet
The newer AMMs have land grabs for farmers!
For years decentralized technologies have been pushed as the future for the internet and yet they still aren't used by anybody outside hardcore enthusiast communities, while bringing ruin to many others as volatile 'investments'. Goes to show that the problem is in the technology itself, no matter how you present it. Unless it is changed to reflect people's actual needs (i.e: reject the ideology of decentralization for convenience and easy payments) it will never gain traction.
I do agree that the fixation on decentralization over everything isn't going to cut it, DLT will be backend tech used to secure hybrid applications. I don't see anyone paying in bitcoin or having an ETH wallet for daily purposes.
The approach I’m taking is a blockchain agnostic one. There’s lots of middleware projects with tokens such as GRT, REN and LINK. I see middleware growing really as it has utility in defi but also other applications.
You might get yourself some BTC (as a reserve asset for defi), some ETH (as the oil or the machinery which makes the smart contracts go around) and maybe some DOT in case eth2 fails and dot delivers.
p.s. personal opinions, not responsible for losses, etc etc.
For the past 5 years and the foreseeable short-to midterm. that mainly means ETH (Ethereum), preferably hedged by smaller positions in one or a handful of similarly scoped projects that could end up eating its mind- and marketshare (I won’t judge which are better bets but some candidates would be Polkadot, Cardano, Solana, Tezos. Stay away from EOS and Ripple, there’s nothing behind their curtains)
Other more specific projects mentioned here like LINK, REN, various defi-specific solutions like AAVE/Uniswap, are more perennial and more suited for someone who actually uses these protocols or services, not something I would see as an investment.
Now it seems that threads like this have more comments like yours than actual crypto-bashing comments. I think the tide has turned.
Old people eventually retire and die.
But it took BTC to go to 46k for the tide to turn!
And given what I keep noticing every now and then here on HN, the moon seems to control the tide :)
A hovercraft is insanely cool tech, and has value, but you’re not driving to work in one.
[1] https://docs.cardano.org/projects/plutus/en/latest/
[2] https://github.com/input-output-hk/plutus
[3] https://docs.cardano.org/en/latest/marlowe/marlowe-explainer...
There are already a bunch of other chains that do what ADA seeks to do like Tezos, Polkadot, and Solana. Why haven't those gained traction?
Also, while it does make dapps safer, the lack of functional programming experience in most programmers makes it diffcult for me to think Cardano will do any better.