A New Transaction Fee Algorithm for Gamma Swap

Deri Protocol
2 min readNov 6, 2023

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:

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

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.



Deri Protocol

Deri Protocol = (Perpetual Futures + Everlasting Options) x Decentralized.