Skip to main content

Rates & Fees

Price Impact

Since its price comes from an oracle, Domination Finance doesn't require slippage like constant-product AMMs. That's good for users, but it means liquidity providers benefit less from arbitrage. On typical AMMs, arbitrage generates trade fees for LPs and also corrects the price to be equal to the wider market. Since Domination Finance oracle prices do not change based on trades, arbitrage is limited only by the amount of liquidity. Luckily, Domination Finance positions aren't fungible, so direct arbitrage is not possible. Hedging dominance between different platforms might be possible if similar competitors offer different rates on comparable perpetual instruments, but since funding rates vary based on a product's open interest this hedging should be self-limiting (and generate fee income for LPs).

Still, we think it's a good idea to disincentivize very large trades. A trader who opens a position large enough to fill a product's open interest risk management limit will prevent other traders from opening positions in the same direction until open interest decreases, which is a bad user experience. LPs would prefer smooth changes in vault PnL from many small positions with different liquidation points, rather than large swings in PnL from a handful of big positions. And making very large trades very expensive could make flash loan attacks more difficult (though our oracle design is not susceptible to traditional flash loan price manipulation).

So trades on Domination Finance incur slippage (or price impact) according to the familiar constant-product formula. First, we calculate the theoretical max exposure a product can have:

/// @notice open interest of a product is limited to 3x its proportional share of maxExposure
FPUnsigned public maxExposureMultiplier = FixedPoint.fromUnscaledUint(3);

struct Product {
...
FPUnsigned weight; // share of the max exposure
FPUnsigned reserveMultiplier;
FPUnsigned exposureMultiplier;
FPUnsigned maxExposure = product.exposureMultiplier
.mul(domFiVault.totalAssets())
* product.weight / totalWeight
* maxExposureMultiplier;

Then, we compute the remaining exposure available for this product:

FPUnsigned newExposure = product.openInterestLong + product.openInterestShort + amount;
FPUnsigned remainingExposure = maxExposure - newExposure;

Finally, we multiply this remaining exposure by the product's reserveMultiplier to calculate a virtual "reserve". Applying the constant-product formula yields a scaling factor we apply to price:

slippage calculation
long slippage=remainingExposure×reserveMultiplierremainingExposureorderAmountshort slippage=remainingExposure×reserveMultiplierremainingExposure+orderAmountprice=slippage×oraclePrice\begin{align*} \text{long slippage} &= \frac{remainingExposure \times reserveMultiplier}{remainingExposure - orderAmount} \\ \text{short slippage} &= \frac{remainingExposure \times reserveMultiplier}{remainingExposure + orderAmount} \\ \text{price} &= \text{slippage} \times oraclePrice \end{align*}

There's one more wrinkle: in order to incentivize even longs and shorts, we apply an additional penalty depending on how unbalanced this product's long and short positions are.

/// @dev scaling factor for price shift that balances long and short exposure
FPUnsigned public maxShift = FixedPoint.fromUnscaledUint(3).div(1000);

FPSigned shift = (openInterestLong - openInterestShort) * maxShift / maxExposure;

And for "helpful" orders that decrease this discrepancy, we reduce the penalty:

/// @dev scale price shift to 1/3 (giving more favorable prices) for orders that reduce net exposure
FPUnsigned public helpfulShiftScaler = FixedPoint.ONE.div(3);

bool decreasesExposure = isLong
? openInterestLong < openInterestShort
: openInterestLong > openInterestShort;
slippage = slippage + (decreasesExposure ? shift * helpfulShiftScaler : shift);

Phew! Most users won't have to worry about price impact at this level of detail.

Funding and Interest Rates

All positions are subject to a flat interest rate. Currently this is 0% APR for all products.

All positions are subject to a perpetual futures funding rate that aims to incentivize even long and short prices. When a product has more long open interest than short open interest, the longs pay the shorts. When the situation is reversed, shorts pay longs.

Funding and interest rates are calculated and recorded by FundingManager. At regular intervals, FundingManager updates integrals of the funding and interest rates for each product. Newly created or updated positions include the point-in-time integral of funding rates for that product. At any time, subtracting this saved value from the current integral yields the total funding percent owed by or to a position. This is a percent of the position's total size (margin×leveragemargin \times leverage); positions with high leverage will pay or receive high funding rates.

Funding and interest accumulation don't cause margin to be transferred between positions. Instead, they are reflected in a position's PnL when closing or liquidating it.

calculating funding rate

First find the product's maxExposure:

FPUnsigned maxExposure = product.exposureMultiplier
.mul(domFiVault.totalAssets())
* product.weight / totalWeight
* maxExposureMultiplier;

Then,

funding rate=openInterestLongopenInterestShortmaxExposure×fundingMultiplier\text{funding rate} = \frac{openInterestLong-openInterestShort}{maxExposure} \times fundingMultiplier \\

Currently, fundingMultiplier=2fundingMultiplier = 2 for all products. A positive funding rate benefits short positions; a negative funding rate benefits long positions.

Currently, the maximum funding rate for a position on any product is ±10% APR.

Trade Fees

Creating, updating, or closing a position incurs a trade fee proportional to the increase or decrease in size (margin×leveragemargin \times leverage). This percent is set per-product, discounted by FeeCalculator and distributed by FeeDistributor.

Currently, all products have trade fees of 0.15%. FeeCalculator applies three discounts to this fee.

  • A per-account discount. This allows governance to reward winners of promotions and competitions. Currently, no per-account discounts are set.
  • A per-sender discount. This allows governance to reward provide a special rate to traders who use a particular order bot to execute trades. Currently, no per-sender discounts are set.
  • A per-referrer discount. This allows users to refer others and give them permanent fee discounts. By default, FeeReferral gives users a 5% discount on trade fees, but governance can increase this discount for referrers who meet certain metrics.

Domination Finance's referral program also includes fee redirection. If a user enters a referral code, part of their trade fees are sent directly to the referrer's vault balance instead of to FeeDistributor. Like the per-referrer discount, the redirect amount is customizable. By default, 5% of trade fees (after discount) are redirected to the referring account.