# Stabilize Wiki

Welcome to the Stabilize Wiki!

The Stabilize Protocol is a decentralized finance application designed to keep stablecoin and BTC proxy-token prices stable through arbitrage trading. Users deposit into these arbitrage strategies, which swap tokens on their behalf, and are then rewarded with with STBZ tokens.

The team actively monitors the latest developments in stablecoin advances, while integrating the advances that can help bring more value to the platform.

Unlike other yield farming platforms, Stabilize benefits the entire DeFi ecosystem by bringing stability to stablecoins.

## Overview

#### What is the problem?

Stablecoins are cryptocurrencies designed to be pegged to or float near fiat currencies. This comforts traders and savers, knowing the value of these coins in the real world will be the same tomorrow as it is today. This is the goal of stablecoins but sometimes is not the reality. In reality, stablecoins can go off their pegs for an extended period of time due to fluctuations in supply and demand. This fluctuation causes headaches for those who depend on the stability of their stablecoins for everyday usage.

#### How is Stabilize the solution?

The Stabilize protocol currently has ZS and LP pools. In ZS pools, arbitrage trading strategies are used to provide sell pressure on stablecoins above their peg and buy pressure on stablecoins below their peg, stabilizing the prices and generating profit for users. Unique to Stabilize is the fact that arbitrage is not only occurring across exchanges but also across proxy tokens. For example, Dai, USDC, USDT, and sUSD are a set of proxy tokens.

Initially, there will be one liquidity pool on Stabilize: the STBZ/ETH 50:50 Uniswap pool.

### Tokenomics

Rewards started distributing on September 29th, 2020 at 00:00 UTC. During the first year, 1 million STBZ tokens will be minted to protocol users. There are no VC investors and no presales of STBZ. After the first year, the inflation rate of new tokens minted will be offset by a new per-transaction burn rate. The initial inflation rate is 1%, and the burn rate is to be determined. The first year minting rate is below:

* Week 1: 76,000 STBZ
* Week 2: 57,000 STBZ
* Week 3: 38,000 STBZ
* Week 4: 19,000 STBZ
* Week 5–52: 16,875 STBZ

The STBZ/ETH pool receives 50% of all new tokens initially, and the other pools split the rest evenly.

During the first year, the development team will receive 1% of tokens minted; after which, it will decrease to 0%. Initial liquidity from the team is locked on [Unicrypt](https://etherscan.io/tx/0x7471e14901699e9af1f26379c2349314f17e56469d6bcf330b49918d9b5fa58c) for 1 year. The team will use dev funds generated from the protocol for maintenance and services, such as audits.

#### Long term usage of STBZ

STBZ is currently used in a few ways:

1. STBZ holders can stake their tokens in the STBZ-only staking pools, which allows them to earn a percentage of the profits generated by the protocol
2. STBZ tokens are used for governance
3. STBZ can be burned into the treasury to receive a proportional share of the funds inside

### Security

The development team takes security very seriously. In fact, audited and battle-tested code serve as the template for most of the current code. Additionally, funds have been reserved for smart contract reviews and audits.&#x20;

Also, many protocols give the development team full control over minting of their reward token. This is a security risk because, at any time, the developers can mint infinite tokens and destroy all liquidity pools for that token. In the Stabilize protocol, the smart contract controls the minting rate and the only thing the development team can do is decrease it.&#x20;

In addition, all governance functions are controlled by a 24 hour timelock, allowing depositors enough time to decide to stay or leave the protocol.&#x20;

Finally, Stabilize uses on-chain decentralized price oracles powered by Chainlink and Aave to access USD prices, which dictate the pools' reward rates; other protocols use the development team as the source for this real world data. Furthermore, these price oracles are resistant to flash crashes and manipulation. This pricing update occurs every 6 hours.

Functions that keep the protocol running (pool rebalancing and new week minting) can be called by anyone, not just the development team.

* Price Oracle Address: 0xB54e7175db55D0Effcc974f146b3714910907A58
* Token Address: 0xB987D48Ed8f2C468D52D6405624EADBa5e76d723
* Operator Address: 0xEe9156C93ebB836513968F92B4A67721f3cEa08a

### Liquidity Providers

A liquidity provider is anyone that has deposited `STBZ` and `ETH` into the uniswap liquidity pool. Liquidity providers can further stake their tokens in the `STBZ/ETH UNI LP POOL` to earn a large percentage of the `STBZ` rewards.

#### How to Become a Liquidity Provider

You can become a liquidity provider either through the Uniswap Liquidity Pool or the Zerion LP Interface:

Uniswap liquidity: [https://uniswap.info/pair/0xDB28312a8d26D59978D9B86cA185707B1A26725b](https://uniswap.info/pair/0xDB28312a8d26D59978D9B86cA185707B1A26725b)

Zerion LP Interface: [https://app.zerion.io/invest/pools-10/UNI-V2-0xdb28312a8d26d59978d9b86ca185707b1a26725b](https://app.zerion.io/invest/pools-10/UNI-V2-0xdb28312a8d26d59978d9b86ca185707b1a26725b)

#### LP Tokens

When you deposit into the LP pool, you should notice that you have received `STBZ-ETH` in return. These are LP Tokens, and they represent your share of the underlying tokens in the liquidity pool. After you receive LP Tokens, you can stake them in the STBZ/ETH UNI LP POOL to earn STBZ rewards.

At any time, you can return LP Tokens to the liquidity pool to withdraw your share of the underlying STBZ and ETH. LP Tokens are transferrable between accounts, and you do not need to be the person that deposited the underlying tokens in order to withdraw them; whoever has LP Tokens has the right to withdraw the underlying token.

### Executors

Executor incentives make the arbitrage trading process more streamlined and profitable. Executors are people that are rewarded for executing trades on behalf of depositors at the right time.

#### What is an executor?

An executor is any person that triggers a trade, by calling the above function in the strategy, on behalf of the depositors in the pool. Anyone can be an executor. Executors earn a percentage of the trade profit, starting at 10%.

A successful executor is one that is profitable and knows when to trigger trades that will give him/her profit that is greater than the gas cost of triggering those trades. To do that, he/she must monitor the pool’s composition, price spread between tokens and Ethereum gas price to calculate profitability. The executor can also periodically query the helper view function on the strategy shown below to determine when to trade:

While on most yield earning protocols, there exists one strategist that must monitor and earn a percentage of the trading fees, we at Stabilize decided to make the process more open and reward anyone that has the ability to monitor the market a piece of profit from our strategy profits.

#### How to become an executor:

The easiest way to start is the develop an off-chain bot that monitors the strategy continuously. This bot would query the expectedProfit function which returns wei units (10¹⁸ wei = 1 USD / BTC), calculate its own expected profit (10% of the expected profit), and then calculate the gas cost based on current gas prices. If the profit is greater than the gas costs, the bot would create a transaction to executeSwapTokens with its own address as the parameter to receive its percent of profit. The bot will also set a minimum seconds since the last trade to limit its gas cost in case someone else beats it to the trade.

In the end, the executor will make continuous profit, trading depositors funds at the right times and depositors will make the best compound interest possible as their funds are traded at the most profitable times. It is important to note that the contract itself doesn’t allow for trading at a loss.

Trade executors can earn 10% profit off each trade by timing the trade at the right time. The expectedProfit(bool inWETHForExecutor) function now includes a boolean that allows executors to see their WETH profit from the next prospective trade, instead of total profit (in tokens) for the trade. &#x20;

Users can find the "expected profit" function on the "read" tab on etherscan. Enter 1, then hit query and that will give you the expected profit for the executor in gwei (except the zs-usd contract which returns expected profit in dollars \*10^(-18)). Then on the write tab, when you hit execute, you can see what gas costs will be. If expected profit > gas, execute.

STBZ holders also benefit as some funds are siphoned to both the treasury and the staking pool too.

### Governance

[https://snapshot.page/#/stabilize](https://snapshot.page/#/stabilize)

The development team will navigate the early path for the protocol, but once bootstrapped, the community will control the protocol. Various methods of control could be changing important aspects of the protocol such as the burn rate, the emission rate and what new token pools are accepted. STBZ holders can develop a system that rewards token holders for providing liquidity to new stablecoin projects to further promote the usage of stablecoins.

Anyone can make a proposal via the Snapshot page. When the proposal is live, community members can then vote with their STBZ tokens to make a real impact on important decisions in the protocol.

Soon, users will be able to vote even if their stbz tokens are currently locked in staking pools!

### Governance Calculator

This governance contract calculates total STBZ held by a particular address. It first gets the number of STBZ tokens held in the user's wallet, then STBZ staked in the single asset staking pool, and finally the STBZ token portion of the user's LP tokens. This allows STBZ holders or liquidity providers to easily see their balance available for voting.

Note: it does NOT include unclaimed stbz rewards or stbz held in exchange wallets

[https://etherscan.io/address/0xaB1AB3d8cDF09E42d86d0c45646DE95337D2bf4A](https://etherscan.io/address/0xaB1AB3d8cDF09E42d86d0c45646DE95337D2bf4A)

## Treasury Furnace

As mentioned previously, all withdrawal fees go directly into the treasury contract. STBZ holders can redeem these funds with their STBZ tokens. They will simply burn their tokens into the treasury to receive a proportional amount of treasury funds compared to the circulating supply. Circulating supply is defined as all STBZ tokens outside the Stabilize Protocol operator contract. For example, if I have 500 STBZ tokens and the circulating supply is 10,000, I have 5% of the circulating supply. If the treasury contains 100,000 USDC, I will be able to redeem 5,000 USDC by burning my 500 tokens. This will make STBZ an asset-backed token whose value is beyond its speculative price.

[https://etherscan.io/address/0x42Cbe17335ef8d52F8d1e0a261eA2e78E829C56e](https://etherscan.io/address/0x42Cbe17335ef8d52F8d1e0a261eA2e78E829C56e)

### **Gas Treasury**

In addition to the normal treasury, there is a special treasury called the Gas Treasury. It is an intermediate treasury that can be used to pay for operations required by the Stabilize protocol. The gas treasury can call mintnewweek and rebalancepoolrewards and pay the caller back for those calls (up to 30 gwei currently). It is also used as a reservoir for the team to obtain funds needed to build new contracts or run maintenance calls. The team can also forward funds from the gas treasury to the treasury furnace when ready.&#x20;

A percentage of profits from trades and withdrawals is sent to the STBZ staking pool as rewards for STBZ holders

[https://etherscan.io/address/0xE05D2A6b97dce9B8e59ad074c2E4b6D51a24aAe3](https://etherscan.io/address/0xE05D2A6b97dce9B8e59ad074c2E4b6D51a24aAe3)

## Stabinol&#x20;

In order to cope with the high gas fees of Ethereum, gas tokens have been developed by some developers, which compensate users for spending on gas. Stabinol, however, is not an ordinary gas token. Stabinol compensates users for all ETH that is spent.

Initially, Stabinol will be distributed via airdrop; the snapshot for which will be taken between Monday, February 22nd and Tuesday, February 23rd, 2021.&#x20;

After that cashback will be distributed to those who stake their Stabinol and 50 STBZ. The cashback for which a user is eligible will be determined by a percentage of the value of the Stabinol that the user has staked.&#x20;

## Private Transactions

The Stabilize Protocol is introducing a new way for stablecoin depositors to store their coins. By utilizing the Tornado protocol, users benefit from private transactions, which disconnect the sender address from the receiver address. When users withdraw from a Stabilize account, observers are unable to determine what his/her balance would be inside the account.

This allows depositors to benefit from something they normally get in the real world, private balances. In the real world, when you give someone money, it is not possible for that person to easily determine your remaining balance and track all your transactions, future and past. Unfortunately, with most cryptocurrencies including Ethereum, this is something that can easily be done. This can compromise your privacy and safety and make you a potential target of scammers, hackers and worse.

With Stabilize private accounts, depositors can get one step closer to the real world. They deposit into the account with their deposit note only known to them, then at a later time, can use the note to redeem the deposit amount to another address of their choosing, including receiving ETH amount of their choosing to pay for future transactions. When observers see the withdrawal, they can see that it came from Stabilize accounts but will be unable to determine who the initial depositor was for that withdrawal, thus protecting their safety and privacy.

This is the first and only DeFi yield farming application that builds upon what the Tornado team has designed to help bring more security to stablecoin depositors.

**How to use it:**

To use, simply unlock the account you want to use, either DAI, USDT, USDC. Then, select the amount you want to deposit, either 100 or 1000 stablecoins at a time. You can only deposit these amounts as they become part of an anonymity set. You then generate the note. Each deposit requires a different note and the note is what you will need to use to withdraw. Save it securely like you would a private key and do not share it with any other person including our team. Finally, deposit your stablecoins into the accounts.

When you are ready to withdraw, you enter your saved note into withdraw field and follow the prompts to withdraw. You enter the recipient address and any additional ETH you would like to receive upon withdraw. You can also tip extra to accelerate the time it takes to fulfill your withdraw request. When you press “Request Withdraw”, a zkSnark proof is created in your browser. This proof and its accessory details are stored on a list of withdraw requests. Anyone can see this list and submit a transaction to the Ethereum blockchain with your proof to earn part of the fee specified in your withdrawal request. In that same transaction, the remaining amount goes to the recipient you specified with the ETH amount requested.

**How does this benefit Stabilize?**

As mentioned earlier, the Stabilize protocol is a platform to help stablecoins keep their pegs. We can even do this with private accounts. The withdrawal fee depends on the price of the underlying stablecoin. Essentially, the higher the price, the lower the fee and vice-versa. This is done to encourage withdrawing and selling of stablecoins that are too plentiful to bring them back down to their peg. Part of this withdrawal fee goes directly into the Stabilize Community Treasury.

## Audits

Audits have been completed by [Bramah Systems](https://bramah.systems/) and [DeFi Yield](https://defiyield.info/):\
\
[https://bramah.systems/audits/Stabilize\_Finance\_Audit\_Bramah.pdf](https://bramah.systems/audits/Stabilize_Finance_Audit_Bramah.pdf)

[https://defiyield.info/assets/pdf/stabilize.pdf](https://defiyield.info/assets/pdf/stabilize.pdf)
