Decentralized Finance, the YAM fiasco and the road to DeFi sustainability

Introduction

This post explores what is the concept of Decentralized Finance (DeFi), what new possibilities does it unlock and why it’s so cool and hot right now. On the other side of the coin it touches on the dark side of DeFi with the YOLO farming and unaudited contracts most recently highlighted by the YAM fiasco. Finally it takes a look on the road ahead, the lessons that the community needs to learn in order to create sustainable and responsible DeFi for decades to come. Finacial instruments and tools that will not only be used by a few Twitter bros but permisionlessly by everyone around the world.

What is DeFi

In one sentence, decentralized finance is the permissionless decentralized version of various traditional financial instruments such as exchanges, lending, borrowing, synthetic assets e.t.c. There has been a lot of innovation in the sector in the past 2 years.

Decentralized Exchanges

We have various decentralized exchanges such as:

They all operate in a decentralized way and are non-custodial in stark contrast with centralized exchanges such as Binance, Kraken to which you have to first deposit and give custody of your funds.

Lending/Borrowing Protocols

There are protocols such as Compound and Aave that allow users to lend their assets to earn interest or to borrow assets after staking some collateral. MakerDAO also offers a form of borrowing via vaults that can mint the DAI stable token after depositing various forms of collateral.

Synthetic Assets

Synthetic asset protocols such as Synthetix or Token Sets combine a mix of different assets into a single asset. This way you can get exposure to multiple different assets by just holding a single synthetic asset.

What new possibilities does DeFi unlock?

What DeFi does is nothing new. All of this already exist in one form or another in the world of “traditional finance”. What is so amazing and revolutionary about DeFi is that it’s completely decentralized and permissionless. And that it is accessible to everyone regardless of location or background. It’s unlocking a ton of possibilities for people around the world, building a new permisionless financial system in the process.

The dark side of DeFi

Just like with everything involving money this sector also attracts short-termed myopic people and projects who are driven by greed.

There is the concept of a yield farmer, someone who provides liquidity or stakes in a protocol in return for interest, fees or some governance token. Yield farming is not bad per se. Everyone who provides liquidity in all the DeFi protocols is essentially yield farming. There is nothing wrong with that.




The bad side of farming is the “DeFi chad” or “Defi Degen”. The kind of meme-driven farmer who jumps from protocol to protocol without any thought on contract safety, chasing the biggest yield, dumping their tokens to the new guys and then moving on. A practice that is obviously unsustainable.

YAM finance.

A very good example of the irresponsible approach to DeFi is YAM. An experiment that did not even manage to last 2 days. It launched in 19:00 UTC, August 11th, 2020 and died 36 hours later.

What happened?

YAM advertised itself as an experiment from the start. It was a mashup of code from various other DeFi projects, completely unaudited and without any safety hatches or deposit limits. For all intents and purposes a completely reckless enterprise. Despite that at its peak it had over $500m locked in it!

For a technical explanation of the bug read their post. In short the bug made it impossible for the YAM holders to reach quorum on anything so essentially the governance part of the protocol was broken and without it the entire protocol could no longer function.

Once people realized that, the market cap of YAM went within minutes from $60m to 0. Everyone left holding YAM they bought took a loss as they can’t sell it, so did uniswap liquidity providers as they took a loss every time someone sold YAM through them.

Could this have been avoided?

ABSOLUTELY

There were multiple warnings from many prominet people in the crypto sector including myself that this is going to end in tears. The minimum precaution that could have been taken is:

  • Write contract tests
  • Have some sort of security audit of the code
  • IF you claim it’s an experiment then treat it as such by:
    • Putting deposit limits in the code to protect your users
    • Put an escape hatch in the code to protect your users.

Ponzi

What’s worse is that from the tokenomics of YAM it was obvious that this was a ponzi game. Note the difference between ponzi game and ponzi scheme as explained in this article.

Every 12 hours the total supply of the token increased but the amount held by each user stayed the same through a process called rebasing. The first farmers were incentivized to pump and shill YAM via social media so they can find victims onto whom to dump their tokens after the rebase. The new holders had the exact same incentives to pump it even more so they can in turn dump their bags onto the poor sods after the second rebase. And so on and so forth.

It was a “fair” and transparent ponzi, but a ponzi nonetheless. And with the amount of due dilligence people do in Crypto I am 100% certain that most of the people who got shilled into it did not realize that and lost money as a result.

Shilling in Twitter

What I personally found absolutely disgusting was the incessant amount of shilling of YAM in Twitter by many people in the ethereum community whom I actually respect who were also farming it.

It’s inexcusable, reckless and irresponsible. They were shilling a protocol that had not seen any production use yet, had unaudited code, no tests, no deposit limits or anything. They were doing so only to get more people into the Ponzi game to sustain their profits and dump their bags onto them.

I sincerely hope lessons are now learned. If you are shilling an unaudited insecure ponzi you are part of the problem of why this sector is not taken seriously. We can’t have such irresponsible behavior if we are ever going to reach mass adoption.

What did it cost us?

Some people lost a lot of money

  • Marketcap dropped from $60m to $0.
  • People who bought YAM are left holding a hot potato, got burned and lost everything they invested.
  • Uniswap liquidity providers lost money due to providing liquidity for sellers of a dying token.
  • Lots of money in gas fees (300+ gwei) for nothing

The rest of the non yam farming ethereum users were left with 300 gwei gas prices and could not really use the ethereum blockchain.

And finally and most importantly, outsiders roll their eyes and we lose credibility. Every nocoiner I know that I tried to explain this to just get their view that crypto is only for scams and ponzi schemes reinforced. Can you blame them?

Responsible Decentralized Finance

If you are to keep anything from this post as a take-home message let it be this section. DeFi is good and is here to stay. We just all need to be more responsible about it.

Responsible DeFi user

As a user don’t rush into every new thing that pops up and promises amazing 100%+ returns. Do you due dilligence, demand audit reports, ask people in the community about the history and portfolio of the founders of the protocol and if possible read the code and understand the tokenomics. DYOR. If something sounds too good to be true that’s because it’s probably a scam or a ponzi.

Responsible DeFi founder

As a founder/developer for the love of god DO NOT TEST IN PRODUCTION. Be responsible. Users do not heed warnings, or disclaimers. If it’s an experiment and you want to experiment in the mainnet that’s fine. Then put deposit limits and centralized escape hatches for the first X months. The safety of your users is your responsibility. Avoiding that responsbility through the veil of “just an experiment” won’t be accepted.

Towards a sustainable DeFi ecosystem

It is only through responsible development and professionalism that this sector can mature. We won’t get any new users with the YOLO yield farming memes. For DeFi to fullfill its goals of a new permisionless financial system it needs to go mainstream. And it will not achieve that through ponzi games and chad memes in Twitter. This will only be achieved when the ecosystem is perceived by normies to be mature enough so that they can also come in and participante in it. Let’s all then do our part to advance the ecosystem through responsible building and sustainable development and build a new financial system for the many and not for the few.

Closing / About the author

My name is Lefteris Karapetsas. I am the founder of Rotki. It is a project that deals with DeFi, among other things, and believes in the dream of a sustainable permissionless new financial system. We are a portfolio tracker and accounting tool that respect our users’ privacy and we are in this game for the long run and not to scam our users for short term gain.

Here is how you can help us:

  • Try out Rotki’s latest release and use it daily.
  • Buy a premium subscription to unlock awesome premium features and also support our development.
  • Provide us with feedback in the form of bug reports and feature requests.
  • Star our Github repo and follow us on Twitter.
  • Chat with us and other users of Rotki in Discord or in Telegram.
  • Spread the word so that more people get to try and use Rotki and learn how to both manage their finances but also how to protect the privacy of their financial data.

Rotki progress in Q2 of 2020

Introduction

This post serves as an update of the work we have been doing in rotki during Q2 of 2020 and especially since the conclusion of the last gitcoin round.

A lot happened in those months. We have grown our community in Discord and Telegram and the general userbase of rotki.

We made 2 big releases, v1.5.0 - Barb and v1.4.0 - Axilla containing a ton of features which will be detailed below.

We have also made 2 smaller releases, v1.4.1 - Axillaries and v1.4.2 - Bird’s back adding smaller features and fixing bugs.

Userbase and Community

Our community has grown considerably. From almost non existant in the start of the year we now have 83 members in discord, 42 members in Telegram and almost 1000 followers in our Twitter account! By far the most users are in discord where interesting conversations happen between users and developers and also where many feature requests are made. Discord is also where we, the rotki developers, coordinate and discuss development so if you wanna see how we do that do join in!

Counting the actual users for a local opensource is not an exact science but the userbase of rotki has also grown considerably! Each new version gets ~300 downloads and we have almost 20 active premium users at the moment. Additionally from the users who have statistics activated we can see we get about 36 sign ins on average daily. This is a very big increase compared to last year where we had ~80 downloads per release, 4 active premium users and 5 sign ins per day.

Features

A lot of new features have been added in the past months. In this section we will see a detailed rundown of the most important of them.

Support for Gemini Exchange

Release v1.4.0 introduced support for the Gemini exchange.

Users simply need to add a Gemini key with the “auditor” permission and rotki will pull all balances, trades, deposits/withdrawals and display them inside the app.

Users can now maintain manually tracked balances

Release v1.4.0 introduced the ability for users to add manually tracked balances.

Users can add any type of asset in any kind of location for tracking. This feature is very important since it allows users to track their balances in exchanges or blockchains which we do not currently support.

Improvements for Kraken users

Kraken users can now choose the tier of kraken account they have from the UI.

This allows them to take advantage of different API rate limits. Unfortunately kraken does not offer a way to auto-detect the account type and as such the user needs to select it from our user interface.

Support for Compound tokens and for aDAI

Rotki can now track all compound tokens and Aave’s aDAI. If you hold any in your accounts they will be auto-detected and their balance will be displayed for you and taken into account in your overall net worth.

Speedup of blockchain queries

We put some work on considerably increasing the speed by which the ethereum blockchain balances are queried by utilizing a set of special contracts in order to save on RPC calls.

Redesign of the welcome screen

We have redesigned the welcome screen!

You are no longer greeted by a dull and boring background but by a patterned moving robin.

Moreover the account creation screen has slightly changed in order to make it easier for you to understand what needs to be filled in when creating a new account.

Redesign of the dashboard

The dashboard’s design has changed considerably.

It has a more modern look with a heavy focus on the user’s total net worth, which comes as an aggregation of all assets over all locations.

Furthermore each exchange, blockchain and other location is shown in the dashboard along with how much value is saved in them. And just like before the list of all assets and their percentage of the netvalue is also present at the bottom of the dashboard.

Ability to change the password

You have asked for this feature and we listened!

It’s now possible for a user to change their password by visiting the account & security page. Simply type in a new password and you are good to go!

Privacy changes

We have introduced a number of privacy related changes that allow users to share screenshots/videos of their rotki without actually sharing any of their sensitive data.

Data scrambling

Users have the ability to activate data scrambling mode.

What this means is that in the dashboard and other pages real numbers are replaced by random numbers each time a page is loaded. This way you can share screenshots of your rotki app experience without sharing any of your data.

Privacy mode

Another feature we introduced is called privacy mode.

Once privacy mode activated all numbers are blurred out.

This way you can be sure that nobody looking at your screen will see anything and you can share a screenshot or a video of a potential bug/problem with the interface and share with us without compomising any of your sensitive data.

Improvements on the MakerDAO DSR page

The MakerDAO DSR page has been improved to have similar look and feel to the vaults page.

You can now filter the DSR balances and how much you have earned per account. Furthermore the list of DSR actions has been greatly improved compared to previous versions. Each action has both the DAI amount and the equivalent amount in USD value at the time of the transaction. Moreover you can check out each action in etherscan by simply clicking a link. Furthermore for each action you can see how much the user has earned in DAI and USD up to the point in time the action happened.

Here is a small demo showcasing the usage of DSR in v1.5.0:

Support for MakerDAO vaults

With v1.5.0 we have also added support for MakerDAO vaults.

The user’s vaults are now auto-detected from the tracked ethereum accounts. The aggregate deposit locked in all vaults can be seen. But also for each vault all the relevant information such as locked up collateral, liquidation rate and outstanding debt are shown.

Furthermore, for premium users, the list of historical actions along with how much DAI/USD is lost to paid interest is shown. Moreover they can create vault watchers.

A watcher resides in the rotki server and watches the given vault for changes in the collateralization ratio. Users can have multiple watchers per vault. If the ratio becomes greater/less than the target ratio then an email alert is sent to the user so he can react quickly and either not be liquidated if the ratio becomes too small or not lose on potential profit if the ratio grows too big.

Here is a small demo showcasing the usage of vaults in v1.5.

Wrapup

Rotki has progressed a lot during Q2 of 2020. We have taken the support of our community and of the people who donated to us during the last gitcoin round and turned it into code that created a better product with many improvements and new features. Rotki’s UI/UX has improved and more ethereum DeFi support has been added. Finally privacy and speed/performance improvements were made.

Conclusion - last half of 2020 and beyond

Heading into the next half of the year rotki is growing up!

We will focus on implementation of the new features requested by users, prioritizing those requested by our paid users and those features that deal with DeFi.

Our online presence will increase even more and so will our userbase which will allow us to perfect the software and make it the best tool for everyone by taking all of your feedback into account.

Stay tuned for more updates and please help us in building the best portfolio tracker and accounting tool that respects your privacy. Ways to do that are:

  • Try out Rotki’s latest release and use it daily.
  • Provide us with feedback in the form of bug reports and feature requests.
  • Star our Github repo and follow us in Twitter.
  • Buy a premium subscription and/or support us financially.
  • Chat with us and other users of Rotki in Telegram or in Discord.
  • Spread the word so that more people get to try and use Rotki and learn how to both manage their finances but also how to protect the privacy of their financial data.

Rotki 2019 - A year in review

Introduction

What a year has this been for Rotki! With less than two days left in 2019 this post is meant to highlight the biggest things that happened in the project during the past 12 months, list what we have achieved and look to what is coming in the future.

Year In Review

January

January started with the publishing of Rotki v0.6.0, the last release before v1.0.

It was a big release containing many bug fixes but also introducing some features like the API query caching or the tax report progress indicator that stay with Rotki even to this date.

Other than that development continued with a good pace.

February

Work on Rotki continued. The project’s source code was ported to Windows and for the first time Rotki gets to run in a Windows environment.

Trying to port code to Windows is not an easy thing, especially coming from a Linux background, but seeing the end result of the app running inside an all familiar looking windows themed frame is really rewarding.

Apart from that a lot of work on improving the experience of the application was done such as accomodating for Token upgrades starting with the new MLN token.

March

Rotki participated in ETHCC 2 in Paris and gave a talk on what Rotki is, what is the problem that we are trying to solve and what would v1.0 bring.

The reactions from the audience and the questions we got were really encouraging. People wanted to learn more about Rotki’s mission, how can they try it but most of all when would it be available in Windows and when would v1.0 be released? To see the full recording of the talk check here.

Meanwhile development steadily continued with sneak peeks of the premium graphs and among other things a lot of UI improvements.

April

Development continued in April but rather slowly. This month was dominated by events in Lefteris’ personal life as he became a father!

May

Slowly development picked up its pace again with various bug fixes done to the app but also some features being implemented. Most notable change that got implemented in May was a complete change in the way assets are handled by Rotki. The application no longer trusted any single token/asset symbol it is given. Instead from here and on it maintains a list of known asset symbols along with their conversions from/to external services. Any asset not in that list is not supported by Rotki. This lets us stop the guessing games about what assets the user has and instead allows us to know all details about each token in question and how it translates in each exchange or price querying website.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"KEY": {
    "ethereum_address": "0x4CC19356f2D37338b9802aa8E8fc58B0373296E7",
    "ethereum_token_decimals": 18,
    "name": "Selfkey",
    "started": 1508803200,
    "symbol": "KEY",
    "type": "ethereum token"
},
"KEY-2": {
    "ethereum_address": "0x4Cd988AfBad37289BAAf53C13e98E2BD46aAEa8c",
    "ethereum_token_decimals": 18,
    "name": "Bihu KEY",
    "started": 1507822985,
    "symbol": "KEY",
    "type": "ethereum token"
},
"KEY-3": {
    "active": false,
    "ended": 1452038400,
    "name": "KeyCoin",
    "started": 1405382400,
    "symbol": "KEY",
    "type": "own chain"
},

If you are interested to learn more about this topic it has been covered extensively in this post.

June

Development continued with a steady pace towards v1.0.

A lot of work is also happening outside of Github as a website is being built for Rotki which also contains a system that allows premium users to purchase and manage premium subscriptions. Also an API server is being developed for the premiums users of Rotki.

In parallel to all that Kelsos started the slow and painful process of rewriting the UI code using the vue.js framework

July

July is definitely dominated by finally reaching the v1.0 milestone.

The Rotki v1.0 release was the biggest release of Rotki up to now (probably will be overshadowed by v1.1.0 though ;)).

It officially launched the purchasing of Rotki premium subscriptions and the website to support it. It also was the first release to utilize the premium API server to provide the users with the ability to save their data in our servers and get extra statistics and graphs for their assets and activity.

Rotki v1.0 also was the first release to be able to run in Windows.

With Rotki v1.0 the users could now for the first time conveniently see notifications in the top right of the front-end about information or warnings that the software wants to show them instead of always having to read the logfiles.

Finally this version had a ton of bug fixes, and new features for a full list of which you should check the release notes.

August

As if v1.0 in July was not enough, August was a really busy month for Rotki!

As the users started using v1.0, August started with bugfixing of various issues that were reported. Not one, but two bugfixing releases were made within a few days!

In August we also got our first paying premium subscribers, something that boosted our confidence that what we are building is something that people need and that the problem we are solving is worth all the effort we are putting into the project.

We also started getting a lot of feature requests from people in social media and Github

This blog was also started in August with the very first post explaining what Rotki is, what are our values and the vision for the future of the project.

An unforgettable event was our participation in EthBerlinzwei and Dappcon which we even sponsored!

There we talked with many users who were interested in what’s in store for Rotki and we got lots of feedback and advice on how to go forward.

Finally at the very end of the month, a big release containing bug fixes and the most requested features was made. Release v1.0.3 added support for Coinbase which was a feature prioritized via request of a premium subscriber.

It also introduced a dmg installer for OSX users, added a popup warning users when new releases are available and added various smaller features and lots of bug fixes. Check the changelog for more details.

September

Development continued also in September. The biggest change implemented this month was saving all actions inside the database so that users won’t have to re-query each time they run Rotki.

In the meantime traction in social media is slowly increasing. To further improve our online presence we are trying to educate current and potential future users on why Rotki is needed by explaining the problems of centralization, lack of privacy and lack of data ownership that all other portfolio tracking and accounting solutions are facing.

In the meantime yet another post is made in this blog, this time to explain why Rotki maintains its own list of assets and their mappings.

Finally in order to support the Ethereum ecosystem from which we came we also became sponsors of ethereum’s devcon 5 that would take place next month in Osaka, Japan.

October

October started by unleashing a new Rotki release!

Release v1.0.4 contained multiple features and bug fixes. The most noteworthy feature of that release was the ability to import data from cointracking.info. That feature was requested by a premium subscriber and as such was prioritized. For a full list of changes take a look at the changelog.

The most seminal event of October was of course our participation in Ethereum’s Devcon 5 in Osaka, Japan and the talk we gave there regarding the problems of using centralized tools in order to do accounting for the world of decentralized finance. You can find a recorded video of the talk here.

There was a lot of feedback given to us after the talk and during our presence in the conference. The feedback and questions revolved around upcoming DeFi features but also ideas of monetization for the project. There were ample discussions about the direction Rotki is taking as an opensource application trying to monetize itself and we got many ideas on potential ways forward.

Development also continued albeit in a slower pace due to travelling to the other side of the world for the conference.

November

In November development continued trying to fix various bugs and prepare the next upcoming release.

The most noteworthy change that occured in November was the rebranding of the project from Rotkehlchen to Rotki. Since even before v1.0 many people were complaining about the difficulty they faced when trying to pronounce or spell the original name. It made it really hard to spread the word about it, recommend it to friends or even google it. As such rebranding to the diminutive form was absolutely necessary. Github, twitter, website all got renamed. For a full list of what changed check this post.

In November we also had to face the problems introduced by the introduction of Maker DAO Multi-collateral DAI and the renaming of the old DAI to SAI. We developed the required code and DB upgrades to handle it and also explained our view on why renaming an asset like that is misguided in this blogpost.

December

This month, Rotki has been on fire!

December started with the publishing of the last release for the year. Rotki v1.0.5 was released mainly containing the work done for the Maker DAO multi-collateral DAI upgrade. Some minor features and bug fixes were also included in this release. For a full list of changes check the changelog.

After requests from our users we also created two chatrooms where users can chat about Rotki. A Telegram chat and a discord room.

But December, presumably due to the holidays, has been one of our most productive months of work.

We started having two different branches in the project due to the sheer amount of changes happening. The master branch stays as the stable branch where releases are published from. The development branch is where all new work is going to.

The work that Kelsos had started in June in order to switch the entire front-end code to utilize the Vue.js framework was finally finished and got merged.

At the same time a lot of work preparing the project for v.1.1.0 was done. Most noteable of which was the complete removal of ZMQ and replacing it with a full-fledged REST API. Even as of the writing of this post work continues so that v1.1.0 can be ready in January 2020. I can’t describe how much work has been going on in Rotki the past few days. Best way to see it for yourself is to check the PRs in Github.

We also described how would v1.1.0 look in our new year resolutions for 2020 post. Check it out if you would like to see some hints about how v1.1.0 will look like and also some more long-term ideas about Rotki.

Wrapup

What a year has 2019 been for Rotki! We are beaming with pride! So much work has been done, the userbase is steadily growing, we acquired the first paid users and we have gotten more feature requests than we can currently cope with.

We would like to thank all the users who have entrusted us with their business and for all the good wishes and words of support we have gotten over social media. We promise that as we head into 2020 we will not let you down!

Conclusion - 2020 and beyond

Heading into the new decade, we can only be positive about the future of Rotki!

A lot more work will be going into the project in order to fullfill all the feature requests we have been getting. Expect a lot more coming from us and for our online presence to increase and become stronger. The userbase will also steadily keep increasing, which will allow us to perfect the software and make it the best tool for everyone by taking all of your feedback into account.

Stay tuned for more updates and please help us in building the best transparent financial tool that enables you to take ownership of your financial data. Ways to do that are:

  • Try out Rotki’s latest release.
  • Provide us with feedback in the form of bug reports and feature requests.
  • Star our Github repo and follow us in Twitter.
  • Buy a premium subscription and/or support us financially.
  • Chat with us and other users of Rotki in Telegram or in Discord.
  • Spread the word so that more people get to try and use Rotki and learn how to both manage their finances but also how to protect the privacy of their financial data.