Excellent software and practical tutorials
GammaSwap Oracle-free decentralized platform for volatility trading and commission-free token trading
GammaSwap The GammaSwap protocol is a protocol for going long on gamma through constant function market makers (CFMMs) such as Uniswap, Sushiswap, Balancer, etc. GammaSwap allows users to not only buy long straddles, but also earn themselves returns similar to the functionality of call and put options.
As a side benefit, the protocol also allows for the possibility of fee-free DEX.
Sell Volatility/Short GammaSwap
The GammaSwap protocol cannot function without the existence of volatility sellers. Those are the liquidity providers for CFMMs.
Liquidity providers will provide liquidity to CFMMs, just as they currently do, the difference is that they will provide liquidity through GammaSwap. That is, LPs will send their tokens to GammaSwap, and GammaSwap will deposit them into CFMMs (such as Uniswap, Pancakeswap, etc.) in exchange for LP tokens.
However, these LP tokens from other CFMMs will not be provided to liquidity providers who short Gamma. Instead, they will remain in GammaSwap. GammaSwap will issue its own GammaSwap liquidity pool tokens, which are the same as the liquidity pool tokens in CFMMs, such as Uniswap (such as ERC-20 tokens), representing the liquidity providers' shares in the CFMM liquidity pool.

When liquidity providers seek to withdraw their deposited liquidity, they will exchange GammaSwap liquidity pool tokens for reserve tokens. To do this, GammaSwap measures their representation in the CFMM’s liquidity pool tokens, then destroys the tokens and uses the CFMM’s liquidity pool tokens to withdraw the tokens deposited by liquidity providers.
The accrued fees from GammaSwap wrapped AMM pools will be credited to GammaSwap liquidity providers along with the additional funding rate paid by those who borrow LP tokens to long volatility.
The incentive to provide liquidity on GammaSwap is that you will earn higher returns on your LP positions. The only additional risk is the additional smart contract risk that LPs incur from using GammaSwap, which can be mitigated through audits and bug bounties.

It is assumed that the assets provided as liquidity are borrowed and therefore hedged.

A graphical representation of the reward function for providing liquidity through GammaSwap assuming that the asset is borrowed as liquidity is as follows. For comparison, I added the rewards for providing liquidity to CFMMs outside of GammaSwap.

At any point in time, liquidity providers providing liquidity through GammaSwap are performing better than those providing liquidity directly through CFMMs.
Buy Volatility/Long Gamma

If providing liquidity to a CFMM enables a short Gamma position, then selling short liquidity from a CFMM will enable a long Gamma position. CFMM liquidity can be shorted by borrowing liquidity from the CFMM and withdrawing the reserve tokens it represents and holding them, turning impermanent losses into impermanent gains. Impermanent gains are the ability of borrowers to buy more LP tokens with their reserve tokens.
The borrower will of course also owe transaction fees for the borrowed liquidity.

A graphical representation of this returned function is as follows

Unfortunately, CFMM platforms do not allow borrowing liquidity. This is what makes GammaSwap different from other liquidity provision platforms.
The GammaSwap protocol aggregates liquidity tokens from popular CFMMs such as Uniswap, Pancakeswap, Sushiswap, etc. to allow them to be lent to other users who want to achieve long-term gamma exposure.
The GammaSwap protocol lends liquidity deposited into CFMMs by extracting reserve tokens and holding them as collateral in the GammaSwap smart contract. GammaSwap tracks the rate at which reserve tokens are extracted, as well as the price of the tokens at the time the borrower took out the loan. The impermanent loss experienced by the lender becomes the impermanent gain for the liquidity borrower. In exchange, the liquidity borrower will incur interest on the liquidity they borrowed plus the transaction fees accrued by the CFMM liquidity.
Since the liquidity token debt could grow larger than the liquidity reserve tokens she withdraws, the liquidity borrower will have to overcollateralize to ensure there is enough funds to acquire the liquidity tokens and pay the accrued returns on transaction fees and interest from liquidity providers.
The process of building a long position in Gamma is described as follows:

Since the LP's impermanent loss becomes the borrower's impermanent gain, the borrower will obtain a long gamma position, whose return can be expressed by the following function

The graphical representation of the above function is as follows

Since the borrowed liquidity will not be inside the CFMM, no transaction fees will be charged from the CFMM.
For this reason, GammaSwap will track the transaction fees generated by CFMM using the following function

GammaSwap is able to track liquidity providers’ returns by processing loans based on the invariants they represent in the CFMM rather than on LP shares.
The yield that LPs earn in CFMMs is an invariant growth that is a geometric mean of reserves in platforms like Uniswap, not a change in LP shares. Therefore, all interest owed by borrowers and paid to lenders is tracked in the form of additional invariant units from the CFMM.

The accrued interest owed by borrowers will be tracked by an ever-increasing index within GammaSwap, the growth rate of which will vary based on the pool's utilization rate. This growth rate represents the actual interest charged to borrowers. Since the utilization rate is always less than 1, the lending yield paid to depositors (liquidity providers) is always lower than the borrowing yield.

From the above functions, functions can be derived to calculate the total amount collected from borrowers and paid to lenders in the pool at any given time. These functions are as follows

So. As the available liquidity to borrow dries up through a utilization rate approaching 1, the platform’s interest will rise, which will incentivize LPs to provide liquidity through GammaSwap.
Conversely, when it falls, it will incentivize borrowers to short liquidity through GammaSwap.

Each liquidity loan will also track the block in the Ethereum blockchain, the number of GammaSwap borrow indexes it started at, and the borrowed liquidity. The interest accrued by the borrower will always be calculated using the following formula

When the liquidity borrower is ready to close a position, he simply closes the position.
Liquidity borrowers will either lose collateral or gain reserve tokens, depending on the price delta of the token pair in the CFMM minus transaction fees and GammaSwap interest paid to LPs.
The process of closing a loan is as follows:

The borrower initiates a liquidation in GammaSwap. The smart contract calculates the LP tokens of accrued interest that the loan represents and deposits enough reserve tokens into the CFMM to receive those LP tokens to repay the liquidity providers. The borrower then receives the remainder of her collateral plus the impermanent return she earned on price changes minus the interest she owes from trading fees accrued to the CFMM and interest owed to the liquidity providers.
The result is a market where borrowers of liquidity pool shares pay the CFMM trading fee yield plus the GammaSwap borrow yield, and liquidity providers earn the CFMM trading fee yield plus the GammaSwap borrow yield.

Call and Put Options
The GammaSwap protocol not only creates the opportunity to buy straddles, but also customizes volatility exposure to approximate the returns of a call or put option. This is achieved by changing the proportion of tokens held as collateral in GammaSwap, which essentially changes the payment function of the impermanent return.
For example, suppose a gamma buyer decides to exchange delta units of token x for token y, such that the ratio of reserve tokens held as collateral from borrowed liquidity is now different from the ratio she held at the inception of the loan.

Her return function now looks like this:

Therefore, one can tilt the ratio more towards one token or the other and get a payoff function similar to a traditional call or put option.


You may have noticed that the amount that needs to be deposited as collateral has increased significantly in both cases. This is necessary to make the position immune to flash loan attacks. However, it is possible to finance such positions through loans on decentralized lending platforms such as Aave or Compound.
The calculation formula for the price when the position loss is the largest (maximum loss price) is as follows

The liquidity represented by the collateral token at any point in time is given by the following formula

Since borrowed liquidity is constant and only grows with transaction fees and the GammaSwap borrow yield, we can use the formula above to see how much liquidity the collateral can provide at the maximum loss price (p_max)

Therefore, additional collateral needs to be added based on tokens x and y to ensure that the position remains overcollateralized above the required maintenance threshold at the p_max price.
By varying the proportion of reserve tokens used as collateral, you essentially gain a perpetual long volatility position that benefits more from a one-way directional movement in the market. This is similar to what you can achieve with a call or put option. However, the added benefit is that if the price moves against you, you may still have a gain.
Of course, if GammaSwap is used with a CFMM like Balancer, where the reserve token is already weighted to one side, the benefit of higher delta (the rate of change in the value of the position due to a change in the underlying price) as price moves in one direction will be more pronounced.
GammaSwap ensures deposit security
Since the loan may become undercollateralized if the transaction fees plus the accrued interest exceed the collateral amount to open the long Gamma position, there is an incentive to liquidate the loan.
That is, gamma buyers will be required to deposit collateral exceeding a certain threshold and maintain the collateral above a certain threshold, otherwise they will face third-party liquidation, and the third party will receive a certain percentage of the collateral compensation.

To do this, the GammaSwap protocol will emit events detailing information about the loan, which can be read by liquidation bots to track the health of the loan and constantly check the Ethereum blockchain.

No reliance on oracles
Lending platforms often rely on oracles to ensure asset security. The lack of a strong oracle for each asset leads to a problem of a reduced number of assets available for lending.
Unfortunately, these platforms must rely on oracles because relying on CFMMs for pricing data makes them vulnerable to flash loan attacks, in which the price of collateral can be temporarily depressed enough to force the liquidation of otherwise healthy loans.
Fortunately for GammaSwap, due to the shape of its yield curve, price manipulation via flash loans can never drive the value of the collateral down to zero. The value of that collateral can always be reduced to the minimum (besides additional collateral to cover trading fee yields and interest) that all volatility buyers need to maintain in order to open a position.

This opens up the possibility for GammaSwap to provide long-term gamma exposure not only to a small number of token pairs, but also to the entire crypto space, without relying on third parties for price verification, as is the case with Aave and Compound.
Therefore, even brand new and untested projects can provide long-term volatility exposure to increase the returns of their token liquidity providers and reduce the risk of participating in such projects.
Although, given the current implementation of CFMMs, it is possible that an attacker could perform enough round trips on a CFMM (paying a small fee, typically 0.6%, on each buy and sell) to cause the return on trading fees to spike high enough, the likelihood of forcing the liquidation of some positions is low given the cost required to design such a malicious attack.
Nonetheless, we have systems in place on our platform to prevent such attacks.
Free transactions of tokens
The total revenue paid to liquidity providers consists of transaction fees plus interest, and GammaSwap provides pricing functionality for interest.
It is conceivable that if GammaSwap used another CFMM for the same token pair that did not charge users trading fees, then GammaSwap’s total yield would be at least as good as that of the CFMM that charged trading fees.
Since GammaSwap can buy and sell volatility, there will be arbitrage opportunities if GammaSwap yields are significantly lower than other CFMMs.

Therefore, CFMMs do not need to charge transaction fees to their users using our model. The role of traders in GammaSwap is not to pay liquidity providers for the risk they are taking, but to net the positions of Gamma buyers, who are the actual buyers of the risk that liquidity providers are selling. A two-way market in volatility will be more efficient than a traditional AMM that sells volatility in exchange for volume.

Therefore, since LPs do not need to be compensated for the risk they take using fees, GammaSwap can be used to run a fee-free DEX. Gamma sellers earn income from gamma buyers while offsetting their positions against gamma buyers using spot buyers and sellers who trade commission-free. In addition to zero-commission trading and trading convenience, spot traders net-increase their positions in GammaSwap. Gamma traders are motivated by arbitrage opportunities on other exchanges that have reserve tokens at different prices than GammaSwap.
GammaSwap Protocol. A protocol that enables volatility trading through perpetual derivatives similar to straddles, calls, and puts in traditional financial markets.
These new types of derivatives have never existed before. They are perpetual and netted through a floating swap rate determined by market forces. Another benefit is that they enable commission-free trading of any token pair. The hope of the project is to correct the current mispricing in decentralized volatility markets to support the growth of decentralized financial liquidity, thus ensuring that the future of finance is decentralized.
GammaSwap official website:https://gammaswap.com/
GammaSwap Testnet:https://app.gammaswap.com/
GammaSwap Free Tutorial DeFi Decentralized Trading Platform Arbitrum New Public Chain