Derify Protocol Documents
English
Search…
⌃K

Position Change Fee

Position change means any activity that changes the value of positions, including open, close or liquidate positions. Position change cause changes in naked positions.
The hAMM system has a special Position Change Fee (PCF) mechanism rewarding position changes that decrease naked positions, and discouraging position changes that increase naked positions.
When traders increase the naked positions of a certain derivative, they will pay extra PCF to the system, and on the flip side, receive PCF from the system.
The existence of PCF will encourage arbitrageurs to earn risk-free profit as follows: open a position under Derify protocol that is opposite to the naked position, then open a hedged position in an external market.
Such action is called "naked position arbitrage", which effectively takes naked position to external markets, and decreases the risk exposure of the system.
The existence of arbitrageurs will keep the value of naked position
NN
close to zero, thus restricting naked position.

Liquidity Depth Factor

Liquidity Depth Factor (LDF)
DD
is a function to position pool
PP
, the formula of which is as follows:
D=f(P)=min(κP, ψ)=min(κ(XallYall), ψ)D=\boldsymbol{f}(P)=\min{(\kappa*P,\ \psi)}=\min{\Big(\kappa*(X_{all}-Y_{all}),\ \psi\Big)}
When the liquidity depth is limited,
DD
equals risk sensitivity coefficient
κ\kappa
multiplied by position pool
PP
.
When the liquidity depth reached a certain threshold (
κP>ψ\kappa*P>\psi
),
DD
always equals to external liquidity depth simulator
ψ\psi
.
Risk sensitivity coefficient
κ\kappa
is a pre-set constant. A smaller
κ\kappa
means the higher position pool
PP
is needed to maintain the liquidity depth, i.e. the system is more sensitive.
External liquidity depth simulator
ψ\psi
is another constant, determined by the liquidity depth of external markets.
κ\kappa
and
ψ\psi
are changeable and can be adjusted via DAO community voting.

PCF Rates

PCF rates
RR
is used to calculate the PCF, the formula of which is as follows:
R=ND=Xc+Ycmin(κ(XallYall), ψ)R=\dfrac{N}{D}=\dfrac{X_c+Y_c}{\min{\Big(\kappa*(X_{all}-Y_{all}),\ \psi\Big)}}
  • XX
    is always positive and
    YY
    is always negative.
The sign of
RR
is determined by
NN
.
When
NN
is positive:
  • naked position is long
  • PCF is positive
  • opening long position/closing short position shall pay PCF payment
  • opening short position/closing long position shall receive PCF rewards
When
NN
is negative:
  • naked position is short
  • PCF is negative
  • opening short position/closing long position shall pay PCF payment
  • opening long position/closing short position shall receive PCF rewards
RR
is a state of the system.

PCF Cost for A Transaction

PCF cost
cc
for a transaction, means the PCF payable upon the transaction which shift the system naked position from
NN
to
NN'
,and PCF rates from
RR
to
RR'
. Assuming the position changed is
Δp\Delta p
, it is calculated as follows:
c={NN(R+R2+ρ),R>R0,R=RNN(R+R2+ρ),R<Rc=\begin{cases} -\Big||N'|-|N|\Big|*\Big(\dfrac{|R|+|R'|}{2}+\rho\Big),&|R|>|R'|\\ \\ 0,&|R|=|R'|\\ \\ \Big||N'|-|N|\Big|*\Big(\dfrac{|R|+|R'|}{2}+\rho\Big),&|R|<|R'| \end{cases}
The actual PCF fee is not correlated to the size and direction of
Δp\Delta p
, but only related to the change of naked position (
NN\Big||N'|-|N|\Big|
) and PCF rates (
R|R|
R|R'|
).
When
cc
is positive, the trader pays a fee, when
cc
is negative, the trader gets rewards.
ρ\rho
is external arbitrage cost coefficient, to encourage external arbitrageurs by covering their slippage and trading cost when they doing the arbitrage. Generally,
ρ\rho
= 0.1% may cover most of the arbitrage cost.
ρ\rho
is changeable and can be adjusted via DAO community voting.