# A New Transaction Fee Algorithm for Gamma Swap

Since its introduction earlier this year, Gamma Swap has garnered significant attention. Despite its appeal, the beta phase highlighted several concerns. Most technical issues have been addressed, yet the matter of transaction fees demands a novel solution.

Under the existing fee algorithm, closing a Gamma Swap position often incurs an exorbitant cost. This issue originates from the absence of a pre-existing model for fee calculation during the initial design phase of Gamma Swap, a pioneering derivative product. Initially, we adopted a straightforward method, imposing fees on the power perpetual component, but this approach has been shown to be impractical.

To remedy this, we propose the * Info-Advantage-Based fee algorithm*. The idea of this model is to neutralize the profits that a trader might gain with an informational edge of a certain size. Take, for example, a front-runner who has the ability to get ahead of the DPMM by a margin of 0.1% in price movement. The fee structure is designed so that the gross revenue they would make from a round trade (opening and closing a position) would be offset by the transaction fee.

Employing this principle, we've formulated the following fee algorithm:

where

$i$ represents the index price of the underlying (e.g. the price of BTC)

$M_{power}$ the mark price of the power perp component; $M_{power}$ the mark price of the futures component

$m'=\frac{2i}{1-hT}-\frac{2i_0}{1-h_0T}\approx2(i-i_0)$ is the number of effective futures.

Inside the code, this is the algorithm of calculating the exact amount of the fee charged on a specific trade:

The current transaction fee is $Cost_{Power}\cdot 0.002$

Please note the figures 0.002 and 0.02 are illustrative parameters chosen to demonstrate the mechanics of the new algorithm. The final parameters will be established upon the official release of Gamma Swap featuring the updated fee algorithm.

We will officially release the Gamma Swap with this new fee algorithm in Deri V4.

Last updated