Institutions vs Community

https://defiweekly.substack.com/p/institutions-vs-community

Personal Backstory

The past 2 weeks, I don’t think I’ve ever been as excited about the future of our world than before. While there are plenty of terrible things going on, I’m grateful for being in an industry such as DeFi where we actively create the future. There’s no doubt to me that our actions will be studied by future students in the decades to com…


Read more

How to Compete with Ethereum

https://defiweekly.substack.com/p/how-to-compete-with-ethereum

It’s no secret that I’m a massive Ethereum fan, however I’m also not a maximalist by any means. This leaves me in an interesting position where I comment about Ethereum accurately without being blind sided by it. I’m a firm believer in innovation and that the world isn’t dominated by one chain, but many with their own unique characteristics, use cases a…


Read more

The Gradual Tokenisation of Everything

https://defiweekly.substack.com/p/the-gradual-tokenisation-of-everything

I entered into crypto late 2017, at the peak of the bull market. During that period of crypto, having a token was the fashionable thing to do. Equity was heavily frowned upon. However since then the narrative has oscillated more than I would have imagined. Here’s a recap:

  • Late 2017/early 2018 = tokens are the new equity
  • Late 2018 = tokens are a scam, equity is the safest path
  • Early 2019 = tokens may be good in some cases, although don’t do it unless you have to
  • Mid 2010 = if you don’t have a token, expect legal issues, issues providing liquidity to investors and a non-competitive advantage

A lot of the above is pretty anecdotal from my experiences running my own startup, to today, as I speak to investors in the space. However, apart from startups raising on tokens, you now have a whole new set of asset classes being created from in game items, real world items and people!


The ICO Fair

For those of you weren’t fully aware how the 2017 machine worked, here’s a quick primer.

  1. A team of people come together with the intention to raise money for some venture. The idea of the venture has much more weight than actual execution capabilities or any other risks.
  2. The idea was put into context as if blockchain would revolutionise the planet and those that got in early would see upwards of 100x returns
  3. Once the idea was locked down, a white paper was written to formalise the idea in a bit more detail. In order to make the team more credible, advisors with impressive names were added onto websites as a way to show social proof. Vitalik as an advisor meant you sold out instantly.
  4. From here, the “rounds” began. Seed would get in at a low price such as $0.01 with the private round going for $0.10, pre sale going for $0.50 and public sale for $1.00
  5. The seed round was done to raise enough money to pay for marketing and travel costs to go to the next round. Marketing for the public sale would cost in the hundreds of thousands, if not millions.
  6. Tokens would list on an exchange (making a killing in the process), and early insiders would take an exit leaving later sellers with overpriced bags
  7. However, in some cases the token would then do 10x-100x multiples of it’s listing price as well. This last step is what kept the casino going for even the most normal investors

Okay so now that we’ve got that out of the way, let’s talk about the various parties and what made all of this so exciting for each party:

  1. Teams: raise capital from anyone, anywhere with no shareholders dictating how to execute
  2. Early investors: low capital amounts to high exit amounts in a very short period of time
  3. Exchanges: providing technology to enable the speculators to speculate
  4. Marketers: charging large sums of money to make the maximum amount of noise possible
  5. Retail investors: investing in “credible” teams and projects with the due diligence of early investors, advisors, marketers and exchanges
  6. Developers: large treasuries needing development talent to execute on ideas causing “blockchain developer” to be real, paying job

The whole model only works, if all the various parties come together to play this co-operative game. However, as prices started falling due to not enough new capital speculating we saw the crypto macro market fall as a whole from the sky to the depressing ground. After the fall out, a very strong distaste for tokens began to grow with everyone in the ecosystem. Saying you had a project and a token was almost akin to saying “I’m a scammer”. Not even kidding.

I personally believed that 2017 was a prototype of the future, it was just uncertain as to what it would be a prototype of. Looking back, the key things we learned in 2017:

  1. Representing value as an ERC20 token is incredibly powerful as it gives a trading engine that otherwise takes a lot of infrastructure
  2. Token interoperability inside financial protocols means that anything can be rented, borrowed or controlled by code
  3. Speculation is a powerful use case that will always persist, contrary to the ethical issues with banking on it as a use case

The Upcoming Future

DeFi is great (coming from someone who writes about it a lot), although it lacks the ease of understanding and returns compared to a speculative ICO. We’re slowly seeing the birth of the same dynamics which made 2017 ICOs so popular, but this time in a different, more interesting form. The upcoming 3 categories are what I think provide a glimpse, each with various upsides and downsides:

Initial Game Offerings

Games are more like production houses than startups as they have high capital requirements in order to make all the needed assets and acquire users. Gods Unchained is a great example of this, their first game (before Gods Unchained) allowed them to raise $2m directly from their customers for the pre-sale of in game assets. No dilution, capital available from anyone/anywhere/anytime. Tokens can be speculated on before the game itself goes live and is a form of engagement in itself. There is currently no player that enables initial game offerings as a service and providing the support needed to games.

Good:

  • Allows game creators to raise before spending on production
  • In-game items have real utility and have demand based on the stickiness and engagement of the game
  • Very good regulatory framework as assets are strictly pre-sales for in-game assets

Bad:

  • Not legally enforceable for teams to deliver
  • Quality of product may not meet expectations
  • Secondary market liquidity can be hard to bootstrap if they’re NFTs

Initial Item Offerings

Money Laundry: The Rise of the Crypto Sock Market - FRST - Medium

Started off by the Uniswap team for a pair of socks – $SOCK. The idea: a pair of socks that follow a curve making each pair of socks more expensive than the one sold before it. Price is set by a mathematical curve where the last few socks are almost 10x-30x more expensive than the first pair sold! It’s the same ICO game in 2017 but for something more tangible and exciting to speculate on since each person that purchases near the end can brag about buying a sock for $200 and in turn get more people to buy in.

Zora is the latest pioneer in this space by using high profile celebrities and artists to tokenise their items. Their recent collaboration with award winning grammy artist RAC resulted in his $TAPE (a real cassette tape for his new album) reaching an all time high of $929. I predict many competitor platforms will emerge in this space as it gets more traction and we see speculation of each asset turning into a valuable marketing exercise for the platforms that rise in this category.

Good:

  • Based on real world items and value proposition is very clear
  • Can allow creators to raise capital before going into productions
  • Very good regulatory framework as assets are strictly pre-sales for real world assets

Bad:

  • Scalpers can drive up prices and make money without adding any concrete value
  • Fans end up paying much more than needed
  • Still inaccessible due to only being available to those with crypto

Initial Person Offerings

Pioneered by Matt Vernon for tokenising 1 hour of his time by the $BOI token. Social tokens are the latest offering on the block which are becoming more interesting. Alex Masmej evolved this experiment by incorporating an income share agreement into his token, where holders would get a portion of his income for the next 3 years. I decided to take this a step further by tokenising myself for my time, but then also incorporating governance and token burns (5% of this newsletter’s revenue). Roll is the pioneer platform with majority of high profile offerings being launched on their platform.

Good:

  • Can allow a new segment of fundraising before a company is started and allow believers to tie their success closer to said person
  • Create communities around individuals that can be leveraged to benefit both creators and fans

Bad:

  • Enforceability is not legally binding and no clear legal structure
  • Amount raised can only be a certain amount due to outsized legal risks as the amount raised increases

Closing

All of the above are interesting as they can be done today, with no extra technology. The only thing required for adoption is easy payment rails to add all of the above which is starting to take off (Dharma already has a $250 no KYC limit and a little birdie has told me other teams have been able to get higher limits).

It’s interesting as I’ve been able to get a really good glimpse into all three of the above categories first hand and I can think of it being nothing but bullish. There’s two plays going on which will be worth keeping in mind.

  1. Platforms that enable these new breed of offerings to be more accessible to regular people/industries. Each category has first movers which may end up flourishing in the next bull run to kinds of companies we haven’t really seen before.

Key milestones: a platform has an ecosystem that reaches a total of $100m+ in liquidity.

  1. Creators/users that leverage these platforms to reap benefits of the value they create in whatever community/ecosystem they participate in. We’ve seen early success here in every category, the next bull run will scale this to thousands (or even millions)!

Key milestone: a creator/item/person reaches a market cap of $1m+

Whether you like it not, but enabling everything with value to be speculated on will be the biggest use case of Ethereum in the coming years. Many in the Ethereum community seem to be very harshly against this due to the scars of 2017. In my eyes this view seems to be very shortsighted and limits the possibilities of innovation that may spring up. However the bit about which makes Ethereum amazing is that anyone can innovate, regardless of what it is for or who they are.

Special Edition: imBTC, Uniswap & dForce

https://defiweekly.substack.com/p/special-edition-imbtc-uniswap-and

It’s a late Saturday night and I’m watching a movie. 12am, movie finishes and I find out a new DeFi attack has happened. Spent till 2am researching, brain hurts from complexity. Looks like my Sunday is gone. Next morning I post this:

Luckily Frank Topbottom is on the ball and already decoding a bunch of on-chain data. Make sure to follow him to stay on top of what’s going on complex technical situations like these.


Glossary

Here’s the rough TLDR of how this article is structured, feel free to skip to whatever bits suits you:

  • AMMs 101 – understanding how AMM curves work at a very high level

  • Reentrancy 101 – understanding what a reentrancy attack is and how it works

  • Uniswap x imBTC – initial attack that involves Uniswap

  • dForce x imBTC – second attack that involves dForce and $20m was lost

  • Hacker x dForce – dForce negotiates with hacker on-chain (yes, I’m not joking)

  • Implications – what can we learn, who is responsible for what

  • Closing – a reflection on how we did as a community and how the future might look


AMMs 101

Automated Market Makers are exchanges that don’t have an order book. The price is determined by the ratio of assets in the exchange. The exchange relies on the formula below:

  • x * y = k

  • x = first asset (Ether)

  • y = second asset (some Token)

  • k = constant that must always stay the same

Here’s a little pictures the demonstrates how this looks practically:

  • The black line drawn is x * y

  • The gradient at any point of the curve indicates the price between ETH/Token. At the middle you have the real price, the further you move away the more slippage you experience.

  • To move up the upper left of the curve, you’ll need to have lots of ETH in the pool and not many tokens. Tokens are very expensive at this point (lots of ETH required to purchase a small amount of tokens).

  • To move down the bottom right of the curve, you’ll need to have lots of tokens in the pool and not much ETH. Tokens are very cheap at this point (lots of tokens required can be purchased with a small amount of ETH).

I’ll be writing a much more detailed post on DeFi Weekly about AMMs and a run down of who is doing what, but for now this should be enough to understand the attack that went down.


Reentrancy 101

The second component to our understanding of the attacks that went down is what’s known as a reentrancy attack.

Put simply, a reentrancy attack is when unanticipated code is called in between existing code. How does that works? Let’s take a look at the most famous reentrancy attack: The 2016 DAO hack.

  1. The attacker creates a contract which he executes the attack from. This contract has two functions. One to withdraw ETH from the DAO, the second that is called when ETH is received (standard part of any Solidity contract)

  2. The contract calls the withdraw function and the first line of the withdraw function is to send the ETH to the person who requested the withdrawl

  3. Since the requester is the contract and can call a function when it receives ETH, it then in turn calls the withdraw function on the DAO contract again!

  4. He keeps repeating this until his balance is updated at the end, but only for 1 withdrawal, not the amount of ETH he actually withdrew!

The community learned this lesson for a hefty price of the hard-fork, however what makes our case interesting is that a new token-standard, ERC-777 actually introduces a deliberate reentrancy vulnerability by calling the sender of a transfer before the tokens are sent! Don’t worry if this last part doesn’t make sense, there’s more pictures for you below to understand.


Uniswap x imBTC

Part of what makes Uniswap amazing as an exchange, is that anyone can list any token without any permission! When Uniswap released v1 over a year ago, Consensys Dilligence did an audit for Uniswap and found a potential attack vector with the ERC-777 token standard and Uniswap (https://medium.com/consensys-diligence/uniswap-audit-b90335ac007). In fact, Open Zeppelin decided to even take it a step further and create a tutorial on how to use the exploit with some PoC code to help a future attacker: https://blog.openzeppelin.com/exploiting-uniswap-from-reentrancy-to-actual-profit/.

Now when the imBTC Uniswap pool reached a large size, someone thought “hey, this might actually work”. They gave it a go and turns out it actually did!

https://bloxy.info/tx/0x206e874ac4645b82806dc06b3ec34c5faa4313d584c9e8688b10697a753eecdb

So what happened exactly? Here’s what:

  1. The attacker purchases imBTC from the pool via Uniswap. The balance of ETH has increased and imBTC decreased.

  2. He then sells half of the purchased imBTC from the pool, however as he is selling the imBTC the balance of imBTC hasn’t decreased

  3. This is due to the ERC-777 reentrancy attack since he doesn’t actually end up selling the imBTC but instead is effectively draining the Uniswap ETH pool of ETH!

  4. The attacker does not earn any money from the imBTC but the ETH from the pool. Uniswap LPs for imBTC were the real losers here.

The tokens have changed ownership at this point in time, however Uniswap doesn’t know that multiple calls have been made, it assumes just one has been made. Due to this it relies on faulty assumptions of what the numbers are and lets the attacker manipulate the math of the curve. I jumped on a call with Michael (founder of Curve) to better understand how this works in more resolution. Below are the notes I made with example numbers to get a better intuition of the numbers:


dForce x imBTC

By this point in time it was pretty obvious to any developer/protocol that touched imBTC this attack was possible. The BTC aggregator token, BTC++, immediately froze imBTC inside their contracts promptly – the correct thing to do. However, inside every DeFi hack story there’s always a twist.

Rewind to a few months ago, a Chinese team called dForce copied Compound’s source code, deployed on main-net and setup shop. Their whole angle was to be “the Compound of Asia”. Good in theory, except whether the team fully knew what they were doing was questionable. Crypto is one of those industries where you can’t use low quality developers since the cost of a mess up literally involves other people’s money. Regardless, dForce went ahead and started getting traction (not sure how much of this was recycled money though tbh). It got to the point where just a week or so ago, Multicoin invested $1.5m into dForce:

Kyle Samani @KyleSamani

I’m very excited to announce our newest investment: @dForcenet !

Thesis: as financial markets globalize on DeFi rails, localization is everything

@Mable_Jiang just joined us in December, and this was her investment

multicoin.capital/2020/04/14/our…

Mable Jiang @Mable_Jiang

0/ Today I’m excited to announce that @multicoincap led a $1.5M round in @dForcenet, the world’s first “Super-network” for open finance protocols. Coinvestors include our friends at CMB International (CMBI) and @huobicapital.

https://t.co/obXTCYUxIp

Large investor puts money inside DeFi protocol, said protocol is gaining traction – must be safe to put money inside? Absolutely not. Turns out that dForce uses imBTC inside its lending protocol, meaning someone can use imBTC to borrow other assets. Oh-oh.

This hack was more clever in how it made use of the reentrancy attack.

  1. Hacker deposits a sizeable amount of imBTC into dForce. This is the amount of imBTC that gets registered on the dForce protocol

  2. Our hacker then deposits 0.000001 imBTC into the protocol

  3. The next step is to withdraw the first large deposit of imBTC but then invoke the reentrancy attack which means the protocol doesn’t register his withdrawal

  4. During this reentrancy attack he then borrows other assets with his original imBTC deposit. Since his original collateral balance isn’t subtracted he can re-borrow many more times than his actual amount.

  5. Through this he drains $25m worth of funds directly from dForce!

  6. Hacker then deposits stolen assets into other DeFi protocols to earn yield (alpha move lmao)

Best on-chain example of what happened: https://bloxy.info/tx/0xe49304cd3edccf32069dcbbb5df7ac3b8678daad34d0ad1927aa725a8966d52a

A summary of the losses incurred:

List of victims and funds lost:
https://drive.google.com/file/d/15SYI-gNkozXKvU0WG15n3f6w0fzNAXZf/view


Hackers x dForce

You wouldn’t think it could get crazier than this could you? Sike! It does. After the dForce team realises they essentially lost all of their depositor’s money, they took an unusual tactic.

Negotiate with the hacker on-chain. Below is a little on-chain story.

ImageImageImageImage

You might be thinking, why bother negotiating with them in the first place? Well turns out that the imBTC is actually a custodial asset and the issuers will need to issue the redemption for real BTC in order for it to be useful. To be more concise, the imBTC is tainted and profiting from it will be difficult. Our hacker decides to come to the table instead. You can check out Frank’s remaining tweet storm for all the refund txs:


Implications

So now that we’re all on the same page about what happened and how it happened, let’s look at the aftermath of all of this. I’ll discuss party by party.

  • Uniswap. Were they responsible? Partially. While they had no role in listing imBTC, in fact they state that they don’t support ERC-777 they could have done two things in their control. First, detect non-ERC20 compliant tokens and warn users of using pools that don’t adhere to standard logic. Secondly, they could have used reentrancy guards that prevent a reentrancy attack from happening in the first place. I wouldn’t take pitch forks to them, but rather a lesson to protocol developers to think about external vectors like this and warn users.

  • dForce. Were they responsible for what happened? Absolutely. All assets listed on their platform should have been carefully looked at and analysed. In addition, they ripped off Compound’s source code without having the required expertise. Go-to-market was prioritised over users security.

  • Multicoin. While they were just investors, I think they do have a role to play given their prominence in the industry. They very publicly backed a team who, from what it clearly seems, did not have the required technical expertise to maintain a decentralised lending protocol. Copying and pasting code shouldn’t fully be crucified since everything is open source and innovation can be sped up from the trove of code already available. What is bad is when teams that don’t know what they’re doing copy and paste code. Small difference but large difference in outcome.

  • imBTC. It’s hard to say whether they were at fault here since they adhered to an approved token standard. They could have given a heads up to protocols they were going to integrate with that a possible reentrancy attack vector could be possible.

As for investors who are watching this from the sidelines, I’d imagine that any team which has existing Ethereum/Solidity knowledge would command a premium given the intricacies of how these things work. I always thought there would be an explosion of DeFi protocols but maybe I’d change my assessment to only the best can end up shipping and creating high quality software in the process. Reminder that talent is scarce in this industry.


Closing

I guess this wraps up this special edition of DeFi Weekly. This set of events really does seem like a wealth transfer from those who understand DeFi more deeply (hacker) to those who do not (dForce). Chasing yield blindly is a dangerous task and the risks should always be weighed up with the reward. One concern here is that this event, alongside many others, scares investors from investing in DeFi due to the compounding risk from tokens/protocols being pulled together. Kain sums it up pretty well:

kain.eth @kaiynne

So many lessons from this Lendf.me clusterfuck.
1. Chasing yield without factoring in platform risk is insane. Hopefully this is the nail in the coffin for “no risk” yield chasing.

Once again, if you enjoyed reading this article please share and subscribe! Thank you once again to Frank Topbottom for his great on-chain data.

Governance, Liability and Competition

https://defiweekly.substack.com/p/governance-liability-and-competition

Hey everyone! This was an impromptu post simply because there’s too many interesting things regarding governance/decentralisation going on at the moment. I’d highly recommend grabbing a cup of coffee to read this one.

Share


In the past few weeks we saw a flurry of announcements from MakerDAO around how the protocol is going to decentralise and be in the control of token holders. To me, this quite frankly reflects two dangers points:

  • They’re increasingly worried about legal liability and trying to clean themselves of any trouble that will come their way

  • The number of committees, votes, processes are far too many for any real progress to be made to the protocol relative to the competition

The first point became clear this week when word got out that a group of traders came together to seek $20m in damages from MakerDAO failing on March 12th for $45k worth of losses. Given this information, it makes sense now as to why they were rushing to get this all out of the door. I’m curious as to why these traders chose the path they did even though MakerDAO was willing to compensate them via the governance vote. Regardless, the Maker foundation may not have control over the protocol now but they still do have plenty of MKR in their treasury. I believe this number is something close to the tune of $100m. It seems that the 2017 model of having a foundation is an increasingly bad idea as it aggregates the liability to a real set of human beings that collectively hold some money. MakerDAO may be able to clean their hands and say it’s not in their control, and the traders know that, but that’s not the point. There’s a clear path to profitability from these events. If MakerDAO wasn’t in the business of minting synthetic US Dollars, would there still be a valid case? This tweet is pretty relevant as well:

PS: Vance, if you’re reading this I’d love to learn more about the other points and write a post going into depth on them.

The second point to mention which worries me is that this marks MakerDAO’s death by governance. Personally, I’ve done multiple startups and worked in various stages of companies. MakerDAO is officially now only going to be able to move at the speed of 1,000 person company rather than a 10 person startup. DAI has good liquidity and is the key MOAT, but let’s be clear here: it has in no way accomplished its mission on scaling out a full decentralised stable coin. $100m is very little relative to Tether and UDSC (in the billions). We’re going to start seeing many more teams attack MakerDAO until finds a model that works and scale rapidly. Lien is an interesting contender as they’ve gone down the anonymous path but their model has some big IFs to answer. In addition, a few other issues Maker should be solving but isn’t due to legal issues:

  • Creating more synthetic assets

  • Improving on the tokenomics of MKR

  • Creating more borrow demand to boost DSR (currently sitting at 0%)

I may sound bearish here but given my experience being on the ground in many situation, MakerDAO will more likely than not be able to ideate and innovate at the speed they need to.


Now that we’ve covered the main issues with MakerDAO, let’s look into what’s going on in Compound land. They recently announced they’re giving up complete control of the protocol to $COMP holders.

https://medium.com/compound-finance/compound-governance-decentralized-b18659f811e0

Let’s cut to the chase of what everyone’s really thinking, which people are actually going to get the tokens:

Distributing COMP

A collection of Compound’s most important stakeholders share the ability to upgrade the protocol:

  • 2,396,307 COMP have been distributed to shareholders of Compound Labs, Inc., which created the protocol

  • 2,226,037 COMP are allocated to our founders & team, and subject to 4-year vesting

  • 372,707 COMP are allocated to future team members (we’re hiring!)

  • 5,004,949 COMP are reserved for users of the protocol — we’ll be releasing more details of this plan in the coming weeks

  • 0 COMP will be sold or retained by Compound Labs, Inc.

COMP empowers community governance — it isn’t a fundraising device or investment opportunity. Until the decentralization process is complete, COMP will not be available to the public.

I created this little table so we can get a better idea of what’s going on here. Let’s go through them one by one:

  1. Shareholders. I don’t have the exact numbers but Compound has raised two rounds, one at $8.2m and the other at $25m totalling $34.2m. There’s obviously a significant difference in the valuations of these rounds but we can simply say that $34.2m worth of equity results in 24% of tokens. Compound is effectively saying their valuation is around $100m – $130m. In-line, roughly – except $COMP has close to no liquidity and will not be traded freely for a while since they want it to be a governance token not a speculative token.

  2. Founds and team have the same portion of investors, pretty surprising but I guess good on them. I thought I’d snoop around Etherscan a little to get a better breakdown: https://etherscan.io/token/0xc00e94cb662c3520282e6f5717214004a7f26888#balances

    #1 holder is the allocation for users at 51% of the supply. Now this is where it gets interesting. #5 is the option pool. There’s exactly 3 wallets that have more options than the option pool. My best guess is 2 are for founders, 1 is a large investor – probably a16z given they led the Series A. Each stake in this range should be worth roughly $5m-$10m.

  3. Option pool. Pretty significant and attractive for future hires given the value of these eventually liquid tokens.

  4. Users. This is probably the most interesting bucket of which I’m not sure what to expect yet. My best guess is that users who lock up liquidity inside Compound will get COMP tokens although that seems a bit boring, hopefully the team can do something really neat with this allocation so more people own $COMP.

  5. Compound Labs, Inc = 0. Obviously Compound has good legal council and has done this very deliberately to ensure they don’t have any liability, something which MakerDAO can’t really escape at the moment. To me this a clear signal that large crypto foundations are a relic of the past.


Competition

I think Compound has a much better shot at continually innovating and use their liquidity as defensibility to create even more value for users. However their real threat I think will ultimately come down from a token competitor such as Aave. This poll was pretty surprising for me to see tbh:

Aaave’s LEND token doesn’t have great tokenomics but is currently trading at a $30m valuation and has seen impressive growth (value locked up not price) in the past few months. If there’s a trade to make, it’d be to bet that LEND will ultimately reach value parity with $COMP. What else does Aave have going for them? Well I guess ChainlinkGod sums this up pretty well:

I don’t own any LEND at the moment but I’m seriously considering it and will write an investment thesis if it does make sense. I find the last point ChainLinkGod pretty interesting, “less captured by VCs”. Every token that is heavily captured by VCs always trades down and takes ages to come up mainly due to their illiquidity. Something like LEND poses a real threat simply due to the fact it has a much wider distribution and the casino is ready for anyone to play out – just buy the token off some exchange that has them. Speculators = liquidity = price appreciation.


Closing

This is one of my more opinionated and speculative pieces so take everything here with a grain of salt. However if there’s one thing that’s become clear to me in the crypto playbook it’s the following things:

  • Decentralisation is striving to satisfy ideology. It’s to remove liability.

  • Having a foundation is a terrible idea, don’t have one.

  • VC tokens are going to start competing with ICO/speculative tokens. Who wins will be something I’m very interested to see.

  • Protocol tokens will be available to those with liquidity. If there’s a time to be a crypto whale, now is the time. A few more DeFi protocols will be incentivising users with their native token in exchange for liquidity. Promise.

Once again, if you enjoyed this piece let me know or share!

Share

On The Radar: Lien Finance

https://defiweekly.substack.com/p/on-the-radar-lien-finance

How to create Immortal Options - Lien - Medium

Hello everyone! A new series I’d like to start here at DeFi Weekly is called “On the Radar” where I highlight the newest, exciting projects in the DeFi space. Many of these teams may be anonymous, unheard-of or still very early stages, regardless I hope DeFi Weekly is the place where you hear about them. I’ll keep these short and to the point.


High Level

Today’s piece is around Lien Finance, a stable-coin project that doesn’t require over-collateralisation and run by anonymous developers.

The basic idea works a little like this:

  1. Anyone can deposit 1 ETH inside Lien, and they get back two tokens. One is called a Solid Bond Token (SBT) and the other is called a Liquid Bond Token (LBT)
  2. The Solid Bond Token is meant to be a very low price of ETH which you can assume will be the lowest (big assumption, yes I know)
  3. The Liquid Bond Token is meant to be the remaining value of that ETH which is speculative and tracks the price of ETH less the value of the SBT
  4. A new stable coin can be minted by depositing the SBT
  5. On maturity of the bond, LBT holders will be paid out the amount of the LBT
  6. Users can hold SBT, LBT or both

LBTs can be leveraged in unique ways to create interesting derivatives/options and don’t require margin calls since if the price drops holders don’t have access to any ETH.

The native stablecoin of Lien is called iDOL and relies on being backed by SBTs. However, at maturity of these bonds SBTs are destroyed and redeemed. This causes a problem where SBTs with different maturity dates will be forced to resolve their positions. Lien solves this through aggregating all SBTs inside a single contract and requiring users to extend or renew SBTs. This parts seems a bit shaky to me and I’d need to know more about it.

In the case that ETH falls below the SBT value, the price of IDOL fluctuates. I spoke to Lien and their response to this is that their coin is more like an “Investment Trust model” rather than an ultra stable stable coin. If you want hard redemption guarantees USDC is what they would recommend you hold instead although it comes with centralisation risks.


Summary

Lien Finance has a radically new stablecoin design with some untested assumptions that we’ll have to wait and see how they play out. The team’s choice of being fully anonymous is a new trend we’re seeing in the space and I’m all for, provided the code is open source. The project makes many strong references to MakerDAO and being a superior stable coin with shade thrown at the governance in particular. Seems like the position to be the most decentralised stable coin will be one where we’ll see some very hot competition emerge over the next few weeks although not a lucrative one with limited upside. Why do I say that? As much as we love the idea of DAI, liquidity is still only just at $100m after 2 years where as USDC and Tether are well into the billions. Maker as a token is worth $500m and wildly exceeds the P/E of many other protocol tokens. Either this is a SV premium, decentralised stable coin premium or just uniquely overpriced. The valuation of Lien and many other stable coins like it will be good to watch.

Sidenote: I’d love to hear what you thought about this! Do you want to keep receiving updates about the latest projects, less detail, more detail? Let me know 🙂

Ethereum’s upcoming derivative primitives

https://defiweekly.substack.com/p/ethereums-upcoming-derivative-primitives

Thanks to all the projects who reached out from this tweet! If you’re working on a DeFi protocol feel free to email me and I’ll be sure to check it out 🙂


Ethereum has more and more financial primitives coming out. This piece is to educate what some traditional derivative primitives are and then the landscape of them in DeFi.

When talking about derivatives we often refer to one of the following:

  • Forward and futures contracts

  • Option contracts

  • Swap contracts

Below I’ll outline what these are and how they’re being mapped back in Ethereum.

I’ll be saving synthetics for another day since there’s a lot happening and one article doesn’t do justice!

Forward and future contracts

A futures contract is a way for:

  • A buyer to acquire an asset on a particular date in the future

  • A seller to sell it at whatever price of the asset is at that date in the future

You can also have futures for one type of asset, but settled in another. For example, you might have ETH futures that settle in USD instead of ETH.

A forwards contract is similar to a futures contract except that the forward contracts are customised based on certain characteristics such as:

  • The number of units

  • An acceptable grade/parameters

  • The place where assets are to be delivered on settlement

  • The time interval to deliver the goods at expiry

In the realm of crypto, the settlement part of this equation is highly efficient since it’s just computers pointing and transferring to wallets. There are no physical settlement risks.

On December 10, 2017, CBOE Futures Exchange launched the first ever Bitcoin futures market. There’s currently no on-chain futures market available in DeFi. Some novel forward/futures that exist or would be neat if they existed:

  • Electricity futures for crypto mining as they help miners hedge risk

  • Lockdrop futures for trading an asset before it’s available and settlement happens when the asset is available. You could probably do the same for illiquid ICOs if there was a market large enough

As per my current understand, the main DeFi players operating in the futures field are as follows:

  • https://www.futureswap.com/ – AMM-based futures with up to 20x leverage on-chain. It looks like they’re in alpha stage at the moment and that Ric Burton is shilling them 24×7. To me this seems like the next generation of degen like on-chain speculation.

  • https://mcdex.io/ – futures exchange with no KYC. This looks like a fairly polished product that is live and in production, doesn’t get much CT hype though. Maybe the builders are too busy shipping.

Option contracts

Through the past month or two we’ve seen a massive surge in options in DeFi! Options are similar to forwards and futures, except that the buyer has the RIGHT but no an OBLIGATION to purchase the asset at a date in the future.

Depending on who has the optionality at the time of expiry, we call it a put or call.

  • Calls are the right to acquire an asset at a certain price in the future

  • Puts are the right to sell an asset at a certain price in the future

Example 1: I buy a call option for $155 with the strike price being $150. That means that if the price of ETH goes to $200, I can acquire ETH for $150 and profit $45 (not $50 because I paid a $5 premium for the call).

Example 2: I buy a put option for $155 with the strike price being $150. That means that if the price of ETH goes to $100, I can sell ETH for $150 and profit $45 (not $50 because I paid a $5 premium for the put)

Because the counter-party of the option is giving the right, but not obligation, to the seller – they charge a premium. Futures/forwards don’t impose this premium since both parties have an obligation at the time of expiry.

The first use cases of options are insurance, although it’s now shifting to price speculation as well. Three contenders make up this space at the moment:

  • Opynhttps://opyn.co/#/

    • In essence, Opyn is an options protocol that started off with selling puts to provide insurance against users losing stable coins deposited to DeFi protocols. The idea is simple, a put seller will sell the right to claim $1 for $1.05. This means that you’re effectively paying 5% for insurance. Since then Opyn has moved into selling generalised options for price speculation.

  • Nexus Mutual https://nexusmutual.io/

    • Nexus Mutual’s core value proposition is insurance, however it acts like an options protocol, except you don’t have the right to exercise your options. What does that mean? Well NXM is the native token of Nexus Mutual and is a claim over the capital in the pool. All the capital in excess of the amount to make payouts according to their prediction model is owned by NXM holders. In this sense you’re purchasing an option but NXM token holders have the right to determine whether to pay you out or not. Of course it’s in Nexus Mutual’s best interest that they pay out when hacks happen, although the subjectivity of hacks is up to NXM holders at the end of the day. I’d be expecting Nexus Mutual insurance to become cheaper in the future.

  • Hegichttps://www.hegic.co/

    • Hegic is also another options protocol, however what makes it unique is the fact that it’s run by an anonymous founder by the handle 0mollywint3ermutz. The site is pretty primitive, contracts are in beta, however I wanted to mention it since this will be a project to keep your eyes on due to the lack of legal boundaries this can go. Options for securities and other risky assets, I’m sure Hegic will happily do something as risky as that.

Other honourable mentions:

Swaps

The simplest way to think of a swap is the exchange of cash flows at prespecified terms in advanced. In the traditional world, a company might create a bond that pays LIBOR + 1.5% profit. In order to make their interest payments more predictable, they might enter into an agreement with another party that pays a constant, fixed amount of interest (say 5%). If LIBOR increases above 3.5% then they’ll be safe guarded since their interest payments are fixed at 5%. If LIBOR decreases below 3.5% then they’ll be losing money since 5% will be greater than the actual payment required. The simplest way to think about it is that you’re speculating on the interest payments rather than the value of an asset.

In the case of DeFi, the most wished-for liquid swap market is a fixed vs variable swap market for DeFi lending rates.

As of this time the space around DeFi swaps is pretty limited. The two projects I could find in this space were:

  • https://umaproject.org/ – is more than just synthetics but can also do swaps. Not live yet but apparently will be later on this year.

  • https://swaprate.finance/ – pretty early stage. Tried using it but the interface was unfortunately too hard to use.

Liquidity is most likely the biggest bottle neck and buyers and sellers on both sides can’t make strong bets on what they think will happen in on-chain lending markets.


Closing Up

I’ve been really excited to see the pace of innovation happening across the board with all of these DeFi protocols. It’s quite easy to dismiss many of them given the stage they’re at although as we see the world adopting stable coins for the improvements they bring in transporting and using US dollars things are going to get heated very quickly. We’ve already crossed $10b+ in stable coin market cap, I don’t expect this to slow down anytime soon.

I wanted to go into synthetic assets, which are usually a mix of many derivatives however this piece was getting a bit too long. Flick me a message if you’d be interested in seeing this piece come out eventually.

Automated Market Makers: The Next On-Chain Battle

https://defiweekly.substack.com/p/automated-market-makers-the-next

Hey all, apologies for missing last week’s DeFi Weekly – corona’s been quite a throw off from the usual schedule although I’m back now. This meme sums up quarantine perfectly imo:


So what’s been going on, well I think two key developments which you’ve probably heard of but I’d like to unpack a little more: Uniswap v2 and Balancer’s seed round.

The TLDR of Uniswap v2 was the support for ERC20 pairings, new infrastructure for price oracles and a key highlight being “path to sustainability” aka monetisation. I was probably 75% sure this would happen but still had some doubts. Anyways it’s happened and is more like a switch, that when flipped activates a 5 basis point cut going directly to the Uniswap entity. As per the blog post, this would have generated $830k without any additional growth which I found pretty surprising. Increasingly we’re seeing protocols on Ethereum generate somewhat decent revenue figures and growing by the day. Synthetix has generated close to $9m and MakerDAO $1.4m (massively on the low side).

One area which I think Uniswap v2 failed and will lose market share on is a flexible pricing structure. For example, Curve Finance charges 0.04% on stable coins where as Uniswap is still at 0.30% (+0.05% eventually). Having a structure where pool deployers can charge their own fee or even a dynamic fee schedule (early adopters get more compared to later adopters) would be a massively great feature to bootstrap liquidity. Maybe there’s a technical limitation as to why this can’t be done. Ultimately a trend we might see playing out is different AMMs for different kinds of tokens. Uniswap captures the core Ethereum community mindshare, although there’s more groups outside that aren’t as loyal and will be more price sensitive with other priorities.

Final point about the v2 blogpost, expected launch date = Q2. I mentioned this in a previous edition but it would be that the best time to launch a Uniswap competitor is right before the launch of a new version since v2 has to re-build liquidity from scratch…

Well this happened just a week ago:

Now that they have fresh new round in funding I’d be thinking that the launch of Balancer and Uniswap will be largely the same. Usually startups kill themselves rather than killing others however in this case both teams are most likely going after the same pool of liquidity that’s already on Uniswap v1. Of course Uniswap will have a stronger pull on its existing users and brand trust, although if there’s a sweeter deal around the corner with an equally good product then Balancer might be a pretty good option. Thinking out loud here, but I’d think Balancer could do a few things to pull liquidity over:

  • Offer close to 0% fees for the first X amount of liquidity that enters the platform

  • Paying LP fees out of pocket until they generate meaningful revenue

  • Providing initial liquidity to a pool that’s in high demand (steal Curve Finance’s market share in stable coins)

  • Lining up as many influencers as they can to shill them once they launch before Uniswap (this is more of a softer tactic and will have less effectiveness since Balancer’s investors are separate to Uniswap).

Go to markets are becoming increasingly important in the DeFi space since existing products are starting to gain traction at a decent rate. One emerging trend we’ve seen over the past few weeks is with stable coins gaining traction as people look into buy into the market. To me Balancer’s ideal go to market strategy would be focusing on a combination of all the tactics with the highest priority being going after Curve Finance’s stable coin dominance although whether they do or don’t is to be seen.

I’d love to provide more insight as to what makes Balancer unique although I don’t know enough about the technicalities around the system, open offer to anyone at Balancer to walk me through and I can publish a DeFi Weekly article about it!

When looking at both Balancer and Uniswap, they both have similar setups as in they’re both US-based teams that have gone down the traditional equity model for raising money (which makes sense given their circumstances). Where I think both of them will see a dark horse competitor emerge is one with a token that can use the token to intelligently incentive liquidity to deposit money inside the pool itself and capture fees into a token.

Why? Because there’s a strong niche of investible tokens that people can speculate on. MKR, KNC and SNX are probably the top picks at the moment in the market given they have teams who are consistently executing. Compound is launching their token as well but will lack the same speculative pull due to the very limited distribution of the token to existing share holders and their unwillingness to lose control. I’m sure Balancer and Uniswap have an eventual model of becoming tokens although given their setups it’s going to be a long path. Many people like the model of starting off with an equity company then gradually “decentralising”, although I’m personally not convinced taking an easy path out at the start is beneficial in the long run. Tokens are only as good as their distribution and community. The larger your community, the more of an ecosystem you can build since everyone is invested in the token’s success. MakerDAO is probably the gold standard when it comes to seeing this playbook being executed. Equity companies that transition to become token have a long list of hard and tedious things to do, such as:

  • Ensure seed investors can make “venture style returns” through sustained ownership (less incentive to sell tokens)

  • Provide sufficient mechanisms for investors to exert control over the protocol/team to do what they want

  • Be legally compliant for the sake of LPs and other equity share holders

  • Figure out a way to get a meaningful amount of tokens in the hands of more people without doing a token sale

It’s not that these challenges are impossible to solve but will require time and experimentation to get right. Compound will be the first trail of this, UMA will also provide an example for teams to look up to. Also it’s to be seen if product network effects translate into token network effects. My best prediction for these tokens will be that they’ll exist but with very poor liquidity and in the hands of SV elites. Exchanges and market makers won’t be excited to deal with the token and neither will retail. Sure that might sound good but at the end of the day, it’s retail speculators that make your token valuable and liquid. Without them your tokens aren’t really worth much :sadface.


Anyways, that’s a wrap for this edition. I’m cheering from the frontlines for both teams as they ship in this time. I don’t have any vested interest in any of them doing well so you should hear pretty balanced opinions on both sides.

Once again let me know if there’s anything you strongly disagree/agree with in this piece!

Peace.

Movers & Shakers: Camila Russo

https://defiweekly.substack.com/p/movers-and-shakers-camila-russo

Hey everyone, I’m starting a new content series where I publish transcribed interviews with some of DeFi’s top and upcoming names. This will be in addition to all the usual content I publish. Today’s interview is with Camila Russo from The Defiant.

Image result for camila russo


KK:

What were you doing in your pre-crypto life and what excited you about Ethereum in particular?

CR:

Sure. So in my pre crypto life, I was a Bloomberg reporter covering markets for around eight years. I started as an intern in New York then I went to cover Argentine markets with Bloomberg. 2013 was the first time I wrote about Bitcoin in Argentina. I was seeing how people there were using it to protect against inflation and that got me super interested in cryptocurrencies, but it didn’t get another chance to write about them until I was back in New York in 2017 and started kind of covering the crypto bubble and ICO boom. In early 2019, I left Bloomberg to finish a book I was writing on Ethereum – the infinite machine. When I filed the first draft of my book, I started The Defiant.

KK:

What made you start The Defiant? What’s the founding story around it?

CR:

So I, guess like going back a little bit, the reason I dove into Ethereum in the first place was because at the end of the 2017 I decided I wanted to write a book on crypto. I had always wanted to write a book and I knew it had to be nonfiction. I had always looked up to Mike Lewis and nonfiction writers who were able to turn every day or super complicated topics into entertaining writing. I knew I wanted to write that type of book and was waiting for the right story to come up. And so in 2017 I was like, okay, there’s a story here somewhere. Like what just happened? It’s crazy. It’s fascinating.

CR:

To me Ethereum was like a big story that hadn’t really been told well in much detail, like the founding story of Ethereum and the history of the early days. To me I saw Bitcoin wanting to be peer to peer money while Ethereum wanted to be peer-to-peer, everything. And that was super interesting. ICOs showed us first glimpse of the potential. Of course there were scams and everything, but it just showed that, okay, this can actually work as a super flexible platform for people to just like build whatever they want.

CR:

Ethereum was actually arguably succeeding at what it set out to do. That’s why I thought, okay, like this is an important story to follow. I started writing the book and then researching the book. I saw the decentralized finance space emerge. And to me it was just amazing. Like it was the middle of a bear market and still there was all this activity going on in crypto and it felt like crazy that nobody was paying attention to it. Like here it was like the cypherpunk dream. Um, you know, like there’s actual like financial obligations that are working that are transacting real money and you know, it’s, it’s actually here, you know, a way to transact money across borders in an open way, available to anyone and it’s working, it’s happening. And like nobody was paying attention and like few people were covering it. Even crypto media outlets were asleep at the wheel. So I was like, okay, this is a huge opportunity to become kind of the information platform and I’ll start with just like a newsletter saying what’s going on in this space every day.

KK:

Arguably that bet’s paid off! I consider your newsletters to be one of the premier ones in the space.

CR:

Oh, thank you. Thank you for that. Yeah, definitely played off!

KK:

Yeah, no, for sure. I guess after writing hundreds of editions what are some trends and observations you’ve seen from interviews or pieces you’ve written so far?

CR:

It’s hard to find that trend with like so much going on, but, um, I think just like, eh, recently it feels like the pace of innovation is accelerating from an already kind of fast base. It just feels like it’s really gaining momentum and we’re seeing kind of these combinations five platforms create another five use-cases. I mean, that’s kind of a expected result though. Compostability and money Legos. With the recent bZx exploits, it feels like, okay. So there’s not just like a lot of experimentation in, in building, but there’s like also a lot of experimentation in attacks and exploits.

CR:

I think that’s something new that we hadn’t seen in kind of this so far. It was like these two flash loans and then, I saw like this tweet about like a potential like exploit to Maker using flash loans and then Ameen posted something that he’s going to create a DAO to enable these types of attacks. Somebody says, why don’t we, um, redirect interest? And then there’s like five different ways of doing that.

KK:

Completed. It’s very crazy industry. But like, I think with especially the recent bZx exploit, there’s a function of the community within it raising concerns. Whether it’s bugs, practices around keys, development procedures or how decentralized is something in the control points protocol owners have. What do you see is your role in a self-regulating DeFi because there is an opportunity. There’s never going to be any like hardcore regulation due to the nature of the technology.

CR:

Yeah, I think myself and you know, other communicators in this space, like you and many others, I think we actually have an important role in the industry to kind of help people navigate this crazy space. We need to explain how this stuff works. I wouldn’t want to overstate my own role, but I’m talking about kind of media as a whole have an important role in helping users stay safe.

KK:

I think it’s a role which no one’s really ever seen before because I would imagine things like CoinDesk or the larger publications, they have their own competing interests and they don’t get the technical details right they don’t have either engineering competence or they have to outsource their technical due diligence and the person they’re outsourcing through has their own agenda. In the DeFi space, we’re at a time where we’ve got tech, we’ve got money and there’s no regulation to bank on. It’s just people in the world trying to keep things together.

CR:

Yeah. It’s pretty crazy. I think it’s because it’s such a young space, but you get kind of those issues where, journalists aren’t necessarily technical and it takes time to really understand how this stuff works. It takes time to build kind of the right sources that you can call up and ask when you don’t understand something. You know, all of the things you maybe already had figured out in traditional crypto, you have to kind of re-learn for DeFi. So yeah, and same with regulation, like nobody knows. The space is still in like this gray area because it is so, so young. I think these things will improve with time as the space matures.

KK:

Yeah, right now we’re kind of at that stage where if someone sees something, it’s kind of like you have to speak up about it and hope that the change happens. I always think if there is a better way to improve or regulate the space in a self regulating way, it’s like the ultimate, test of can you have self-regulating financial markets?

CR:

Yeah. Maybe, I don’t know. Maybe potentially there can be some like organization or like nonprofit who takes on that role and who has like maybe they can have contributors, rating projects or like filling in what the risks are or investigating. It has to be a trustworthy institution that doesn’t depend on any like single, government, which the space can kind of depend on for that type of information. I don’t think there’s anything like that yet.

KK:

It’s something worth thinking about. So where do you see The Defiant, as a brand, moving in the future?

CR:

I have big plans for The Defiant. I want to build it out into more than a newsletter and have it become an actual media company that’s hopefully the place people go to fo news about decentralized finance. Eventually beyond decentralized finance and into the decentralized economy! I believe DeFi is going to shape the future of finance. I think it’ll take a broader share from the fintech market share. It will become an increasingly important industry. But I think as a whole, the broader economy will start to become, more decentralized. I think that’s a trend we’ll see more, from DAOs to the economy becoming more decentralized. I want The Defiant to, to cover all of that. I do want to help in self regulating, but as a kind of a consequence of it being the place people go to for real quality information.

KK:

Amazing. What is, say, a futuristic headline, which you imagine from the decentralised economy?

CR:

I’m sure we’ll see like some like really crazy stuff down the line. Like we’re, we’re kind of already seeing it now and it’s just like really early on.

KK:

Yeah. Like a 2,408 ETH for a day’s worth of work isn’t too bad. Right. It’s crazy. That’s life changing money for some people. So. Yeah, it’s definitely insane. But, I guess before we kind of wrap up, is there anything else that you’d like to add or share with the readers over here?

CR:

Something I had been thinking about recently was you how DeFi is already better than then most FinTech apps, I think we don’t tend to think about that. Of course, like many things, have to be improved a lot – like security as we saw with the recent exploits. But, I mean, I like the user experience. The way people can interact with these apps is already easier and more seamless than what you can do with traditional finance. I think that’s remarkable for a space that’s so young and dealing with such like cutting edge technology.

KK:

That’s really good. So what’s an example of this that you’ve kind of seen so far?

CR:

I mean, just like the idea of opening a savings account on DeFi. It just takes like two clicks, you know what I mean? Once, once you have ETH you can exchange it for any token and that’s it. I think that’s really cool and it allows you to, to implement these like sophisticated trading strategies, become a market maker and more. Again, it’s like one click, you know, it’s amazing. It’s like, it’s so cool and, and I just love the whole thing not having to login, not having to give my credit card information, not having to do anything cumbersome.

CR:

Nobody has my data. It’s also just the fact that it’s accessible to everyone. I mean, I’m, I come from, from South America, and, people in Argentina don’t usually have access to this stuff. They don’t even have access to like Acorns or stuff people use in the US to make savings easier. They don’t even know what those things or those apps are. DeFi though, I can tell any of my friends try. The biggest hurdle is still getting from Fiat to crypto. That’s one thing in my opinion that needs to be solved for adoption to be faster.

KK:

That’s a really nice to take on the real impact this all has. Also, I just remembered that I wanted to ask you one really difficult question. Are you ready? Is ETH money?

CR:

Oh, yeah. What a difficult question. It totally is.

KK:

That’s all we needed to know. Thanks so much for your time.

CR:

Awesome. No, thank you. It’s been fun.

DeFi Audit #1: Synthetix

https://defiweekly.substack.com/p/defi-audit-1-synthetix

Hello DeFi’ers, today’s edition is a more technical analysis that I hope you enjoy! It takes a non-trivial amount of time to write these so your support is highly appreciated 🙂

Share


I did a poll around what people wanted to be the first DeFi Audit for and by a large margin people wanted to see what was going on with Synthetix.

Before I get into the nitty gritty details, it’s probably worth taking the time to understand how Synthetix works underneath the hood and what really makes it function.


Basics

Synthetix allows you to generate any asset (currency, gold, stocks etc) by using their native token SNX as collateral. A large benefit of this is that you don’t need to go through the process of bringing those asset on-chain, but rather you can deal with a synthetic representation of them. MakerDAO is also a synthetic asset protocol where ETH is the underlying collateral and DAI is the synthetic US dollar produced.

Should the value of the SNX used to generate a synthetic asset drop, the minter must add more SNX to take back their SNX. This is similar to the way MakerDAO works except with Maker you lose 10% of your ETH collateral.

Here’s a small example of how all of the above pieces together:

  1. I’m a user with 750 SNX tokens (priced at $1.00)

  2. I deposit my 750 SNX tokens to generate $10 synthetic-US dollars (750% collateralisation ratio required)

  3. Should the value of SNX drops to $0.90 and I want my SNX back, I’ll need to deposit $0.90 of sUSD to close this position out.

So far so good? Great. Now the next question is why would anyone purchase and hold SNX tokens to begin with – what’s in it for them? I’ll explain below.

  • Inflation based staking rewards. By minting SNX assets, you effectively become a staker of the protocol. Because of this, you’re eligible to earn more SNX tokens that come out of the inflation of the protocol.

  • Exchange trading feeds. Every time someone transfers a SNX-based asset they have to pay a fee. The aggregate of these fees can be claimed by stakers in the protocol.

  • Uniswap LP rewards. This is part of the first point but is important to note: anyone who mints sETH with SNX and provides liquidity for the sETH and ETH liquidity pool on Uniswap receives additional rewards. This is extremely important as it maintains price parity between sETH and ETH creating a liquid gateway between all of Synthetix’s “synths” (synthetic assets).

One of the final pieces to understanding how the Synthetix puzzle works is understanding the cost of minting an asset. In MakerDAO you have the notion of a stability fee which is set by MKR holders on an irregular basis. Synthetix has their own spin where you’re actually in competition with other traders.

  1. John uses 7500 SNX to mint 100 sUSD.

  2. Jill also uses 7500 SNX to mint 100 sUSD

  3. The network now has 200 sUSD worth of debt, where John and Jill account for 50% of the debt each

  4. John decides to be a degen trader and purchase 100 sLINK (worth $1 each) with his sUSD (on which he’ll pay trading fees for)

  5. Now the price of sLINK actually increases to be worth $4 each so John’s 100 sLINK represents $400 worth of value and Jill’s position is still worth $100 (sUSD)

  6. The network’s total debt is now worth $500 in total. Since John and Jill are responsible for 50% of the debt each, John owes $250 to the network and Jill also owes $250 to the network

  7. The difference between John and Jill is that John made $300 from the price appreciation so he’s up a pure $150 ($100 + $300 – $250) while Jill is down $250.

Synthetix’s term staking can be quite misleading in this way since it’s actually just a incentivising people to open a trade position while taking on the risk of debt accumulating. There are no free lunches.

Note: you can trade synths without holding SNX or ‘staking’.

Let’s jump in and do a run down of Synthetix against various criteria.


Ownership Structure and Admin Keys

Synthetix has one of the most complex DeFi architectures I’ve come across till date with a very heavy use of proxies throughout. Proxies are a way for someone to point to one address, but execute the code from another contract. Think of it as a placeholder that executes code on behalf of something else.

Below is the high level architectural overview of Synthetix’s smart contracts and ownership structure:

There’s quite a lot going on here but don’t worry, I’ll be breaking it down as usual.

Starting off, every interaction with the Synthetix ecosystem is the Proxy.sol contract which has the address: 0xC011A72400E58ecD99Ee497CF89E3775d4bd732F. The two key properties of this contract are the targetAddress and the owner. Owner is self explanatory, however the target references the smart contract which all calls are essentially forwarded to. In this case the target is Synthetix.sol which you can think of as the core of the system (and the token tracker). Owner has the ability to switch the entire implementation of Synthetix’s contracts at will which can let them do literally whatever they want. This isn’t anything new but I didn’t think that the entire system’s implementation can be changed at will. Some architectures use proxies in certain places which give users guarantees about what can and can’t be changed.

Synthetix.sol (0x8454190C164e52664Af2c9C24ab58c4e14D6bbE4) is the brain that orchestrates all interactions within the system itself. It has a few responsibilities:

  • Keeping track of all synth token balances

  • Listing all the valid synth addresses inside the system

  • A resolver to fetch the address of any contract in the ecosystem

This contract has the same owner as Proxy.sol as well. However it has a peculiar variable called selfDestructBeneficiary currently set to 0xde910777c787903f78c89e7a0bf7f4c435cbb1fe. There is a 28 day time delay before this beneficiary can receive all assets, however it strikes me as a particularly odd thing to include in. Furthermore, 0xde9 is just an ordinary Ethereum address with no multi-sig. It’s basically someone’s ledger.

I guess the bigger point here is who is the owner and how does it work? The address for the owner is 0xeb3107117fead7de89cd14d463d340a2e6917769 and is another Proxy contract. I couldn’t view the implementation on Etherscan directly (due to the proxy) so I wrote some code to get the results directly

The results are as follows:

➜ node snx.js  Owners: [   "0xa331986ec34E103D567937B293FF8103330FEAda",   "0x9dDD076E9073732eB024195eb944E7eC7149bAF6",   "0xD7e5c7eC37cDe3f42597A5018E9320070c288b82",   "0x285669F472db908531Ed868B92FC0A39EF60D739",   "0xDe910777C787903F78C89e7a0bf7F4C435cBB1Fe",   "0x49BE88F0fcC3A8393a59d3688480d7D253C37D2A",   "0xb0A23F40De7F776A4f20153e8995eD3E7D7c8487" ]  

Threshold: 4 

The good news here is that there’s 4 addresses that are required to make changes to the main contract.

The bad news here is that there’s no time lock so if everyone signs off they can make the change instantly.


Code Quality

Architecture

While I do appreciate small touches like having an on-chain address registry, I strongly dislike the complexity and upgrade controls proxies introduce into a smart contract system. Synthetix’s entire architecture heavily relies on proxies. From an integration point of view, it means that the Synthetix system you interact with one block might actually look completely different the next block (if they push an upgrade). Other protocols might have upgrade controls implemented but you know which specific parts of the system can be upgraded since the contract you’re interacting with will never change, only certain bits of it. This is when you make your code highly modular and admins can replace different modules within their system instead of replacing the entire system. Using a proxy architecture lets you defer that decision all together and just ship quick with complete control.

Even the tokens have their own proxies that they’re deployed behind. I can understand the desire to make complete upgrades but if you have 1 proxy for every contract you’re probably overusing them in my personal opinion. I’ll cover other architectures in the future where they achieve similar upgrade benefits through more elegant, simple proxy-less structures.

Documentation

One area which I was highly impressed with was Synthetix’s documentation. They’ve got diagrams showing inheritance structures, easy to access contract addresses and plenty more which you don’t usually find from DeFi teams. While writing this guide, their documentation was able to assist me quite a bit in understanding how their system work in general.

Unit Testing

From digging through their code, it looks like they do use tests but one thing which stood out was that their tests are integration tests, not unit tests. The difference being that their tests check to make sure things work, not that they can work/defend against malicious or unintended inputs. Synthetix is more onto it with getting audits for major deployments, although my general feeling is that there’s probably an exploit out there some where since audit companies are 80% effective at best. Show me a smart contract exploit and I’ll show you the company who gave an audit.

General Commentary

I’m being a bit opinionated here but I found Synthetix’s developer tooling to be just okay. Their Javascript library relies on JSON ABI files to be updated rather than using Typescript typings which provides integration guarantees. Set, dYdX & 0x use Typescript and to great benefit. Their Javascript library doesn’t have extensive testing to ensure that any ABI changes are breaking throughout their system. It’s not a major deal but tells me more so about how much a team cares about developer experience and the ease of which to integrate their smart contracts in an external system.


Liquidity Analysis

The two largest Uniswap pools at the moment are ETH/SETH and ETH/SNX. ETH/SETH is the size it is mainly due to the Synthetix inflation rewards that grant users more SNX tokens for providing liquidity on Uniswap.

However this is where I realise that Synthetix’s model isn’t really sustainable in the long run unless they manage to overcome some really hard challenges.

  1. As noted earlier on, Synthetic assets are kind of guaranteed to have the collateral they claim since there’s no liquidations – only debt that needs to be repaid. The system faces potential under-collateralisation issues (although at 750% it’s quite far away). Future SIPs propose to fix this issue although implementation is to be seen.

  2. Holders of Synthetic assets are holding something that isn’t exactly redeemable for stable collateral. Should the price of SNX start dropping rapidly, many positions start becoming undercollateralised and even if you could redeem SNX it would be facing a bank run of sorts.

Due to staking incentives, only 20% of SNX supply is not actively being staked which begs the question that how will organic, healthy liquidity originate elsewhere if most of it is being sucked up? Remember: you actually need healthy demand for SNX outside of an incentive mechanisms for the synthetic assets to have true value.

I hate Coinmarket Cap just as much as anyone else but even their unreliable data gives the following data about Synthetix’s liquidity OUTSIDE of Uniswap.

The point I’m trying to make here isn’t that Synthetix is doomed, but rather that it needs a few things in order for it to truly succeed as a Synthetic asset protocol:

  1. SNX to appreciate in price and gain liquidity outside of Uniswap or other incentivised mechanisms

  2. SNX will only derive value/demand if it can generate trading fees large enough for people to care ($7m has been earned till date which suggests some chance)

  3. Trading fees will only be accrued if people open synthetic positions, trade them and actually use the synthetic asset for it’s intended use case

  4. People will only treat the synthetic assets as a MoE if they hold value or perceive that it holds some sort of value

  5. Until SNX gains liquidity, people won’t have confidence to hold synths and neither will other ecosystem participants list on other exchanges.

Unless you noticed this is essentially a difficult chicken and egg problem where you need both to truly succeed. Maker avoided this issue by using ETH as the complete collateral base. Synthetix is taking cues by introducing ETH collateral but the tension always lies in the fact that token holders will want more SNX than ETH to ensure SNX can become more money-like.


Oracle Analysis

During the early days of Synthetix, an oracle went down and someone used it to mint 37m SNX. This was a large shake up in people’s confidence however the team aggressively moved to using Chainlink oracles instead.

https://www.theblockcrypto.com/linked/28748/synthetix-suffers-oracle-attack-potentially-looting-37-million-synthetic-ether

While I would like to do an analysis on Chainlink, that’s out of scope for this piece. The team does run some of their own oracles which you can view directly over here: https://developer.synthetix.io/tokens/

It’s essentially just one address that publishes prices to a smart contract and updates it. I’m not sure the opsec would be on these but we know for sure it’s connect to a hot wallet. In Synthetix’s case having multiple private keys internally that are connected to the internet is a massive danger. I’ve faced this issue working as a developer in places I’ve worked but unfortunately there is no good answer at this point in time. My only recommendation to the team is to slow down and figure out a more robust opsec procedure before adding another 10 centralised oracle price feeds to your network as Synthetix will eventually become a CEX honey-pot. The team does have an aggressive roadmap they’re trying to achieve, hopefully they know when to slow down, focus on the base and when to aggressively ship.


Insurance Liquidity

At the moment, neither Nexus Mutual or Opyn cover Synthetix’s contracts. It’d be good if down the line part of inflation rewards could be used to seed liquidity into providing insurance for Synthetix users in the case of a default. This may give more confidence to users about the viability of holding SNX or synths.


Wrapping Up

This marks the end of my deep dive into Synthetix and my findings after a deep dive into it. Overall, Synthetix is clearly a pioneer in the DeFi space with some highly unique and effective strategies towards ensuring a token can be an integral part of an ecosystem while capturing value.

The main challenge moving forward is whether the system can create synths which people want to hold, use in commerce or other non-speculative uses. Till date the team has made some very impressive pivots (from Havven) to the model they have today. I wouldn’t write off the model although, I would say, the challenges they’ve got ahead aren’t easy to solve!

My favourite part of this review was probably seeing the extensiveness of documentation and guides written for a 3rd party developer to understand how the entire system works and operates. Assuming they solve many other issues, I’m sure many other developers will come to appreciate this in due time.

Once again, hope you enjoyed reading this piece. Please feel free to reply directly to this email or reach out on Twitter about what you thought!