owned this note
owned this note
Published
Linked with GitHub
># Protocol Due Diligence: Synthetix (SNX)
[ToC]
## SNX Overview
- [Site](https:synthetix.io/)
- [Gov](https://gov.synthetix.io/#/)
- [Docs](https://docs.synthetix.io/)
- [Audits and due dilligence disclosures](https://docs.vesper.finance/vesper-grow-pools/vesper-grow/audits)
Please start by reading: https://blog.synthetix.io/what-you-need-to-know-before-staking-snx-for-the-first-time/
## Rug-ability
**Multi-sig:** Yes
- SNX multisign is https://gnosis-safe.io/app/#/safes/0xEb3107117FEAd7de89Cd14D463D340A2E6917769. It's using a 4/8 ratio. The MS is the owner of the Synthetix system.
**Upgradable Contracts:** No
- BUT there is an `AddressResolver` which points to different contracts and that's what we use inside the strategy.
`AddressResolver` does not have a timelock. As for monitoring, we can listen for events `AddressResolver.AddressImported`, or even listen for `SystemStatus.SystemSuspended` with reason 1 - that's a system upgrade that precedes any changes.
**Decentralization:**
- No idea how decentralized the MS is.
## Audit Reports
Audits are listed here: https://docs.synthetix.io/contracts/audits/
## Strategy Details
### Summary
The `SnxSusdMinter` strategy is in charge of minting sUSD and depositing it into the sUSD vault, earning:
- SNX rewards
- SNX fees
- sUSD vault APY
### Strategy current APR
The APR will change based on SNX usage. It's composed of
#### Exchange Fees
Exchange fees are generated whenever a user exchanges one synthetic asset (Synth) for another through Synthetix.Exchange. Fees are typically between 10-100 bps (0.1%-1%), though usually 30 bps, and when generated are sent to the fee pool, where it is available to be claimed proportionally by SNX stakers each week.
#### Staking Rewards
SNX staking rewards are generated through the inflationary monetary policy implemented in March 2018. At the same time as they claim their exchange fees stakers can claim their staking rewards, which are escrowed for a year. The SNX staking rewards enabled by the inflationary supply are set to decrease gradually until September 2023, where it will become a 2.5% annual terminal inflation rate.
#### sUSD vault APY
The sUSD vault will be composed of different strategies, but the main one will be single side into yearn v1 crvSAAVE. That strategy is returning an APY of 43.47%.
![](https://i.imgur.com/PRkvV0B.png)
### Vault/Strategy Pitfalls
Here are a couple of things which are out of the ordinary and might be of a surprise when reading the code.
#### SNX is not staked to use as collateral
If you have SNX in your wallet and you mint sUSD, your token is not replaced with another token, it's just non transferable.
##### Example
- Bob owns 1k SNX
- Bob issues max sUSD
- SNX price drops
- Bob can't send his SNX to someone else
#### sUSD debt changes based on total system debt
When you stake SNX and mint sUSD, you create a 'debt,' which is how much sUSD you need to burn to unlock your SNX again. Your debt represents a proportion of all the debt in the system. Whenever someone makes a gain through Synths, they make it against all the debt in the system. Therefore, if the system debt increases, your debt will proportionately increase as well.
Here's a snapshot:
![](https://i.imgur.com/lHSft32.png)
##### Example 1
There is $50k of sUSD in circulation, which represents the total value of all Synths. You then stake your SNX and mint $50k of sBTC (10 sBTC worth $5000 sUSD each) so there's now $100k in total worth of Synths. So, now we have 50k sUSD and 10 sBTC. Now the price of sBTC doubles. There is now 150k in the network in sUSD. So you want to leave. At the time you joined your proportion of the debt was 50%. So you are responsible for 50% now, which is $75k USD. But BTC is $10k, so you will need 7.5 sBTC to exit. This would leave you with 2.5 sBTC free.
WAIT! Where did that 'free money' come from? The answer is that the total debt of the other SNX stakers, the ones who supplied the sUSD, went up by 50% from $50k sUSD to $75k sUSD. So now they will need to burn that much to unlock their SNX.
Source: https://synthetix.community/docs/staking#why-does-my-total-debt-fluctuate-over-time
##### Example 2
Read: https://medium.com/acdx/synth-bc0e3f7178d7
![](https://i.imgur.com/GJIXGUX.png)
#### Collateralization Ratio
The Collateralization Ratio aka C-Ratio needs to be above
the protocol issuance ratio to issue sUSD and claim rewards.
At the time of writing the value is 500%.
##### Liquidation ratio
This is the ratio at which your SNX can be liquidated. At the time of writing, this is 200%. If your C-Ratio goes below, there is currently a 72 hours delay period before user can be liquidated.
#### SNX Staking Rewards cannot be transferred for one year
SNX staking rewards have an escrow period of one year before they can be vested.
This has two implications in the strategy:
1) We track vesting time of each lot and unlock sequentially
2) We might use vesting SNX as collateral but can't be transfered in a migration
#### 24hs lock when issuing sUSD
When the strategy issues more sUSD it needs to wait 24hs before paying it back.
Before calling `harvest()` and or `tend()` we need to make sure the other strategy in the vault has enough capital in case there are withdrawals.
## Path-to-Prod
#### Does Strategy delegate assets?
Yes. It delegates minted sUSD to the sUSD vault.
#### Target Prod Vault
Would be an endorsed version of what's pushed into ape tax.
#### BaseStrategy Version
0.3.5
#### Target Prod Vault Version
0.3.5
### Testing Plan
We already have a 0.3.1 SNX vault doing generic lender with Cream. At the moment, with 1,329.45 SNX (30k usd aprox). That vault will be closed and we will ask users to withdraw.
The new 0.3.5 SNX vault will use a GenLender + this new minter strategy. The minted sUSD will be deposited into the sUSD vault in ape-tax. The sUSD vault just deposits in aave using generic lender.
Once we make sure everything is working correctly, we want to upgrade the sUSD vault to start using the single side deposit into the curve's saave pool. To do that we will need a new sUSD vault and point the snx minter strategy to the new sUSD vault.
#### Ape.tax
##### Will Ape.tax be used?
Yes
##### Will Ape.tax vault be same version # as prod vault?
Yes
##### What conditions are needed to graduate? (e.g. number of harvest cycles, min funds, etc)
- Be profitable
- Go through a low collateral ratio scenario
#### Prod Deployment Plan
##### Suggested position in withdrawQueue?
GenLender first, snx minter second.
GenLender 10%. minter 90%
##### Does strategy have any deposit/withdraw fees?
No
##### Suggested debtRatio?
Once we are ready to prod, we should do:
80% Gen Lender, 20% snx minter
##### Suggested max debtRatio to scale to?
The final state should be:
- 10% GenLender
- 90% SNX minter
#### Checklist
- [ ] Deploy a 0.3.5 SNX vault in ape.tax
- [ ] Deploy Gen Lender with AAVE
- [ ] Deploy the SNX minter strategy
- [ ] Test to make sure all functionality is working correctly
- [ ] Deploy a new sUSD vault
- [ ] Add Gen Lender with AAVE
- [ ] Add single side deposit with saave
- [ ] Endorse to prod