# 08. uAD - ubiquity/ubiquity-dollar-development Wiki

Our pilot DeFi primitive is the Ubiquity Dollar: a partially collateralized algorithmic stablecoin.

Ubiquity Algorithmic Dollar (uAD) is an epoch-less, elastic supply stablecoin. The protocol is designed to prevent prolonged debt cycles through controlling the value redeemed with its counterpart, the Ubiquity Credit (uCR). The team has spent years researching the pitfalls of other stablecoins to create a stablecoin that is made with stability, upgradeability, and scalability in mind.

The primary benefit of holding and using a stablecoin like uAD is its pegged value - in this case, $1. Naturally, the uAD protocol anticipates inflation cycles (price of uAD goes above$1) and debt cycles (price of uAD goes below $1). • When the price of uAD rises above$1, new uAD is minted. The newly minted uAD can be redeemed by holders and is distributed amongst bonded uAD holders, DEX liquidity providers and the protocol treasury. This supply expansion of uAD is intended to reduce demand for uAD in order to decrease its price back down to $1. • When the price of uAD falls below$1, uAD holders are incentivized to burn their uAD in exchange for Ubiquity Credits (uCR). uCR is issued at a premium and can be redeemed 1:1 for uAD when the price rises above $1 again. This supply contraction of uAD is intended to increase demand for uAD, and so, increase its price. While there are competitors in this space aiming towards this goal, the difference is in the design of uAD as a response to the current problems algorithmic stablecoins are currently facing. Most decentralized stablecoins are built on rigid economic strategies that make it difficult to respond to adverse situations. Scenarios such as the changing dynamic of the DeFi ecosystem and security breaches can threaten the stability of the algorithmic dollar. The Ubiquity Dollar is designed with a polymorphic architecture that maximizes the flexibility of upgrading stabilization mechanisms, all through a decentralized, transparent, community-driven mechanism. This allows the platform to accommodate the needs of a diverse range of users and applications. ### How it Works Price stability pertains to mechanisms that aim to stabilize the token price, short of performing a full price reset. Those mechanics (in each group, e.g., below and above 1.00 USD) are active all at once unless explicitly specified otherwise. ### Below 1.00 USD Incentives for traders • As the token price drops below 1 USD, traders on the 3CRV pool will be incentivized to buy the tokens and disincentivized to sell the token. Incentivization is achieved by burning a percentage of all uAD sold and issuing governance tokens (UBQ) in equal proportions for all uAD bought. Those incentives grow larger the further the price of the token falls below 1.00 USD. We define the function (in terms of percentages) • A price of 0.90 USD would mean that 10% of the seller's uAD are burned before trading them in the swap contract, and a buyer would get 10% of his uAD buy value as bonus UBQ. • A price of 0.50 USD would mean 50% burned and 50% of the value as bonus UBQ. • Credit/Auto-redeem minting. As the price falls below 1.00 USD, the system will begin issuing debt in the form of uCR NFT (Fungible Credits that have an expiration date) • Participants may burn uAD tokens in exchange for uCR NFTs issued at a premium rate. The premium is calculated as follows where R stands for the debt ratio: (total supply of uDEBTs) / (total supply of uAD). • A price of 0.90 USD would mean that 10% of the seller's uAD are burned before trading them in the swap contract, and a buyer would get 10% of his uAD buy value as bonus UBQ. • A price of 0.50 USD would mean 50% burned and 50% of the value as bonus UBQ. Coupon/Auto-redeem minting. As the price falls below 1.00 USD, the system will begin issuing debt in the form of: • uCR NFT • Participants may burn uAD tokens in exchange for uDEBT coupons issued at a premium rate. The premium is calculated as follows: $$\frac{1}{(1-R)^2} 1$$ where R stands for the debt ratio: (total supply of uDEBTs) / (total supply of uAD). ### Above 1.00 USD Minting. When the price is above 1.00 USD, Ubiquity Credit (uCR) holders can redeem their uCR for uAD, which increases uAD supply and stabilizes the peg back to$1.

Based on the following formula:

## Price Reset

As seen in BondingV2.sol, the protocol performs a forced price reset under extreme conditions. This is carried out in the following steps:

1. The protocol withdraws single-sided liquidity from StableSwap, which it controls (its own LP tokens + LP tokens staked in the bonding contract.)
2. The withdraw is done until the peg is restored within some acceptable range
3. The withdrawn tokens (either 3CRV or uAD) are kept as a reserve for a future price reset.

Rules and conditions for performing a price reset:

• Price reset is performed only when the price of uAD is < 1.00 USD.
• To start, this will be manually invoked by the protocol deployer but we are aiming to piggy back the reset transaction on uAD token sells against the StableSwap market.

## Early Days vs Normal Operation

The term “Early days” pertains to the period of the token between 0 and 30 days of the protocol's official launch. During this period we assume high price volatility.

The differences between the early days period and normal operation are:

• During the early days period, 50% of the new mint will go to the treasury (instead of the standard 10%)
• During the early days period, the threshold for the “Bonus Liquidity Provision” price stabilization mechanic will be set a lot lower and will be staked for a lower duration.

## Bonding contract

The bonding contract’s function is to facilitate new mint distribution (seigniorage) after all outstanding debt is paid. Seigniorage is distributed as follows:

• 10% to the Treasury
• 10% to UBQ fund
• 80% to bonding contract participants

A Bonding contract participant (BP) is a person who provides liquidity to a predetermined uAD liquidity pool and subsequently stakes the LP tokens (LPt) for a certain duration (D). The final % of seigniorage allocated to each person is determined by the formula:

Where:

• LPt is the amount of LP tokens staked in the bonding contract
• M is the staking duration multiplier for the LPt tokens

The staking duration multiplier (M) is defined by the following curve, with the minimum staking duration in weeks (D) being 1 week and the maximum 208 weeks (4 years.)

Thus calculated, the BP ensures that the people who are the most invested in the protocol’s stability get the most rewards and the most voting power.

Bonus Liquidity Provision. Above the threshold uAD price (P) of 10 USD, the bonus liquidity provision (BLP) mechanic activates. Under this mechanic for each uAD token sale, the protocol matches per cent (M) of the trade value and mints new tokens (NM). Half of NM is automatically sold on the 3CRV pool, and the resulting balance (½ NM + ½ sold NM) is posted as liquidity on the 3CRV pool. The LP tokens are automatically deposited in the bonding contract, on behalf of the user, for a period of 6 months. The user is eligible for all rewards based on those staked tokens and can withdraw them after the staking period ends.

## Liquidity Provision

Bonding contract participants are further incentivized with governance tokens (UBQ) when the token price of uAD is close to 1 USD. This is achieved via:

• Rolling multiplier M which depends on the uAD price
• A base UBQ reward per block - U
• The percentage of seigniorage shares which the user holds compared to all seigniorage shares - PS

From here, we can define the reward (R) per user as:

The multiplier M in turn depends on the current uAD price (P) and the previous value of the multiplier $M_{-1}$. Its initial value will be 2.

Which gives us the following function based on the current uAD price.