Episode Summary: Synthetix: The Derivative Liquidity Protocol

Infamous for their role in the 2008 financial crisis, synthetic assets are a wrongfully maligned financial instrument that actually provide real world value. Simply put a synthetic asset is simply a combination of assets, usually some mix of options, futures and swaps, that attempt to track the value of another asset, typically not available to trade through traditional means. A fairly common synthetic asset is an inverse ETF, an asset that attempts to have an inverse relationship with another ETF. You can’t really buy negative shares, so instead you buy an asset that has attempts to mimic the inverse performance of an ETF.

This type of synthetic asset allows people to create more value from a specific asset’s performance than is traditionally available. This is especially valuable in the DeFi space as the availability of synthetic assets on Ethereum enables individuals to create complex financial instruments and contracts that depend on assets that may not be traditionally available on the blockchain. A fairly simple example is you can have a synthetic Litecoin on the Ethereum blockchain that you can trade for and interact with on Ethereum instead of having to go to an exchange, deposit Etherum, create a Litecoin wallet, and make the trade. The development of synthetic assets on Ethereum cements Ethereum as the DeFi blockchain of choice and enables the development of a more mature financial market that more closely resembles traditional markets. 

Built from the backbone of Havven, a decentralized stablecoin, Synthetix gives people the ability to trade assets traditionally on the Ethereum blockchain. This can be everything from other cryptocurrencies such as Bitcoin and Dash or something not even available on any blockchain like USD or gold. There are two main users to Synthetix, stakers and traders. Traders are any type of physical user or smart contract that wants to use the exchange functionality of Synthetix. They need to trade Ethereum for some sort of synthetic assets like BTC and gold. They approach a trading contract, or more likely some sort of exchange aggregator like 1inch and exchange Ethereum for their synthetic assets like sUSD or sBTC. In exchange for providing this functionality Synthetix takes a fee. If it’s an actual individual, then the transaction is done. If it’s a smart contract, they can then leverage the exchange as underlying functionality in an app or a more complex instrument.

On the other hand we have the stakers. Stakers approach the Staking contract and stake SNX, Synthetix native token, in exchange sUSD or some other synthetic asset. In exchange for staking they get a proportion of the exchange fees and other liquidity rewards. Through decentralized oracles, Synthetix keeps track of the price of the actual assets and if the price rises or falls, it releases or demands more SNX from individuals who staked, i.e the debt pool, proportion to how much of that synthetic asset there is to begin with. In other words, all the stakers collectively are responsible for providing more or less SNX if the price of one of the assets that backs a Synthetic asset rises or falls. This is better than individually backing assets as it distributes risk. However since the debt pool is shared, creating new synths is not a trivial process. There are a number of methodologies for new synthetic assets but all of them are community driven and must go through rigorous evaluation processes. 

Synthetix is constructed on the Ethereum blockchain and has various differing ERC20 tokens and smart contracts. At a high level the base components of Synthetix is the base contract, ERC20 Synths and the various contracts surrounding them, arbitrage contracts and Uniswap, the inflationary pool, and the fee pool. 

High Level Architecture Diagram: Synthetic Docs 

Part of the reason why the logic and state management is divided into so many contracts is to manage smart contract size. Ethereum limits smart contract size to 24 KB, yet each external contract call costs gas. So implementing complex behavior like managing state and logic on the blockchain is a balancing act, weighing gas costs and complexity against the smart contract size. Another consideration when building Synthetix was how to integrate into the extensive developer tooling that has fairly recently become mainstream in the Ethereum ecosystem. Though lacking when compared to traditional web development or software engineering, Ethereum development has the best developer ecosystem and community of the various blockchains. Companies like Hardhart are always working to increase developer productivity and provide a development experience like traditional software development.

Synthetix is rapidly becoming a staple in the DeFi community. Exchanges and liquidity pools like Curve are using it to reduce slippage when then exchange between multiple assets. Crypto hedge funds like dHedge are using it to reduce risk through exposure to inverse Eth and various other Syths and of course individuals are using it to gain exposure to assets not natively available on the blockchain. The company surrounding Synthetix, or more accurately the DAO surrounding Synthetix, is committed to building the protocol even further and integrating with future features of the Ethereum blockchain, like layer two scaling solution.

To listen to the full interview on Synthetix with Justin Moses, click here.

 

Ashvin Nihalani

San Francisco, CA
Education: B. Eng, EECS, University of California

Originally from Texas. Graduated from Berkeley with an B.Eng in EECS. Interested in basically anything, well anything interesting. More recently focused on Machine Learning, Blockchain, and Embedded Systems.

Software Weekly

Software Weekly

Subscribe to Software Weekly, a curated weekly newsletter featuring the best and newest from the software engineering community.