DeFi Science: In-depth understanding of how Synthetix plays with synthetic assets
Original link:
https://defiweekly.substack.com/
Original link:
Original Author: Kerman Kohli

Translation & Proofreading: Cortex (CTXC) Operations Team
Fundamental
Fundamental
Synthetix allows users to generate any asset (including currency, gold, stocks, etc.) through the system's own native token SNX as collateral. A great advantage of this is that there is no need to introduce these off-chain assets (including currency, gold, and stocks) into the chain, but only need to process these synthetic assets. From this perspective, MakerDAO is actually a synthetic An asset protocol where ETH is the underlying collateral and DAI is the generated synthetic dollar.
Synthetix allows users to generate any asset (including currency, gold, stocks, etc.) through the system's own native token SNX as collateral. A great advantage of this is that there is no need to introduce these off-chain assets (including currency, gold, and stocks) into the chain, but only need to process these synthetic assets. From this perspective, MakerDAO is actually a synthetic An asset protocol where ETH is the underlying collateral and DAI is the generated synthetic dollar.
If the value of SNX used as collateral to generate synthetic assets declines, the person who holds the minting rights (generally refers to users who mortgage SNX to generate synthetic assets) must replenish more SNX to redeem the original mortgaged SNX. This is similar to how MakerDAO works, except that Maker also penalizes you with 10% of your ETH collateral.
To summarize what has been said above, a simple example can be used to illustrate:
1. Assume I own 750 SNX tokens (the price at that time was 1 USD)
2. I deposit 750 SNX tokens to mint $100 worth of synthetic dollars (the system requires a 750% collateralization rate)
3. If the value of SNX drops to 0.9 USD at a certain time, if I want to redeem SNX at this time, I need to deposit sUSD of 0.9 USD to close the position.
Note: According to the mortgage rate of 750% of the system, 750 SNX tokens can mint sUSD worth 100 US dollars
Seeing that there seems to be no problem now, but the next question is, why would anyone buy and hold SNX tokens in the first place? What exactly does it do? Below I will explain:
Inflation-based staking rewards
By minting synthetic assets, users who hold SNX actually become shareholders of this agreement. Therefore, these people are eligible to receive more newly added SNX tokens. These new tokens are issued based on the inflation design in the protocol.
Exchange transaction fees
Every time someone trades these synthetic assets based on SNX collateral, a certain handling fee (0.3%) must be paid. Those who pledge SNX to generate synthetic assets can share these fees.
Uniswap LP rewards
Strictly speaking, this is also part of the first point, but it should be noted here that anyone who mortgages SNX to generate sETH and provides liquidity for the sETH/ETH liquidity pool on Uniswap can also get additional rewards. This is important because it maintains a price peg between sETH and ETH, thus creating a flow channel between all synthetic assets in Synthetix.

Finally, the final part of how Synthetix works is understanding the cost of synthesizing an asset. In MakerDAO, there is the concept of a stablecoin, which is set from time to time by MKR holders. And Synthetix has its own characteristics, that is, each user is actually competing with other traders in the game.
Note: The author of the original text made a calculation error, and his 750 SNX tokens can mint 100 US dollars of sUSD, so this article uses 750SNX as an example to illustrate.
1. John uses 750 SNX to mint 100 sUSD.
2. Jill also uses 750 SNX to mint 100 sUSD
3. The network now has a debt of 200 sUSD, with John and Jill each accounting for 50% of the debt
4. John decides to take a gamble, and buys 100 sLINK (each sLINK is worth $1 at the time) with the sUSD he mortgaged and synthesized, and pays the transaction fee for it. (John and the Synthetix network's debt becomes 100 sLink, still $100 at this point)
5. Now the price of sLINK has risen to $4 each, so John's 100 sLINKs represent a value of $400. The value in Jill's hand is still $100 (100 sUSD)
6. The network's total debt now totals $500. Since John and Jill are each responsible for 50% of the debt, John owes $250 to the Synthetix network and Jill likewise owes $250 to the Synthetix network.
7. The difference between John and Jill is that John made $300 from the price increase, so he made $150 ($100 + $300 - $250), while Jill went down to $250.
Looking at it this way, Synthetix's staking rewards are actually somewhat misleading, because it actually just motivates people not only to take the risk of accumulating debt, but also to actively open trading positions. As the saying goes, there is no free lunch in this world.
Next, let's take a look at Synthetix's performance in various situations:
secondary title
Ownership Schema and Management Keys
Synthetix is by far one of the most complex DeFi architectures I have come across, and it makes extensive use of Proxies (literally translated as "proxy") from start to finish. Proxies are a way for someone to point to one address, but execute code from another contract. Think of it as an "agent" that can execute code for someone else.

The following is a high-level architectural overview of Synthetix's smart contract and ownership architecture.
What follows will be a stinky and long content explanation, but don't worry, I will try my best to break them apart and explain them one by one.
First of all, every interaction with the Synthetix system calls the Proxy.sol contract, the contract address is: 0xC011A72400E58ecD99Ee497CF89E3775d4bd732F. The two key properties of this contract are targetAddress and owner.
owner is simple and literal: the owner. But the target essentially forwards all calls to the smart contract.
In this example, the target is Synthetix.sol, which you can think of as the core of the entire system. owner (can switch the overall deployment of Synthetix contracts at will, making them do whatever they want. This is nothing new, but I don't think the overall deployment of the system can be changed at will. Some architectures guarantee to the user which What can be changed and what cannot be changed.
Synthetix.sol (0x8454190C164e52664Af2c9C24ab58c4e14D6bbE4) is a brain that is responsible for coordinating all interactions within the system. It has the following responsibilities:
- Track all synthetic asset token balances
- List all valid synthetic asset addresses in the system
- Get a resolver for any contract address in the ecosystem
This contract has the same owner as the proxy.sol contract, but it has a special variable called selfDestructBeneficiary.
Currently deployed at:
0xde910777c787903f78c89e7a0bf7f4c435cbb1fe contract. But one thing is particularly strange, there is a 28-day time delay period before the recipient receives all the assets. Moreover, the previous 0xde9 is just an ordinary Ethereum address without multi-signature, so it can basically be regarded as someone’s wallet.
I think the most important question here is "Who is the Owner?" How does it work?
Owner's address is:

0xeb3107117fead7de89cd14d463d340a2e6917769, which is another Proxy contract. Due to this layer of proxy contracts, I can't directly view it on Etherscan, so I wrote some code to directly get the results.

The result is as follows:
The bad news is that there is no time lock, so if all four people sign it, they can make changes immediately.
secondary title

structure
structure
secondary title
document
secondary title
unit test
unit test
If you read their code carefully, you can see that they do have tests. But one thing worth noting is that the testing method they use is integration testing, not unit testing. The difference between the two is that their test checks make sure everything works, but don't guarantee that the system is immune to malicious or unexpected input.
secondary title
Overview
I'm a bit opinionated about this part. But I found that Synthetix's development tools are generally good. Their Javascript library relies on the soon to be updated JSON ABI file instead of using Typescript types which provide integration guarantees. Set, dYdX and 0x all use Typescript types and benefit a lot. Their Javascript library was not extensively tested to ensure that any ABI change would not break the entire system. It's not a big deal, but it tells me more about how much the team cares about the developer experience and how easy it is to integrate smart contracts into external systems.
secondary title
Liquidity Analysis


Currently, the two largest liquidity pools on Uniswap are ETH/sETH and ETH/SNX. The scale of ETH/sETH mainly comes from Synthetix's inflation design, which rewards more SNX tokens to mortgage users who provide liquidity on Uniswap.
However, I realized from this point that Synthetix's model is not sustainable in the long run if they fail to tackle really hard challenges.
1. As mentioned earlier, synthetic assets are a type of secured collateral. And they claim that there is no liquidation mechanism, only debts that need to be repaid. The system faces potential undercollateralization issues (although the collateralization ratio is currently 750%, there is considerable safety margin from insolvency), but it remains to be seen.
2. The assets held by the holders of synthetic assets cannot be fully redeemed with stable collateral. If the price of SNX drops rapidly, many positions will start to become undercollateralized, and even if SNX can be redeemed, it will face a run.

Due to staking incentives, only 20% of the SNX supply is not actively staked, which begs the question: if most of the real, healthy liquidity is sucked away, how can it be regenerated from elsewhere? Remember, you need incentives for healthy demand for SNX, not for synthetic assets to have real value.

I hate CoinMarketCap as much as a lot of people, even so, I will show the following data provided by CMC on Synthetix's liquidity outside of Uniswap.
My point is not that Synthetix is doomed, but that for it to be a successful synthetic asset protocol: a few additional things are needed:
1. Only when the price of SNX increases in Uniswap or other markets outside the incentive mechanism can it obtain liquidity;
2. SNX will only gain value/demand if it can generate enough transaction fees, enough to attract attention (so far, it has earned $7 million, which means there is some opportunity);
3. Transaction fees are only incurred when people open synthetic asset positions, trade them, and actually use the synthetic asset for its intended use;
4. Only when people hold a certain synthetic asset or think that a certain synthetic asset has value, will it be regarded as MoE (Medium of Exchange, trading medium).
5. Until SNX has liquidity, people will not have the confidence to hold synthetic assets and other ecosystem participants will not be listed on other exchanges.
This is inherently a tricky problem and requires more than two to be successful. Maker uses ETH as the basic collateral of the entire system, avoiding this series of problems. Synthetix is getting a solution by introducing ETH collateral, but the set of problems still persists that token holders want more SNX than ETH in order to ensure that SNX becomes more like a valuable token.
Oracle (Oracle) Analysis
https://www.theblockcrypto.com/linked/
In the early days of Synthetix, an oracle malfunctioned and someone used it to create 37 million SNX. People's confidence has been hit hard, this is a big shake to people's confidence. However, the team decisively switched to using Chainlink oracles.https://developer.synthetix.io/tokens/
I'd also like to do an analysis of Chainlink, but that's beyond the scope of this article. The team does run some oracles of their own, which can be viewed directly here:
My only advice to the team is to slow down and develop a stronger opsec program. Otherwise, you can only add another 10 centralized oracles to the network to feed prices, and then slowly become a centralized exchange and enjoy it. The team does have an aggressive roadmap and is working hard to achieve it. Hope they can take it step by step and focus on building the infrastructure.
secondary title
secondary title
end
end
At this point, my in-depth research on Synthetix is basically over. Overall, Synthetix is clearly a pioneer in the DeFi space, employing some very unique and effective strategies to ensure tokens can capture value while becoming an integral part of the ecosystem.
The main challenge going forward is whether the system can successfully incentivize the creation of synthetic assets that people want to hold, synthetic assets for commerce, or other non-speculative uses. So far the team has made some impressive transitions (from Havven) to the current economic model. I will keep an eye on this project, although I would say that the challenges they face going forward are not easy to solve.


