dAssets
dAssets are short for Duet Assets, which are synthetic assets that tracks the value of the underlying assets.
Over-collateralization Minter allows users to mint synthetic assets given that the user‘s uncollateralized stake in Duet vault exceeds the value of the synthetic assets to be minted.

# Synthetic Assets Explained

Traditionally, synthetic assets has been a difficult concept to understand. The relevant concepts and mechanisms are explained below. For readers who are familiar with synthetic assets, please move on to the mechanism chapters.
In finance, collaterals have been utilized as a key risk management mechanism to mitigate counterparty risk.
Counterparty risk refers to the the likelihood or probability that one of those involved in a transaction might default on its contractual obligation. Counterparty risk in a lending contract is often the ability and willingness of the borrower to repay debt.
A typical use case of collaterals is where an individual borrows money using his house as collateral. In the case that the borrower is unable or unwilling to repay interest and principal of the debt, the bank would sieze and sell the house for money to repay the debt.
House is a relatively illiquid asset, in other words, when sold in a hurry, the value of a house could fall below its market value. The bank would therefore require over-collateralization where the value of the house is higher than the value of the debt and interest combined, so that when the bank liquidates the collateralized house, the residule value would be enough to repay the debt.
Suppose, instead of the bank lending the borrower money directly, the bank issues some kind of a certificate to the the borrower. Should the borrower default, the bank is happy to liquidate the house for anybody who would lend money to the borrower to buy back the certificate in order to repay any outstanding debt. The borrower can now take the certificate and borrow money from anyone interested.
The certificate is essentially what we call a synthetic asset. It represents a tradable certificate of debt obligation that is backed by some over-collateralized asset (e.g. a house or some amount of crypto assets) that can be liquidated in case of a default. This certificate could be a monetary amount, like 1 US dollar (e.g. dUSD), or represent some fluctuating value, like the price of a Tesla stock (e.g. Synthetic Tesla).
The bank in the above example serves as a trusted middleman who countinously monitors a default event and is responsible for the custody, valuation and liquidation of the collateral in the case of a default. This is precisely the role of Duet protocol in the conext of synthetic assets.
Powered by blockchain technology, Duet expands collaterals from traditional assets to crypto assets, expands the range of borrowable assets from just fiat currencies to virtually all assets whose price can be tracked. The certificates of debt obligations are now called synthetic assets that are fungible tokens that formulates active trading markets in decentralized (DEX) and centralized (CEX) set ups. Holding a synthetic asset will now mimic the return of the underlying asset whose value is backed by over-collateralization.

# Accepted Collaterals

Duet continuously expands the accepted range of collaterals. Theoretically, As long as an asset can be sold instantly in the event of liquidation, it is on the list of being accepted as a collateral in the Duet Protocol.
On top of supporting single tokens as collaterals, Duet also accepts receipt tokens as collaterals.
Receipt tokens represent the right to instantly withdraw liquid assets from liquidity pools of a DeFi protocol.

# Custody of Collaterals

To supply single token or receipt tokens as collaterals, users need to supply assets through the Earn function.
Essentially, the Duet vault holds LP tokens (dytokens) issued by its yield optimizer (Earn) as collaterals.
Duet Earn possesses the ability to withdraw liquidity from third-party DeFi protocols since all the liquidity is supplied through the Earn contracts. The ability to withdraw and liquidate any collateral is key to maintaining pegs between synthetic assets and underlying assets.

# Valuation of Collaterals

Like lending protocols, synthetic protocols are subject to oracle attacks. Duet classifies crypto asset into two categories, mainstream assets and long-tail assets.
Mainstream assets are assets with considerable depth in exchanges, and thus difficult to manipulate. For this type of crypto assets, Duet relies on Chainlink Oracle for valuation of collaterals.
Long-tail assets are assets with relatively lower depth and thus can be easily manipulated. For this type of crypto assets, Duet takes the lower of time-weighted average price of past half-hour and 2-hour time frame. This lower time-weighted price is then used to value crypto collaterals.
Duet effectively prevents any individual or group of people from borrowing more synthetic assets than their collaterals are truely worth by pumping the price of a illquid asset in a short period of time and immediately borrow against them.

# Monitoring of Default Events

Duet applies a liquidation discount to collaterals and a liquidation premium to dAssets.
Liquidation discount Ratio(LDR): LDR is applied to the value of collaterals. LDR represents the expected cost of liquidation. The expected cost includes the slippage of selling the assets at market and fees paid to liquidator for their liquidation services.
LDRs for supported Assets:
Assets
LDR
$DUET 85%$USDT
3.44%
$USDC 8.59%$BUSD
3.44%
$CAKE 8.43%$dUSD
85%
$BNB 3.18%$BTCB
15.7%
$ETH 15.61% LDR Estimation: Duet protocol takes risk management extremely seriously, liquidation discounts are monitored and updated every week. LDR is based on liquidity of the asset only. It is estimated by simulating a liquidation event of 5 million USD on primary liquidation venue (Pancake Swap on BSC). Collateral Factor: Collateral Factor, or Collateralization ratio, is calcuated by dividing Collateral value by loan value. Although Duet protocol takes a different approach to risk management, users can calculate collateral with the following equation: $CollateralFactor=(1-LDR)/r$ Where r is the default maximum Asset-to-Debt Ratio, which is currently set at 120%. Assets Collateral Factor$DUET
12.5%
USDT
80.47%
USDC
76.18%
BUSD
80.47%
CAKE
76.31%
dUSD
12.5%
BNB
80.68%
BTCB
70.25%
ETH
70.33%
Suppose Alice wishes to borrow synthetic assets with $CAKE as collateral, for every 100 USD worth of$CAKE that she supplies as collateral, she could borrow 100*76.31%=76.31 USD worth of Synthetic Assets.
LDR for Dex LP pairs: Liquidation Discount Ratio for a typical AMM Dex LP is simply the average of both assets within the LP. For example, LDR for dUSD-BUSD is calculated as (85%+3.44%)/2=44.22%.
The Collateral Factor for dUSD-BUSD LP is (1-44.22%)/120%=46.48%
Liquidation Premium Ratio(LPR): LPR is applied to the value of outstanding dAssets. LPR represents the cost of buying synthetic assets from market.
LPRs for synthetic assets
Synthetic Assets
LPRs
dUSD
0%
For example, Alice provides 1 BNB (Price: 430 USD) as collateral, the Liquidation Discount for BNB is 15%, Duet thus deems the current asset value in the Alice's vault is equal to 430 * (1-15%) =365.5 USD
Suppose Alice borrows 1 dTesla, and the current price for dTesla is 350 USD, the LPR for dTesla is 5%. Duet protocol deems the value of Alice's liability being 350 * (1+5%) =367.5 USD
Default Conditions: A user's vault is under liquidation once its Asset-to-Debt ratio falls to or is lower than 105%.
Asset-to-Debt Ratio: Asset-to-Debt ratio is equal to the sum of value of all assets adjusted by LDR divided by the sum of value of all liabilities adjusted by LPR.
The Asset-to-Debt ratio of Alice's vault is equal to 365.5/367.5=99.456%. Given that the Asset-to-Debt ratio is lower than 100%, the vault is now considered a vault under default.

# Liquidation of Collaterals

When a vault is under default, any user can claim the underlying collaterals by repaying the outstanding amount of synthetic assets.
Due to the existence of liquidation discount, the collaterals that liquidators receive is worth more than the value of repaid synthetic assets. The excess value is deemed as liquidation fees paid to the liquidators.