DIVERGENCE
Search…
💧Add & Withdraw Liquidity
Liquidity can be added after initiation of pools and withdrawn prior to expiration dates.

➕Add Liquidity

After an option pool is initiated, additional liquidity is allocated by the smart contract according to current proportions of Spear, Shield and their respective split of collateral in the pool.
A liquidity provider is also able to check the real-time exposure to the number of Spear and Shield tokens that remain in the pool:
  • More Spear than Shield in the pool
Meaning more Shield tokens are sold. Given the binary feature of Spear and Shield tokens, it indicates the pool LPs are net-long Spear while the traders and hedgers are net-long Shield. If a new liquidity provider is to fund the pool now, he chooses to side with the net long Spear position.
  • More Shield than Spear in the pool
Meaning more Spear tokens are sold, given the binary feature of Spear and Shield tokens, it indicates the pool LPs are net-long Shield while the traders and hedgers are net-long Spear. If a new liquidity provider is to fund the pool now, he chooses to side with the net long Shield position.
  • Balanced number of Spear and Shield in the pool
Meaning roughly the same amount of Spear and Shield tokens are sold to the market and the pool LPs are neutral in their volatility exposures. If a new liquidity provider is to fund liquidity now, he chooses to be neutral on both sides.
For example, for a pool with 500 Spear, 350 Shield and 640 Uniswap ETH/USDC LP token remaining, a liquidity provider can fund 1280 Uniswap ETH/USDC LP tokens and grow the pool 3x to 1500 Spear, 1050 Shield and 1920 Uniswap ETH/USDC LP token.
Post funding, the net exposure of the liquidity pool is net long 450 Spear, of which, the new liquidity provider accounts for 2/3. If desired, the liquidity provider can choose to scale down half of his/her exposure by purchasing 150 Shield.

➖Withdraw Liquidity

Seeding or adding liquidity to pools with different expiration dates is similar to locking up liquidity for different periods of time. Prior to expiration, liquidity providers have the flexibility to withdraw collateral anytime, with two options available:
1️⃣Expiry Exit:
The user will remain as an LP in the pool until the market (current round) expires and will not join as an LP for the next round. The user can withdraw his collateral after the market is settled.
2️⃣Withdraw Now:
The user withdraws his collateral instantly, provided that the reserves for the maximum potential claim and the early withdrawal fee is deducted.
  • [Collateral(Total) - Potential Claim] * (1-Withdrawal Fee) * Pool Share

1) Reserve for Potential Claim

A reserve for the potential claim will be deducted from the liquidity available for early withdrawal. The reserve equals the greater of Spear tokens and Shield tokens sold. This ensures there's always enough reserve for the winners to claim 1 collateral per 1 option token after expiration.
To illustrate this, we will use an example of a liquidity pool that has net sold 350 Spear Tokens and 250 Shield Tokens when a liquidity provider chooses to early withdraw, and the pool still has 850 Uniswap ETH/USDC LP token remaining for example, the liquidity available for withdrawal will be 850-350 = 500 Uniswap ETH/USDC LP token.

2) Early Withdrawal Fee

An early withdrawal penalty is charged for withdrawals before expiry and will be shared among the LPs that stayed in the pool. This is to discourage competitive LP withdrawals ahead of expiry.
This early withdrawal fee will be applied after the potential claim reserve is deducted. It is calculated according to the following:
  • 00
    if no options have been sold since the open, or if LP uses the "expiry exit".
  • 1t×1%\sqrt{1-t} \times 1\%
    where
    t=(expiryTimestampcurrentTimestamp)/timePeriodt = (expiryTimestamp - currentTimestamp)/timePeriod
  • 1%1\%
    penalty cap
Using above example, an LP holding 1/3 of the pool liquidity is able to withdraw 500 * 1/3 * (1-1%) = 165 Uniswap ETH/USDC LP token, if the early withdrawal fee is at 1%.
When liquidity is withdrawn, a corresponding amount of Spear and Shield tokens will also be burnt from the pool per current proportions of Spear, Shield and Collateral in the pool.

👞Dynamics Walk Through

Continuing the previous example (illustrated over the "swap option tokens" session)
  • Num (Shield) = 500
  • Num (Spear) = 496.19
  • Collateral (Shield) = 93.85 DAI
  • Collateral (Spear) = 403.07 DAI
  • Collateral (Surplus) = 6.15 DAI
  • K (Shield) = 46,925
  • K (Spear) = 200,000
  • Shield price = 93.85 / 500 = 0.1877 DAI
  • Spear price = 403.07 / 496.19 = 0.8123 DAI
  • Spear Open Interest = 3.81
  • Shield Opne Interest = 0
1️⃣Add Liquidity
A new liquidity provider decides to add 800 DAI into the pool. The added collateral will be split among Collateral (Shield) and Collateral (Spear), and new Spear and Shield will be minted.
  • Mint Spear & Shield per increase of collateral (spear & shield)
  • Num (Shield) = 500 + 500 * [800 / (93.85 + 403.07)] = 1,304.96
  • Num (Spear) = 496.19 + 496.19 * [800 / (93.85 + 403.07)] = 1,295.01
  • 800 DAI split among Collateral (Shield) & Collateral (Spear) :
  • Collateral (Shield) = 93.85 DAI + 800 * [93.85/(93.85+403.07)] = 244.94
  • Collateral (Spear) = 403.07 DAI + 800 * [403.07/(93.85+403.07)] = 1,051.98
  • Pool share for the new LP = 800 / (800 + 93.85 + 403.07 + 6.15) = 61.39%
The price for Spear & Shield will not change, yet K (Spear) and K (Shield) will increase.
  • Shield price = 244.94 / 1,304.96 = 0.1877 DAI - remain unchange
  • K (Shield) = 244.94 * 1,304.96 = 319,636.90
  • Spear price = 1,051.98 / 1,295.01 = 0.8123 DAI - remain unchange
  • K (Spear) = 1,051.98 * 1,295.01 = 1,362,324.62
  • Collateral (Surplus) = 6.15 DAI - remain unchange
2️⃣Initial LP Withdraw Liquidity
Now, the initial LP wants to withdraw all of his liquidity now (not expiry exit), he has 38.61% (100%-61.39%) share of the pool. In accordance with the withdrawal, Spear, Shield will be burnt.
Let's assume the early withdrawal fee now is 0.5%:
  • Num (Spear) & Num (Shield) burnt per pool share:
  • Num (Shield) = 1,304.96 - 1,304.96 * 38.61% = 801.11
  • Num (Spear) = 1,295.01 - 1,295.01 * 38.61% = 795.00
  • Collateral for highest potential claim be reserved:
  • Th greater open interest of Spear & Shield is 3.81, 3.81 DAI is reserved
  • Withdrawalable = (244.94+1,051.98+6.15-3.81)*(1-0.5%)*38.61%=499.14 DAI
Collateral (Shield) and Collateral (Spear) will be deducted, Collateral (Surplus) will be adjusted
  • Collateral (Shield) = 244.94 * (1-38.61%) = 150.37 DAI
  • Collateral (Spear) = 1,051.98 * (1-38.61%) = 645.81 DAI
  • Total deduct from Collateral (Shield) & Collateral (Spear) is 500.74 DAI
  • Thus Collateral (Surplus) shall increase by 1.60 DAI (500.74 - 499.14)
  • The LP's pool share will be burnt, and the second LP now owns 100%
The price for Spear & Shield will not change, yet K (Spear) and K (Shield) will decrease.
  • Shield price = 150.37 / 801.11 = 0.1877 DAI - remain unchange
  • K (Shield) = 150.37 * 801.11 = 120,462.91
  • Spear price = 645.81 / 795.00 = 0.8123 DAI - remain unchange
  • K (Spear) = 645.81 * 795.00 = 513,418.95
3️⃣Second LP Withdraw Liquidity
Now, the second LP wants to withdraw all of his liquidity now too (not expiry exit), he now has 100% share of the pool. In accordance with the withdrawal, Spear and Shield will be burnt.
Let's assume the early withdrawal fee now is 0.7%:
  • Num (Spear) & Num (Shield) burnt per pool share:
  • Num (Shield) = 804.90 - 804.90 * 100% = 0
  • Num (Spear) = 798.76 - 798.76 * 100% = 0
  • Collateral for highest potential claim be reserved:
  • The greater open interest of Spear & Shield is 3.81, 3.81 DAI is reserved
  • Withdrawalable = (150.37+645.81+7.75-3.81) * (1-0.7%) * 100% = 794.52 DAI
Collateral (Shield) and Collateral (Spear) will be deducted, Collateral (Surplus) will be adjusted
  • Collateral (Shield) = 150.37 * 0% = 0 DAI
  • Collateral (Spear) = 645.81 * 0% = 0 DAI
  • Total deduct from Collateral (Shield) & Collateral (Spear) is 796.18 DAI
  • Thus Collateral (Surplus) shall increase by 1.66 DAI (796.18 - 794.52)
  • The LP's pool share will be burnt, now system is acting as ultimate LP
The price for Spear & Shield will not change, yet K (Spear) and K (Shield) will decrease.
  • Shield price = 0.1877 DAI - remain unchanged
  • K (Shield) will indefinitely approach 0
  • Spear price = 0.8123 DAI - remain unchanged
  • K (Spear) will indefinitely approach 0
In this case, since there's very little liquidity, the 3.81 spear holders will have to wait until market expiry, since the pool still has 9.41 DAI collateral (the 5.60 DAI on top of 3.81 is due to the early withdrawal fee), the claims can be met if spear wins the battle.

Smart Contract as Ultimate Liquidity Provider

Given the early withdrawal mechanism, even if all the liquidity providers choose to withdraw liquidity prior to expiration, there will still be liquidity leftover for users to continue trade against. In such a situation, the system will be the ultimate liquidity provider.
Since the system uses the highest possible collateral for claim as the potential claim reserve, if later the market is on the wrong side of the trading, not all the collateral in the pool will be claimed, leading to a system residual that potentially becomes a fee stream for the platform.

❗Risks for Being an LP on Divergence

Providing liquidity and funding options pools will yield trading fees as well as additional liquidity provider incentives. However, liquidity provision using a constant product AMM model also leads to potential risk exposures, including, but not limited to:

Impermanent Loss:

Technically, the price of "Spear" and "Shield" will move towards 0 or 1 collateral from the price at which the liquidity got initially seeded -- called "Time Decay", which could cause impermanent loss.

Pricing Risk:

Seeding liquidity requires the proper pricing of binary instruments. Liquidity providers could face loss if options tokens are mispriced, or market volatility changes dramatically on short notice.
Last modified 1mo ago