DefiTuna Docs
  • DefiTuna Introduction
    • DefiTuna - Our Mission
  • Introduction - Who is it for?
  • Onboarding
    • Requirements
    • How to open a position
    • Monitoring Opened Positions
    • How to Lend
    • Setting Up a Directional Bias
  • Platform Info
    • Supply APR
    • Yield (24h) Estimation
    • Borrow APR and Lending Utilization
    • Supported Pools
    • Terminology
    • Fees
    • Take Profit / Stop Loss
    • Liquidations
    • Compound
  • Transaction Priority Fees
  • Security and Risks
    • Audits
    • Platform risks
    • Terms of Use
    • Disclaimer
  • Learn More
    • FAQ
    • Understanding Pseudo Delta Neutral
    • Understanding Impermanent Loss
    • How to open different strategies
      • Position opening
      • Long Farming
      • Short Farming
      • Neutral Farming
      • Perpetual Swap on DefiTuna
  • Brand Kit
    • Brand Kit
    • Contact
  • DefiTuna for Builders
    • SDK and Smart Contracts
Powered by GitBook
On this page
  1. Learn More
  2. How to open different strategies

Perpetual Swap on DefiTuna

PreviousNeutral FarmingNextBrand Kit

Last updated 5 months ago

Key Characteristics of a Perpetual Swap:

  • No Expiration: Users can hold a position indefinitely without an expiry date.

  • Leverage: Funds are borrowed and instantly swapped to amplify exposure in a specific direction.

  • Funding Rate: To maintain an open position, a funding rate mechanism is implemented to keep the price of the perpetual swap as close to the underlying asset's price as possible.

Some things to consider: It is not enough to simply borrow an asset to short it. Once the asset is borrowed, it must be swapped immediately to allow for repurchase at a later date. A trader realizes gains when the swapped funds are exchanged back into the borrowed asset.

Example: Imagine I borrow an iPhone with a market value of $1,000. After borrowing it, I immediately sell it for dollars and wait for a few months. Six months later, the market price of the same iPhone falls to $600. I then repurchase the iPhone and keep the difference, which is $400.

If I hadn’t swapped the iPhone for $1,000, I wouldn’t truly be "short" on the iPhone. Instead, I would remain exposed to its downside price depreciation.

Steps to Enter a Short Position:

  1. Borrow a token.

  2. Immediately swap it into a different token.

  3. Wait for the borrowed token to depreciate.

  4. Swap back into the borrowed token and realize the profit (the difference between the borrowed amount and what is returned).

Simulating a Short Perpetual Position on DeFiTuna: Now that we've established a core understanding of the basic characteristics, we can simulate this event on DeFiTuna. Let’s explore some key parameters we can adjust. For this simulation, let’s assume the current price of Solana (SOL) is 190 USDC per SOL.

Step 1 : Setting up Leverage + Borrow

In the following scenario, we've set the Leverage to 3.5 and adjusted our Borrow Ratio entirely to SOL, as shown in the green rectangular box on the left-hand side under Collateral.

  • Collateral: 100 SOL

  • Leverage: 3.5x

  • Borrow Ratio: 250 SOL (100% SOL borrow)

  • Total Position Size: 350 SOL

Step 2: Setting Up Swap on CLMM - Defining Your Range

In CLMM, what determines your directional bias isn’t strictly what you borrow but what you end up holding immediately after initiating the borrow. Remember the iPhone analogy we used earlier? If you borrow an iPhone but never convert it into dollars, you’re not truly "short" on the iPhone. Similarly, in this scenario, although we’ve borrowed Solana, we haven’t yet executed the correct conversion or swap to establish a directional position.

CLMM uses the Constant Product Formula to determine the price of an asset. This means you will always hold a combination of two tokens within the specified range at any given moment. However, if the range is set outside the current price, all your tokens will be converted into a single asset.

Let’s take a look at an example:

Your swap is directly correlated with the range you set up. If we want to swap all tokens into USDC, we need to select a range that lies to the left of the current price.

The following example demonstrates how a full short SOL position can be set up as a perpetual:

The above example would start closing your short position all the way from 184$ to 170$.

Another way to set up the range is by placing it much further from the current price. For example, you could set the "min price" to $2 and the "max price" to $3. As long as you have your limit orders in place, you would effectively replicate a perpetual futures position. By doing so, you eliminate linear dependencies.

Step 3 : Setting up Take Profit / Stop Loss

Use "Limit Orders" to designate the price point at which you'd like to take profit and stop-loss.

Key Things to Remember:

  • What you borrow is what you short!

  • Your Borrow Ratio is only half the equation—what you swap the borrowed asset into is equally important!

  • Always pay close attention to your range setup.

  • Use our limit orders as stop-loss or take-profit orders.

You can always see what the Swap will end up looking like under "Position Size" highlighted by the green rectangle on the left hand side .
You can set up "Stop Loss" and "Take Profit" using our Limit orders.