# Welcome to GooseFX

<figure><img src="/files/XeCpr0dxdGv4K4kn3L3F" alt=""><figcaption></figcaption></figure>

## What is GooseFX?

GooseFX is your ultimate DeFi hub on Solana, featuring **GAMMA**, our dynamic fee-enabled Automated Market Maker (AMM). Our mission is to provide a seamless platform for earning yields with high capital efficiency!

### **GAMMA AMM**

* **Dynamic Fees:** Adjusted based on pool volatility and rebalancing mechanisms
* **Fusion:** Optimizes liquidity utilization by deploying unused capital in the pool into external yield-generating platforms to maximize yield
* **Boosted Rewards:** Add up to 3 additional tokens as rewards to any pool for a set duration. Liquidity Providers (LPs) earn these extra incentives on top of the base rewards as LPing incentive.&#x20;
* **Permissionless Pool Creation:** Easily create liquidity pools with **the lowest fees 0.1 SOL**
* **Revenue Sharing and $GOFX Burn Mechanism:** A portion of the fees generated is used for buyback and burn of $GOFX, while $GOFX stakers earn a share of the revenue in USDC.
* **Referral Program:** Refer your friends to GAMMA and earn a share of their LP fees.
* **Token2022 Support:** Offering compatibility with the latest Solana Token2022 standard.
* **Open Source Code**

### **Stake $GOFX, Earn USDC**

Stake your $GOFX tokens to participate in our revenue-sharing program and earn **USDC**. Our tokenomics is designed with the community in mind, ensuring that users benefit through fee sharing and token burns.

***

### **What’s Changed?**

* Single sided liquidity pools, Perpetual futures and the NFT aggregator have been **sunsetted** to focus on our core offering: GAMMA

Our goal remains simple—keeping GooseFX community-first and aligned with the true spirit of DeFi.

***

## Learn More

{% content-ref url="/pages/pqFlKZMyPOErLFDx3vvk" %}
[GAMMA](/goosefx-amm/clmm)
{% endcontent-ref %}

{% content-ref url="/pages/-MbpwJ0ySFvQMtSaWdzK" %}
[GOFX Token](/tokenomics/gofx-token)
{% endcontent-ref %}

{% content-ref url="/pages/vdGEuf3ga8jmavqyYmSg" %}
[Stake Rewards & Fee Share](/tokenomics/stake-rewards-and-fee-share)
{% endcontent-ref %}


# Risks & Disclaimer

There are inherent risks with any great undertaking, especially in the crypto space. These are the major risks that we are aware of at present.

### **Impermanent Loss**

Due to the constant fluctuation in the price values of asset pairs, impermanent loss (IL) is an inherent risk in our system. While complete avoidance of IL is currently impossible, our platform strives to minimize it as much as possible.

### **Initial Liquidity**&#x20;

Sufficient liquidity is essential in our pools to facilitate swaps. In cases of insufficient liquidity for large swaps, we rely on backup sources like team treasury to provide backstop liquidity to continue operations.&#x20;

### **Smart Contract Risk**

The possibility of bugs or exploits in smart contracts or the user interface, leading to potential fund losses.

### **Blockchain Network Risk**

Risks associated with the ongoing development of the underlying blockchain network, including operational, security, and technological uncertainties.

### **Oracle Risk**

Dependence on external price feeds, with the risk of incorrect data leading to wrongful liquidations.

### **Failure to develop**

There is the risk that the development of the GooseFX platform will not be executed or implemented as planned, for a variety of reasons, including without limitation the event of a decline in the prices of any digital asset, virtual currency, or GOFX, unforeseen technical difficulties, and shortage of development funds for activities.&#x20;

### **Security weaknesses**

Hackers or other malicious groups or organizations may attempt to interfere with GOFX and/or the GooseFX platform in a variety of ways, including, but not limited to, malware attacks, denial of service attacks, consensus-based attacks, Sybil attacks, smurfing, and spoofing. Furthermore, there is a risk that a third party or a member of the Company, the Distributor, or their respective affiliates may intentionally or unintentionally introduce weaknesses into the core infrastructure of GOFX and/or the GooseFX platform, which could negatively affect GOFX and/or the GooseFX platform.

### **Uncertain Regulations and Enforcement Actions**

The regulatory status of the GooseFX platform, GOFX, and distributed ledger technology is unclear or unsettled in many jurisdictions. The regulation of digital assets has become a primary target of regulation in all major countries in the world. It is impossible to predict how, when, or whether regulatory agencies may apply existing regulations or create new regulations concerning such technology and its applications, including GOFX and/or the GooseFX platform. Regulatory actions could negatively impact GOFX and/or the GooseFX platform in various ways. The Company, the Distributor (or their respective affiliates) may cease operations in a jurisdiction if regulatory actions, or changes to law or regulation, make it illegal to operate in such jurisdiction, or commercially undesirable to obtain the necessary regulatory approval(s) to operate in such jurisdiction.&#x20;

### Disclaimer

(d) is not intended to represent any rights under a contract for differences or under any other contract the purpose or pretended purpose of which is to secure a profit or avoid a loss;

(e) is not intended to be a representation of money (including electronic money), security, commodity, bond, debt instrument, unit in a collective investment scheme, or any other kind of financial instrument or investment;

(f) is not a loan to the Company, the Distributor, or any of their respective affiliates, is not intended to represent a debt owed by the Company, the Distributor, or any of their respective affiliates, and there is no expectation of profit; and

(g) does not provide the token holder with any ownership or other interest in the Company, the Distributor, or any of their respective affiliates.

Notwithstanding the GOFX distribution, users have no economic or legal right over or beneficial interest in the assets of the Company, the Distributor, or any of their affiliates after the token distribution.

Deemed Representations and Warranties: By accessing the Litepaper or the Website (or any part thereof), you shall be deemed to represent and warrant to the Company, the Distributor, their respective affiliates, and the GooseFX team as follows:

(a) in any decision to acquire any GOFX, you shall not rely on any statement set out in the Litepaper or the Website;

(b) you will and shall at your own expense ensure compliance with all laws, regulatory requirements, and restrictions applicable to you (as the case may be);

(c) you acknowledge, understand, and agree that GOFX may have no value, there is no guarantee or representation of value or liquidity for GOFX, and GOFX is not an investment product nor is it intended for any speculative investment whatsoever;

(d) none of the Company, the Distributor, their respective affiliates, and/or the GooseFX team members shall be responsible for or liable for the value of GOFX, the transferability and/or liquidity of GOFX, and/or the availability of any market for GOFX through third parties or otherwise; and

(e) you acknowledge, understand, and agree that you are not eligible to participate in the distribution of GOFX if you are a citizen, national, resident (tax or otherwise), domiciliary, and/or green card holder of a geographic area or country (i) where it is likely that the distribution of GOFX would be construed as the sale of a security (howsoever named), financial service or investment product and/or (ii) where participation in token distributions are prohibited by applicable law, decree, regulation, treaty, or administrative act (including without limitation the United States of America and the People's Republic of China); and to this effect you agree to provide all such identity verification document when requested in order for the relevant checks to be carried out.

The Company, the Distributor, and the GooseFX team do not and do not purport to make, and hereby disclaims, all representations, warranties, or undertaking to any entity or person (including without limitation warranties as to the accuracy, completeness, timeliness, or reliability of the contents of the Litepaper or the Website, or any other materials published by the Company or the Distributor). To the maximum extent permitted by law, the Company, the Distributor, their respective affiliates, and service providers shall not be liable for any indirect, special, incidental, consequential, or other losses of any kind, in tort, contract or otherwise (including, without limitation, any liability arising from default or negligence on the part of any of them, or any loss of revenue, income or profits, and loss of use or data) arising from the use of the Litepaper or the Website, or any other materials published, or its contents (including without limitation any errors or omissions) or otherwise arising in connection with the same. Prospective acquirers of GOFX should carefully consider and evaluate all risks and uncertainties (including financial and legal risks and uncertainties) associated with the distribution of GOFX, the Company, the Distributor, and the GooseFX team.

Informational purposes only: The information set out herein is only conceptual, and describes the future development goals for the GooseFX platform to be developed. In particular, the project roadmap in the Litepaper is being shared to outline some of the plans of the GooseFX team and is provided solely for INFORMATIONAL PURPOSES and does not constitute any binding commitment. Please do not rely on this information in deciding whether to participate in the token distribution because ultimately, the development, release, and timing of any products, features or functionality remains at the sole discretion of the Company, the Distributor, or their respective affiliates, and is subject to change. Further, the Litepaper or the Website may be amended or replaced from time to time. There are no obligations to update the Litepaper or the Website or to provide recipients with access to any information beyond what is provided herein.

Regulatory approval: No regulatory authority has examined or approved, whether formally or informally, any of the information set out in the Litepaper or the Website. No such action or assurance has been or will be taken under the laws, regulatory requirements, or rules of any jurisdiction. The publication, distribution, or dissemination of the Litepaper or the Website does not imply that the applicable laws, regulatory requirements, or rules have been complied with.

Cautionary Note on forward-looking statements: All statements contained herein, statements made in press releases or in any place accessible by the public, and oral statements that may be made by the Company, the Distributor, and/or the GooseFX team, may constitute forward-looking statements (including statements regarding the intent, belief or current expectations with respect to market conditions, business strategy and plans, financial condition, specific provisions and risk management practices). You are cautioned not to place undue reliance on these forward-looking statements given that these statements involve known and unknown risks, uncertainties, and other factors that may cause the actual future results to be materially different from that described by such forward-looking statements, and no independent third party has reviewed the reasonableness of any such statements or assumptions. These forward-looking statements are applicable only as of the date indicated in the Litepaper, and the Company, the Distributor as well as the GooseFX team expressly disclaim any responsibility (whether express or implied) to release any revisions to these forward-looking statements to reflect events after such date.

References to companies and platforms: The use of any company and/or platform names or trademarks herein (save for those which relate to the Company, the Distributor, or their respective affiliates) does not imply any affiliation with, or endorsement by, any third party. References in the Litepaper or the Website to specific companies and platforms are for illustrative purposes only.

English language: The Litepaper and the Website may be translated into a language other than English for reference purposes only and in the event of conflict or ambiguity between the English language version and translated versions of the Litepaper or the Website, the English language versions shall prevail. You acknowledge that you have read and understood the English language version of the Litepaper and the Website.

No Distribution: No part of the Litepaper or the Website is to be copied, reproduced, distributed, or disseminated in any way without the prior written consent of the Company or the Distributor. By attending any presentation on this Litepaper or by accepting any hard or soft copy of the Litepaper, you agree to be bound by the foregoing limitations.


# GAMMA v2 - Hybrid CLMM

GAMMA v2 blends CPAMM & CLMM for capital efficient routing resulting in better yields

<figure><img src="/files/z5OATOed5TIEfAWezqEf" alt=""><figcaption></figcaption></figure>

## What’s New in GAMMA v2?

* **Hybrid CLMM Architecture**\
  Automatically switches between CPAMM and CLMM depending on which curve offers better pricing based on oracle and pool price data.
* **Passive Management**\
  LPs don’t need to adjust ranges, positions are auto-rebalanced based on volatility and utilization.
* **Dynamic Fees**\
  Fees scale with volatility and imbalance, maximizing returns during volatile markets.&#x20;

  1. We also add a drift factor, this is an extra fee we can charge if the pool's spot price goes X% distance away from last known oracle price. This prevents stale quotes.&#x20;

  &#x20; 2\.  If the oracle price itself is stale but users wish to swap, we add a very small dynamic fee -   considered a volatility fee.&#x20;
* **Built-in Arb Protection**\
  Our smart-contract protects LPs from most arbitrageurs. We reject any swaps that try to do arb and can cause any potential losses to LPs.&#x20;
* **Idle Capital Optimization (Fusion 2.0)**\
  Out-of-range liquidity is automatically deposited into borrow/lend protocols (e.g. Kamino) to earn yield until reactivation.
* **Revenue Sharing for** [**GOFX Stakers**](/tutorials/how-to-stake-unstake-gofx)\
  Earn daily USDC payouts if you stake GOFX through our stake rewards program. This helps offset any IL (impermanent loss) through real yield.&#x20;

### How Does the Hybrid CLMM Work?

1. **Swap Execution**
   * GAMMA compares pool price and oracle price.&#x20;
   * If the oracle offers better price execution, GAMMA concentrates the liquidity via its CLMM.&#x20;
   * Otherwise, it routes through the default CPAMM structure for better depth and price.
2. **Auto-Rebalancing**
   * Pool positions are auto rebalanced through our algorithm.&#x20;
   * Range rebalancing happens automatically based on liquidity distribution, trade volume, and oracle price.
3. **Yield Enhancements**
   * Dynamic fees increase LP earnings in volatile conditions.
   * Arbitrage profits are recycled into the pool.
   * Idle funds are deployed for additional yield (Kamino, Drift, etc.).

### Why It Matters

* **Less price impact** → More swap routes/volume
* **More yield** → From both fees + external yield
* **Less management** → LP once, let GAMMA handle the rest


# Risk & Arbitrage Protections

Under-the-hood improvements focused on performance, pricing accuracy, and protection from toxic flow.

**Smarter Fee & Flow Logic**

* **1-min Volatility Windows**: Price volatility is tracked in rolling 1-minute windows directly on-chain.
* **Oracle-Based Pricing**: Fees is calculated using oracle-driven price changes instead of just swap deltas.
* **Unified Swap Direction Handling**: Swap direction logic (A→B & B→A) is evaluated together using shared price and volatility context.

<figure><img src="/files/9I3LbwWvSkqLxUGiGmpt" alt=""><figcaption></figcaption></figure>

**Reliable Execution During Congestion**

* **Compute-Aware Batching**: Large transactions are split into smaller compute-efficient instructions.
* **Adaptive Priority Fees**: GAMMA adjusts priority fees in real time to increase success during network congestion.

These changes reduce missed updates on volatile pairs and improve swap reliability.

**Improved Oracle Management**

* **Slot-Based Staleness Checks**: Price freshness is now tracked by Solana slot height instead of wall-clock time, improving consistency.
* **Smarter CEX Routing**: Off-chain price polling is routed via the most liquid CEX book, not just aggregator feeds.

**Toxic Flow Resistance**

* **Directional Fees Optimization**: LP protection mechanisms now handle fee symmetry more efficiently, reducing arbitrage exposure.

\
These measures help GAMMA deliver better pricing, reduce arb risk, and grow yield for LPs.


# GAMMA - CPAMM

Goose Automated Market Making Algorithm v1

## What is GAMMA?

Goose Automated Market Making Algorithm (G**AMM**A) is a constant product amm with dynamic fee-providing a superior LP experience by utilizing dynamic fee with during volatility and pool rebalancing mechanisms. \
\
GAMMA takes price volatility and pool balances to calculate the optimal fees. Allowing users to create permissionless pools and supporting the Token22 program.\
\
A portion of fees generated from GAMMA is used to buyback and burn the $GOFX token (see below) and a percentage of revenue is shared amongst $GOFX stakers.

{% content-ref url="/pages/-MbpwJ0xVyQp\_acNtit8" %}
[Tokenomics](/tokenomics/gofx-token)
{% endcontent-ref %}

### GAMMA Key Features

* Dynamic fees based on price volatility
* GAMMA Fusion allocates idle capital in pool to borrow lend protocols like Kamino
* Boosted rewards to incentivize LPs
* Permissionless pool creation
* Referral program and Token22 Support
* Open source code
* $GOFX revenue share and burn mechanism

### What can I do on GAMMA?

* Deposit and earn yield
* Boost pools with token rewards
* Create Pools<br>

### Track onchain data for GAMMA on Dune

{% embed url="<https://dune.com/overdose_btc/gamma-by-goosefx>" %}


# Learn about AMMs

* **What is an AMM?**\
  An Automated Market Maker (AMM) is a decentralized exchange mechanism where users trade against liquidity pools instead of traditional order books. AMMs maintain a balance between the tokens in a pool using mathematical formulas (x \* y = k) to enable swaps
* **What is Idle Capital?**\
  Idle capital refers to unused liquidity sitting in pools that isn't actively utilized in trades. For example, in a SOL-USDC pool during an uptrend, most trades may involve swapping USDC for SOL, leaving a large portion of USDC untouched.
* **Liquidity Provider (LP)** Users who deposit tokens into AMM pools to enable trading and earn fees.
* **Dynamic Fees** A mechanism where fees is adjusted based on pool activity and volatility, benefiting LPs during market volatility.
* **Capital Efficiency** Maximizing the utility and yield of deposited funds in a pool.
* **Total Value Locked (TVL)** The total amount of funds locked in an AMM’s liquidity pools, representing the scale of liquidity available for trading.
* **Slippage** The difference between the expected price of a trade and the actual price due to insufficient liquidity or high trade size.
* **Impermanent Loss (IL)** A temporary loss in value experienced by LPs when the price of tokens in a pool changes significantly compared to when they were deposited.
* **Liquidity Pool (LP)** A pool of two tokens that enables trading on an AMM by maintaining a balance according to a constant product formula.
* **External Protocols** Platforms outside of GooseFX, such as lending or borrowing protocols, where Fusion deploys idle capital to earn additional yield.
* **Dynamic Rebalancing** The process of adjusting deployed liquidity based on pool needs and market conditions to maintain optimal performance.
* **Permissionless Pools** Liquidity pools that can be created by anyone without approval, allowing a wide range of token pairs to trade on the AMM.


# Dynamic Fees

GAMMA Dynamic Fees Explained

The dynamic fee model and pool reblancing for our AMM was created by iterating on the numerous AMM designs throughout crypto over the years but adapted to the specific characteristics of a constant product system, which doesn’t use discrete price bins. Instead, we use factors like volatility to compute the dynamic fee.

Dynamic Fee depends on&#x20;

1. **How volatile the market is:** If prices are fluctuating frequently, we increase the fee to protect the pool and generate more rewards for Liquidity Providers (LPs).
2. **How balanced the pool is:** GAMMA aims for a 50/50 split of token amounts in the pool. The further away from that balance we get, the more we adjust the fee.
3. **Volume:** If trading volume is high, fees can adapt to provide the optimum returns for LPs.

***

## **Dynamic Fee Formula**

{% code fullWidth="false" %}

```
dynamic_fee_rate = base_fee + volatility_component + recent_price_volatility
```

{% endcode %}

* **volatility\_component**

{% code lineNumbers="true" fullWidth="false" %}

```
volatility_component = min(max_volatility_fee, volatility_factor * recent_price_volatility)
```

{% endcode %}

* **recent\_price\_volatility**

<pre class="language-html" data-line-numbers data-full-width="false"><code class="lang-html"><strong>recent_price_volatility = (max_price - min_price) / avg_price over the last N observations
</strong></code></pre>


# Fusion

GAMMA Fusion - Optimizing Unused Capital in Liquidity Pools

**GAMMA Fusion** is an enhancement for GooseFX's GAMMA, designed to optimize liquidity utilization by deploying unused capital into external yield-generating platforms.

{% content-ref url="/pages/Y8v3mGImLdukPIUnFSTn" %}
[Learn about AMMs](/goosefx-amm/gamma/learn-about-amms)
{% endcontent-ref %}

### GAMMA Fusion

<figure><img src="/files/9M0fUAiUPXF229zlCJSI" alt=""><figcaption></figcaption></figure>

1. **Dynamic Liquidity Allocation**
   * A portion of unused capital from pools will be deployed into external protocols like Kamino Finance, Drift, Marginfi to earn yield.
   * Blue-chip and primary token pairs (SOL-USDC) will be prioritized due to their stable price movements.
   * A maximum of **15% of TVL** can be deployed to external protocols.
2. **Rebalancing Mechanism**
   * Regular rebalancing to withdraw or deposit liquidity based on market volatility and pool utilization.
   * **Rebalancing occurs every 15 minutes**, with the flexibility to be adjusted as needed.
3. **Integration with External Protocols**
   * Liquidity will be allocated to external lending/borrowing platforms or concentrated liquidity pools based on TVL thresholds. Trusted platforms like Kamino Finance, Drift, Marginfi and others.

***

**Pool State Modifications**

* A new variable, `max_shared_liquidity`, will determine the proportion of liquidity deployable to external protocols.

**New Instructions**

* **Rebalance Pool**: Automatically adjusts liquidity to stay within the `max_shared_liquidity` threshold.
* **Deposit Shared Liquidity**: Allocates unused liquidity to external platforms.
* **Withdraw External Deposits**: Reclaims liquidity from external platforms for pool needs.

***

#### Risk Mitigation

1. **Smart Contract Risks**: Full audits of new functionalities.
2. **Liquidity Constraints**: Ensure external platforms have no lock-in periods, avoiding liquidity shortages during high trade volumes.
3. **Operational Risks**: Implement fallback mechanisms to withdraw liquidity during protocol downtimes.

***

### FAQs

* **Does Fusion affect swap fees or slippage?**\
  No, swap fees and slippage remain the same. Fusion optimizes idle capital to maximize yields.
* **Can I create permissionless fusion pools?**\
  Yes, users can create permissionless pools, but Fusion is only added to select blue-chip pools chosen by the GooseFX team.
* **Are there risks to my deposited liquidity with Fusion?**\
  Yes, there is a small risk from external platforms’ smart contracts, where Fusion deploys idle capital.
* **How does Fusion impact my LP earnings?**\
  Fusion boosts pool yields by using idle capital in external lending protocols.
* **What percentage of liquidity is deployed externally?**\
  &#x20;A maximum of **15% of TVL** can be deployed to external protocols.
* **Will my LP tokens or positions change?**\
  No, Fusion does not alter your LP tokens or positions.
* **Can I withdraw 100% of my liquidity with Fusion active?**\
  Yes, you can withdraw your entire LP position at any time.
* **Are there lock-in periods for external liquidity?**\
  No, there are no lock-in periods for liquidity deployed externally.

***


# Boosted Rewards

GAMMA Boosted Rewards - Permissionless additional yield on any pool!

*<mark style="color:purple;">**GAMMA Boosted Rewards**</mark>* *is an enhancement for GooseFX's GAMMA, designed to incentivize liquidity providing by allocating additional rewards in a LP pool*&#x20;

{% content-ref url="/pages/Y8v3mGImLdukPIUnFSTn" %}
[Learn about AMMs](/goosefx-amm/gamma/learn-about-amms)
{% endcontent-ref %}

**GAMMA Boosted Rewards** allows you to add any SPL token as an additional reward to any LP pool on GAMMA with a defined reward duration. A single pool can have multiple tokens as boosted rewards making LPing on highly profitable. Additional yield helps to minimize any potential impermanent loss and generate higher yields of the user.&#x20;

### How to claim boosted rewards?

* Connect wallet on GAMMA
* If you have any pending rewards on GAMMA on any of the pools, a "Claim all" button will be enabled to claim any pending rewards.&#x20;
* Click "claim all" and confirm to claim all pending rewards, as simple as that.

<figure><img src="/files/9urGKaBBtpDr93u15DI4" alt=""><figcaption><p>Claim boosted rewards</p></figcaption></figure>

### How to add boosted rewards to a pool on GAMMA?

* Click create on GAMMA
* Select "Add token rewards"
* Select the pool you want to add extra tokens as rewards
* Then choose the token and amount you want to add as reward in the pool
* Define a timeframe to start and end the token rewards program
* Review the final screen and confirm by clicking "Add token rewards"&#x20;

<figure><img src="/files/DYYEW5ksN5BJNrbSSuW2" alt=""><figcaption><p>How to add boosted rewards to a pool</p></figcaption></figure>

***


# Program Instructions

Interacting with GAMMA pools and handling fee collection

### In the spirit of web3, we are providing our codebase as open source for anyone to read and comment on. Here are some key details of the program code. We also have SDKs for anyone to integrate directly with the program.&#x20;

### **create\_amm\_config**

Creates and configures the AMM protocol parameters including trade fees, protocol fees, and more.

**Parameters:**

* `index`: Index of the AMM configuration.
* `trade_fee_rate`: Rate for trade fees.
* `protocol_fee_rate`: Rate for protocol fees.
* `fund_fee_rate`: Rate for fund fees.
* `create_pool_fee`: Fee for creating a pool.

**Context Accounts:**

* `owner`: Signer who is the address to be set as the protocol owner.
* `amm_config`: Account to initialize and store protocol owner address and fee rates.
* `system_program`: System program reference.

### **update\_amm\_config**

Updates the AMM configuration owner or fee rates.

**Parameters:**

* `param`: Parameter to update (0: trade fee, 1: protocol fee, 2: fund fee, 3: new owner, 4: new fund owner).
* `value`: New value for the specified parameter.

**Context Accounts:**

* `owner`: Signer who is the AMM config owner or admin.
* `amm_config`: Account storing the AMM configuration.

### **update\_pool\_status**

Updates the status of a pool (e.g., active, paused).

**Parameters:**

* `status`: New status value for the pool.

**Context Accounts:**

* `authority`: Signer who is the admin.
* `pool_state`: AccountLoader for the pool state.

### **collect\_protocol\_fee**

Collects the protocol fee accrued in the pool.

**Parameters:**

* `amount_0_requested`: Maximum amount of token\_0 to collect.
* `amount_1_requested`: Maximum amount of token\_1 to collect.

**Context Accounts:**

* Accounts include `owner`, `authority`, `pool_state`, `amm_config`, token vaults, mint accounts, and recipient token accounts.

### **initialize**

Initializes a pool for a token pair with an initial price.

**Parameters:**

* `init_amount_0`: Initial amount of token\_0.
* `init_amount_1`: Initial amount of token\_1.
* `open_time`: Timestamp when swapping is enabled.

**Context Accounts:**

* Various accounts related to token vaults, LP tokens, and observation states.

### **deposit**

Deposits liquidity into the pool and mints LP tokens in return.

**Parameters:**

* `lp_token_amount`: Pool token amount to transfer.
* `maximum_token_0_amount`: Maximum token 0 amount to deposit to prevent excessive slippage.
* `maximum_token_1_amount`: Maximum token 1 amount to deposit to prevent excessive slippage.

**Context Accounts:**

* Accounts related to liquidity provider, vaults, and LP mint.

### **withdraw**

Withdraws liquidity from the pool and burns LP tokens.

**Parameters:**

* `lp_token_amount`: Amount of pool tokens to burn.
* `minimum_token_0_amount`: Minimum amount of token 0 to receive to prevent excessive slippage.
* `minimum_token_1_amount`: Minimum amount of token 1 to receive to prevent excessive slippage.

**Context Accounts:**

* Accounts related to liquidity provider, vaults, and LP mint.

### **swap\_base\_input**

Swaps tokens in the pool based on the input amount.

**Parameters:**

* `amount_in`: Amount of input tokens to transfer.
* `minimum_amount_out`: Minimum amount of output tokens to receive to prevent excessive slippage.

**Context Accounts:**

* Accounts related to token inputs, outputs, vaults, and the observation state.

### **swap\_base\_output**

Swaps tokens in the pool based on the output amount.

**Parameters:**

* `max_amount_in`: Maximum amount of input tokens to transfer to prevent excessive slippage.
* `amount_out`: Amount of output tokens to receive.

**Context Accounts:**

* Accounts related to token inputs, outputs, vaults, and the observation state.

### **LpChangeEvent**

Emitted during liquidity changes (deposits/withdrawals).

* **Fields:**
  * `pool_id`: Pool ID.
  * `lp_amount_before`: LP tokens before operation.
  * `token_0_vault_before`: Token 0 amount in the vault before operation.
  * `token_1_vault_before`: Token 1 amount in the vault before operation.
  * `token_0_amount`: Calculated token 0 amount (excludes transfer fees).
  * `token_1_amount`: Calculated token 1 amount (excludes transfer fees).
  * `change_type`: Type of change (0 for deposit, 1 for withdrawal).

### **SwapEvent**

Emitted during swaps.

* **Fields:**
  * `pool_id`: Pool ID.
  * `input_vault_before`: Input token amount in vault before swap.
  * `output_vault_before`: Output token amount in vault before swap.
  * `input_amount`: Amount of input tokens swapped.
  * `output_amount`: Amount of output tokens received.
  * `base_input`: Indicates if the swap is based on input amount.


# FAQs

### What is an AMM and how is it different from a traditional exchange?

Traditional exchanges use an orderbook to match buyers with sellers. On an AMM platform, users trade against a pool of tokens — the liquidity pool.

### **How to list a token on GAMMA?** <a href="#how-can-a-token-get-listed-on-raydium" id="how-can-a-token-get-listed-on-raydium"></a>

Anyone can create a liquidity pool on GAMMA 👇

{% content-ref url="/pages/sMnfR6aIzMetFEflKme3" %}
[How to Create a New Pool](/goosefx-amm/gamma-for-pool-creators/how-to-create-a-new-pool)
{% endcontent-ref %}

**What are GAMMA Boosted Pools?**

GAMMA Boosted Pools allow liquidity providers to earn extra tokens in addition to the trading fees earned from the pool.

### **What wallets can I use with GAMMA?** <a href="#what-wallets-can-i-use-with-raydium" id="what-wallets-can-i-use-with-raydium"></a>

Any wallet that supports Solana standard can be used on GooseFX to interact with GAMMA, i.e. Phantom, Solflare, Backpack, Ledger and WalletConnect.

### **Can I use GAMMA on my mobile?** <a href="#can-i-use-raydium-on-my-phone" id="can-i-use-raydium-on-my-phone"></a>

You can access GAMMA from your phone browser by connecting your wallet.

### **How can I get in touch?** <a href="#how-can-i-get-in-touch" id="how-can-i-get-in-touch"></a>

Feel free to [reach us out!](https://x.com/Overdose_BTC)

***

#### **What does "Your SOL balance is low" mean?** <a href="#what-does-your-sol-balance-is-low-mean" id="what-does-your-sol-balance-is-low-mean"></a>

SOL is required to pay network fees. It is recommended to keep at least 0.05 SOL in your wallet for transaction fees.

#### **What fees do I pay when I deposit on GAMMA?** <a href="#what-fees-do-i-pay-when-i-trade-or-swap-tokens-on-raydium" id="what-fees-do-i-pay-when-i-trade-or-swap-tokens-on-raydium"></a>

Deposit Fee: 0.000007

#### **What is price impact?** <a href="#what-is-price-impact" id="what-is-price-impact"></a>

Price impact is the difference between the current market price and the expected price for a trade. Price impact is primarily determined by the size of your trade relative to the amount of liquidity in the pool. As the number of tokens you buy from the pool increases, the price of the token increases as well. This delta in price is called price impact.

#### **Why did my transaction fail?** <a href="#why-did-my-transaction-fail" id="why-did-my-transaction-fail"></a>

**Insufficient SOL:** SOL is required to pay network fees, it's recommended to keep at least 0.05 SOL in your wallet to ensure smooth transactions.

**Slippage Tolerance:** Transactions will fail if the price of the underlying pool moves past your Slippage Tolerance.

**Approving Transactions:** If you see the “Making Transaction” notification in the lower lef&#x74;**-**&#x68;and corner of your screen, you will need to approve the transaction in your wallet.

**What are the benefits of LPs on GAMMA?**

Liquidity providers earn transaction fees from swaps within the pool.&#x20;

If you are unfamiliar with the concept of AMM and impermanent loss, [check out this blog](https://www.blog.goosefx.io/what-are-liquidity-pools/) for a basic understanding (highly recommended).

#### **Which curves do liquidity pools on GAMMA use?** <a href="#which-curves-do-liquidity-pools-on-raydium-use" id="which-curves-do-liquidity-pools-on-raydium-use"></a>

GAMMA uses the function K = Y\*X, which is stateless, offering infinite liquidity to traders with any two tokens, without knowing their relative prices or values.

#### **What does Permissionless Pool mean?** <a href="#what-does-permissionless-pool-mean" id="what-does-permissionless-pool-mean"></a>

Permissionless pools enable anyone to create a liquidity pool on GAMMA. Once created, these pools can be traded instantly on the Jupiter interface.[<br>](https://docs.raydium.io/raydium/getting-started/best-practices)


# Risks

GAMMA Risks Overview

We prioritize transparency and openness in everything we do. Our code is open-source, and you can review it at any time on [GitHub](https://github.com/GooseFX1/gamma-swap). It's important to highlight the potential risks involved in using GAMMA, our dynamic Automated Market Maker (AMM). Below are the main risks users should be aware of when interacting with the GAMMA protocol.

***

**1. Impermanent Loss (IL)**

Impermanent loss is inherent to any AMM. In GAMMA, this risk is tied to how dynamic fees adjust based on market conditions. The risk occurs if:

* The dynamic fee model fails to adjust properly, leading to potential losses that are greater than expected.

**Mitigation**

* We’ve conducted extensive testing on our dynamic fee system to ensure it functions properly, and we continue to test under live mainnet conditions.
* Fees are adjustable, allowing us to fine-tune the settings if issues arise during live operation.

***

**2. Smart Contract Risk**

All DeFi protocols, including GAMMA, rely on smart contracts. While we follow best practices, our smart contracts will be fully audited by external firms to reduce potential vulnerabilities and ensure the highest standards of security.

***

**3. Liquidity and Volume Fluctuations**

In some cases, high fees during low-volume periods may lead to reduced trading activity. This could lower the APY (Annual Percentage Yield) for liquidity providers (LPs). Conversely, higher fees during periods of higher volume could result in increased APY.

* The dynamic fee system is designed to find an optimal balance between volume and fees. However, we anticipate a learning curve as the protocol operates on mainnet, and adjustments may be needed based on live data.

***

**4. Low TVL (Total Value Locked)**

Lower-than-expected TVL may lead to reduced trading volume, which can affect the overall APY for liquidity providers. This risk is tied to the platform's adoption and initial user base.

* We are actively working with partners to ensure sufficient liquidity at launch and will be transparent about any changes to the protocol that may impact users.

***

#### **Our Commitment to Transparency**

We believe that transparency is key to building trust in DeFi. As part of that commitment, GAMMA is open-source and available for anyone to review on [GitHub](https://github.com/GooseFX1/gamma-swap). We encourage users to explore the code, provide feedback, and stay informed about the development process.


# GAMMA Audit

GAMMA Audited by Offside Labs

Your security is our priority, and that's why our GAMMA pools are now fully audited by @Offside\_Labs&#x20;

* In total, there was only one critical issue that could have opened us to a DOS attack risk
* 5 medium issues were identified, which have been rectified by the team!
* There were also a few low-level logic error/optimization category errors.

Status: Fixed! ✅

Committed to transparency, you can check out our GAMMA audit report by @Offside\_Labs down below 👇

{% file src="/files/HYtU7W1gJXXvIlrfCwRr" %}


# How-to Guides

{% content-ref url="/pages/jVgL9feZUqwVv9K6Uh5z" %}
[GAMMA for LPs](/goosefx-amm/gamma-for-lps)
{% endcontent-ref %}

{% content-ref url="/pages/lzQOvjcQLXHKnOCb60nd" %}
[GAMMA for Pool Creators](/goosefx-amm/gamma-for-pool-creators)
{% endcontent-ref %}

{% content-ref url="/pages/g9wskeMUnL6HHnLSUH54" %}
[Developer Docs](/goosefx-amm/developer-docs)
{% endcontent-ref %}


# GAMMA for LPs

{% content-ref url="/pages/eUdvzO5B6mHxGLdfHEHt" %}
[How to Provide Liquidity](/goosefx-amm/gamma-for-lps/how-to-provide-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/a10997yNtL0ho6TJcJ65" %}
[How to Add Liquidity](/goosefx-amm/gamma-for-lps/how-to-add-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/V5PvV1m01na32vaFPo9S" %}
[How to Migrate Liquidity](/goosefx-amm/gamma-for-lps/how-to-migrate-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/XhnHOvfRRtfMbMRC9t5C" %}
[How to Withdraw Liquidity](/goosefx-amm/gamma-for-lps/how-to-withdraw-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/7oWwBjlyWRSJIk9TPrkL" %}
[How to Claim yield](/goosefx-amm/gamma-for-lps/how-to-claim-yield)
{% endcontent-ref %}

{% content-ref url="/pages/ep9ejMsLl2oh1jIauZp3" %}
[FAQs](/archived/faqs)
{% endcontent-ref %}

{% content-ref url="/pages/qu26o205YuKyp4AS37zW" %}
[FAQs - for LPs](/goosefx-amm/gamma-for-lps/faqs-for-lps)
{% endcontent-ref %}

{% content-ref url="/pages/ah2EEcpOUh7tVY4rGoug" %}
[FAQs - for Migration](/goosefx-amm/gamma-for-lps/faqs-for-migration)
{% endcontent-ref %}


# How to Provide Liquidity

Deposit Liquidity on GAMMA

<figure><img src="/files/NwxCVbfUZuEcFgb1h3HB" alt=""><figcaption></figcaption></figure>

* First, visit GooseFX  <https://app.goosefx.io/> to access GAMMA
* Connect your wallet by clicking on the "Connect Wallet" button.
* Navigate to the pool you want to provide liquidity
* The pool requires a 50%-50% ratio of tokens in value
* After entering the amount of tokens you want to deposit, click "Deposit" and confirm the transaction in your wallet.
* Once the deposit is successful, you’ll see two options: "Claim" to collect any boosted rewards (if they exist on that pool), and "+" to add more tokens to your existing LP position.
* In your portfolio tab, you’ll have access to more detailed stats after providing liquidity.


# How to Add Liquidity

Adding Liquidity to Existing Positions on GAMMA

<figure><img src="/files/WycyFCCmlW0GcTNFSl9Z" alt=""><figcaption></figcaption></figure>

* In your existing liquidity position, you’ll see "+" button, click it
* A deposit side panel will appear, similar to the one you used when first adding the tokens.
* Enter the desired amount of tokens you want to add to your position, and click "Deposit."
* After depositing, you’ll see a "Transaction Confirmed" message in the bottom left corner of the screen, indicating that your additional liquidity has been successfully added.


# How to Migrate Liquidity

Click the "Migrate" tab to view all your LP positions across different AMMs

<figure><img src="/files/QphuxddDVjCiu4hEtWn1" alt=""><figcaption><p>Migrate Tab</p></figcaption></figure>

Choose the pair you want to migrate and click "Migrate Now"

In the select position modal, choose the AMM you want to migrate from.

<figure><img src="/files/QRwUcqDaACRncnDGjIfI" alt=""><figcaption><p>LP positions of the same pair on different AMMs</p></figcaption></figure>

After finalizing the token pair from the selected AMM, click "Migrate Position" to initiate the migration process.

<figure><img src="/files/kOTpXOm8LCFfg7qaLtE7" alt=""><figcaption><p>LP position of SOL - USDC on Orca</p></figcaption></figure>

Once the migration is complete, you will see a "Migration Successful" message, confirming that your LP position has been successfully migrated to GAMMA.

<figure><img src="/files/OLRsLg0TeEPYITzBmRLz" alt=""><figcaption><p>Migration Successful</p></figcaption></figure>


# How to Withdraw Liquidity

Withdrawing Liquidity from existing Positions on GAMMA

<figure><img src="/files/NjPbHOC7wgkzVW1eK4du" alt=""><figcaption></figcaption></figure>

* In your existing liquidity position, to withdraw liquidity, first click the "-" button
* A side panel will appear. Switch to the "Withdraw" tab to access the withdrawal options.

Choose the amount of your pool position you wish to withdraw

* You’ll be presented with a withdrawal confirmation modal.
* Click the "Withdraw" button, and then confirm the transaction in the popup that appears.

Once the withdrawal is processed, you’ll see a "Transaction Confirmed" popup, indicating the successful withdrawal of your liquidity


# How to Claim yield

If you deposit into a pool with boosted rewards, you’ll earn extra rewards in addition to the regular pool yield.

Once you start earning, the **“Claim All”** button will appear on your GAMMA pools screen.

<figure><img src="/files/h30mjCLlPe6ZKtoZPM20" alt="" width="563"><figcaption><p>Claim button enables once you LP in a boosted reward pool</p></figcaption></figure>

To claim

1. Click the **“Claim All”** button.
2. Review your rewards.
3. Confirm by clicking **“Claim”**.

You can claim your rewards anytime and as often as you like. Rewards are safe until claimed, so there’s no rush.

After confirmation, you’ll see a **“Transaction Confirmed”** message your rewards have been successfully claimed.

<figure><img src="/files/rr6iIp1QD612LxHQL9CV" alt="" width="563"><figcaption><p>Confirm and click Claim</p></figcaption></figure>


# FAQs - for LPs

Make sure to checkout the overall FAQs first 👇

{% content-ref url="/pages/ep9ejMsLl2oh1jIauZp3" %}
[FAQs](/archived/faqs)
{% endcontent-ref %}

**What are the fees for depositing, withdrawing, claiming, and creating a pool?**\
Deposit: None\
Withdraw: None\
Claim: None\
Pool Creation: 0.04 SOL

**How often can I claim my LP rewards?**\
Whenever there is any pending yield that was earned from your LP position, you can claim.&#x20;

#### **Do I receive LP tokens?** <a href="#what-are-lp-tokens" id="what-are-lp-tokens"></a>

No, GAMMA stores the LP positions linked to the wallet address used for deposits or pool creation, hence no LP token is provided.

#### **Can I withdraw my liquidity anytime?** <a href="#can-i-withdraw-my-liquidity-anytime" id="can-i-withdraw-my-liquidity-anytime"></a>

Yes, you can redeem liquidity tokens for a proportional share of the pool at any time. Unless you migrated from other AMMs. Migrated LP positions are locked for ~~36 hours.~~

LP positions on boosted reward pools can be locked for the first ~~36 hours~~ to earn boosted rewards.

#### **How are projected earnings and APY calculated?** <a href="#how-are-projected-earnings-and-apy-calculated" id="how-are-projected-earnings-and-apy-calculated"></a>

APY from fees is calculated by total fees collected by the pool in the last 24 hours and extrapolating that to a 365 day year then dividing by the total liquidity in the pool.


# FAQs - for Migration

### 1. What is migration?

Migration allows you to transfer your existing LP positions from other AMMs on Solana, such as Raydium/Orca/etc., directly to GAMMA.

### 2. Can I partially migrate my LP position from other AMMs to GAMMA?

No, partial migration isn’t supported. When you migrate an LP position, it is fully withdrawn from the other AMM and deposited into GAMMA.

### 3.  Is there any additional fee to migrate?

No, there’s no additional fee to migrate your LP position to GAMMA. You’ll only need to cover the transaction fee, which is approximately \~0.002 SOL.

### 4. What happens to my pending yield on the AMM I migrate from?

Any pending yield will remain on the original AMM. You’ll need to visit their site to claim it. Only the LP position is migrated to GAMMA.

### 5. Which AMMs are supported for migration?

Currently, GAMMA supports migration from Raydium and Orca pools.

### 6. What is the lock-in period for migrated LP positions?

Migrated LP positions are locked for 2 days, during which they earn extra $GOFX rewards on selected pools. This is to prevent abuse from migrating back and forth and claiming extra $GOFX.

### 7. What are the extra $GOFX rewards on some pools in GAMMA?

Certain pools on GAMMA are boosted with additional $GOFX rewards to incentivize LPs. If you migrate your LP position to these pools, you’ll earn extra $GOFX rewards.

### 8. Can I cancel a migration after it starts?

No, once you initiate the migration, it cannot be canceled. Make sure you’re ready to move your position before proceeding.

### 9. Will my liquidity provision be affected during migration?

During the migration process, your liquidity will be withdrawn from the original AMM and deposited into GAMMA. This process usually takes one to two minutes!

### 10. How do I know if my migration was successful?

After the migration, your LP position will appear in the GAMMA interface, and you’ll receive a confirmation message. If you don’t see your position, please check your wallet and transaction history or contact us on Discord.

### 11. Can I migrate LP positions from multiple pools at once?

Currently, migrations must be done one pool at a time. You’ll need to repeat the migration process for each LP position you want to transfer.

### 12. What happens if I don’t migrate my LP position?

If you choose not to migrate, your LP position will remain in the original AMM, and you can continue managing it there as usual.<br>


# GAMMA for Pool Creators

{% content-ref url="/pages/sMnfR6aIzMetFEflKme3" %}
[How to Create a New Pool](/goosefx-amm/gamma-for-pool-creators/how-to-create-a-new-pool)
{% endcontent-ref %}

{% content-ref url="/pages/PB4XtTrT7Y5sw400DM7V" %}
[FAQs for Pool Creators](/goosefx-amm/gamma-for-pool-creators/faqs-for-pool-creators)
{% endcontent-ref %}


# How to Create a New Pool

On the GAMMA homescreen, click "Create"

<figure><img src="/files/WJD39SgzGGfx2LJbO7OP" alt=""><figcaption></figcaption></figure>

**Configure Pool Settings**

* Select the tokens **Token A** and **Token B** and deposit in 50%-50% split and make sure to double check the initial price to avoid losses.&#x20;
* The initial price is based on the ratio of tokens you deposit for initial liquidity.

<figure><img src="/files/RyDmrCthQrvezFwmxtay" alt=""><figcaption></figcaption></figure>

* After configuring your settings, you’ll be prompted with a confirmation screen displaying the details of the pool you’ve set up.
* The screen will also show the pool creation fee, which is 0.04 SOL, used to pay for on-chain account creation.

<figure><img src="/files/0j9yCGFDs0ACYrtbO3F4" alt=""><figcaption></figcaption></figure>

* Click "Create and Deposit" to finalize the pool creation and deposit your tokens.
* Once the process is complete, you’ll see a confirmation screen indicating that your pool has been successfully created.<br>

<figure><img src="/files/5kcDX5iEcr9zfqxi83kO" alt=""><figcaption><p>Pool created Successfully on GAMMA</p></figcaption></figure>


# FAQs for Pool Creators

**What types of pools can I create on GAMMA?**

You can create two types of pools

* **Primary:** For blue-chip assets like SOL-USDC or any LST-USDC pairs.
* **Hyper:** For other token pairs, including meme tokens.

**What is the pool creation fee on GAMMA?**

* The fee to create a pool on GAMMA is 0.04 SOL. This fee is used to pay rent for creating accounts onchain.

**How is the initial price of a pool determined?**

* The initial price is based on the ratio of tokens you deposit for initial liquidity. If the token is already trading, GAMMA will automatically use the current market price.

**Can I change the pool settings after creation?**

* No, once the pool is created, the settings such as fee tier and initial price cannot be changed. Make sure to review all settings carefully before finalizing.

**What happens if I don’t provide enough liquidity during pool creation?**

* If you don’t provide sufficient liquidity, your pool may not function effectively, and trades could suffer from high slippage or poor execution. Ensure you deposit an adequate amount of both tokens when creating the pool.

**Can I close or delete a pool after creating it?**

* Once a pool is created, it remains on-chain. You can withdraw your liquidity, but the pool itself cannot be deleted. However, without liquidity, the pool will effectively be inactive.


# GAMMA Partner Program

Earn with GAMMA

Bring your community to GAMMA and earn from the value you create.

### How It Works

1. **Get a Partner ID**\
   We assign a unique ID to you (e.g., `YourProtocol123`).
2. **Custom Deposit Links**\
   Users deposit into GAMMA pools using your custom link with the `partnerId` parameter.
3. **Track Your Impact**\
   We track total TVL deposited via your link onchain and the swaps generated from that liquidity.
4. **Earn Revenue Share**\
   You earn a portion of the **protocol + fund fees** based on the TVL you brought in, the fees are split proportionally.
5. **Off-chain Settlement (Default)**\
   Payouts are done off-chain. On-chain settlement can be discussed if needed.
6. **Why GAMMA?**

   LPs earn more on GAMMA compared to other standard AMMs with our dynamic fee AMM model capturing maximum fees at times of market volatility. GAMMA Fusion auto lends the idle liquidity in the AMM to maximum capital efficiency and earn more more yield. Pools can also be boosted with added rewards for incentivising LPs.

Integration can be done via Solana smart contract or Typescript. We can provide scripts to make the integration easier.<br>

Want to bring your DAO, meme coin, or LP network on GAMMA?

### **Get in touch with the** [***GooseFX team***](https://discord.gg/cDEPXpY26q) to become a partner 🪿


# Developer Docs

GooseFX's Github repository is available [here.](https://github.com/GooseFX1)

Frontend: <https://github.com/GooseFX1/gfx-web-app>

GAMMA Swap API: <https://github.com/GooseFX1/gamma-swap>

GAMMA Typescript SDK: <https://github.com/GooseFX1/gamma-sdk>\
\
Audit: [https://github.com/GooseFX1/gamma-swap/tree/master/.audit/](https://github.com/GooseFX1/gamma-swap/tree/master/.audit/11-05-2024_OffsideLabs)


# GOFX Token

GooseFX Token - $GOFX

The **GOFX Token** went live on 2nd November 2021,  a utility token powering the GooseFX platform

### Official GOFX token links

* [GOFX SPL token contract address](https://solscan.io/token/GFX1ZjR2P15tmrSwow6FjyDYcEkoFb4p4gJCpLBjaxHD) `GFX1ZjR2P15tmrSwow6FjyDYcEkoFb4p4gJCpLBjaxHD`
* GOFX total supply API: `https://api-services.goosefx.io/total-supply`
* GOFX circulating supply API: `https://api-services.goosefx.io/circulating-supply`
* [Coingecko](https://www.coingecko.com/en/coins/goosefx)
* [Coinmarketcap](https://coinmarketcap.com/currencies/goosefx/)

***

## GOFX Token Information

* **Staking Incentives:** Stakers of GOFX earn a share of the platform's total fees, collected from GAMMA. The fees is converted to USDC for stable payouts, with rewards proportional to the amount of GOFX staked and claimable daily.
* **Buyback and Burn Program:** 10% of revenue from GAMMA is used to buy back GOFX tokens from the market, which are then burned hourly. This approach aims to reduce the total supply and increase the scarcity of GOFX, steering it towards a deflationary model.
* **Earnings and Lock-up Period:** Unstaking GOFX initiates a *seven-day lock-up period*, during which no rewards are earned.

{% content-ref url="/pages/vdGEuf3ga8jmavqyYmSg" %}
[Stake Rewards & Fee Share](/tokenomics/stake-rewards-and-fee-share)
{% endcontent-ref %}

### GOFX Listings

|                                                                     DEX                                                                    |                         CEX                        |
| :----------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------: |
| [**RAYDIUM**](https://raydium.io/swap/?from=GFX1ZjR2P15tmrSwow6FjyDYcEkoFb4p4gJCpLBjaxHD\&to=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) | [**GATE.IO**](https://www.gate.io/trade/GOFX_USDT) |
|                                        [**JUPITER**](https://docs.goosefx.io/tokenomics/www.jup.ag)                                        |                                                    |
|                                         [**ORCA**](https://docs.goosefx.io/tokenomics/www.orca.so)                                         |                                                    |
|                          [**METEORA**](https://app.meteora.ag/pools/6pZh5AUaecLesW6kH5sF4XhqqYMAvLxBMpKnevmqmjk9)                          |                                                    |

*GOFX does not in any way represent any shareholding, participation, right, title, or interest in the Company, the Distributor, their respective affiliates, or any other company, enterprise or undertaking, nor will GOFX entitle token holders to any promise of fees, dividends, revenue, profits or investment returns, and are not intended to constitute securities in Singapore or any relevant jurisdiction. GOFX may only be utilized on the GooseFX platform, and ownership of GOFX carries no rights, express or implied, other than the right to use GOFX as a means to enable usage of and interaction within the GooseFX platform.*


# Validator & LST - goSOL

Your gateway to stake SOL and earning yield while supporting GooseFX

## Why Stake with GooseFX?

* 0% Commission
* MEV rewards shared with stakers
* Validator income used to add liquidity to SOL pools on [GAMMA](/goosefx-amm/gamma)
* **goSOL** (LST)  higher APY, deep liquidity, native Solana integrations
* Run with a proprietary ML-powered vote mod to optimize performance and boost rank

We’re not just running a validator, we’re using the income to deepen SOL liquidity across the ecosystem through GAMMA, our dynamic-fee AMM.

### Key Links

* [Stakewiz Validator Page](https://stakewiz.com/validator/GFXVa1g8zzAVDRnSuB6o9PnHuyH25ADvy2YJPZLpATuP)
* [Validators.app](https://www.validators.app/validators/GFXVa19rX6iwfs3sLS5UvX9Exu2usRsG4V5MRMDRo23V?locale=en\&network=mainnet)
* [Jito Rewards Dashboard](https://jito.deadkingsociety.io/validator/GFXVa19rX6iwfs3sLS5UvX9Exu2usRsG4V5MRMDRo23V)

### How to Stake with GooseFX

1. Open your wallet (Phantom, Solflare, Backpack, etc.)
2. Select **SOL > Stake**
3. In the validator search, enter\
   **`GFXVa19rX6iwfs3sLS5UvX9Exu2usRsG4V5MRMDRo23V`** or search for "GooseFX"
4. Choose your amount, click stake, and approve!

### How to get the GooseFX LST (goSOL)

* Swap on [Jupiter](https://jup.ag/swap/SOL-goSOL) or [Sanctum](https://app.sanctum.so/goSOL)


# Stake Rewards & Fee Share

GooseFX ($GOFX) Locked Staking Rewards Program and Fee Addresses

<figure><img src="/files/WkRbTva5IaTfTs3jvCWD" alt=""><figcaption><p>GooseFX Rev Share</p></figcaption></figure>

Welcome to GooseFX's Staking Rewards Program! By staking your $GOFX tokens, you become eligible to receive a portion of the platform's revenue. Simply put, your stake in $GOFX can earn you money!

<figure><img src="/files/U2lDXVAb0A5QHEyTHn2O" alt=""><figcaption><p>$GOFX Staking Rewards</p></figcaption></figure>

* Check Realtime $GOFX stake APY : <https://api-services.goosefx.io/gofx-stake/getApy>

## **Understanding the Program**

Our Staking Rewards Program is designed to distribute platform's total fee back to our users. The fees is collected from our GooseFX Automate Market Maker Algo ([GAMMA](/goosefx-amm/clmm))\
\
The fees is then converted into USDC, providing a stable payout to $GOFX stakers, independent of market volatility.

<figure><img src="/files/NTFmXp5aMZwdM7jxoEie" alt=""><figcaption><p>GAMMA Fees Split </p></figcaption></figure>

### **Claiming Your Rewards**

The size of your reward is directly proportional to the amount of $GOFX tokens you have staked. More staked tokens means more rewards! You will be able to claim your earnings on a daily basis at 10AM UTC.

{% content-ref url="/pages/Uv9p8pbVYQUmE5IaF6yS" %}
[How to Stake/Unstake GOFX](/tutorials/how-to-stake-unstake-gofx)
{% endcontent-ref %}

### **Unstaking $GOFX Tokens**

When you unstake your $GOFX tokens, **a seven-day lock-up period** applies before you can withdraw them. During this cooldown period, you won't be earning any rewards.

### **Join Us Today**

Come join the #GooseGang today and unlock the earning potential of your $GOFX tokens. Stake your tokens with us and watch your rewards grow each day. At GooseFX, your tokens aren't just held, they're put to work for you!


# How to Stake/Unstake GOFX

A walkthrough to stake or unstake $GOFX tokens on GooseFX

## Learn about $GOFX Stake Program&#x20;

* *Stake $GOFX earn $USDC (Revenue Share)*&#x20;

{% embed url="<https://docs.goosefx.io/tokenomics/stake-rewards-and-fee-share>" %}

***

## How to Stake $GOFX

Direct URL: <https://app.goosefx.io/gamma?rewards=true><br>

* Click Rewards tab on top right of the platform after connecting your Solana wallet.

<figure><img src="/files/AEDNXsrppEFe6XcyhLxH" alt=""><figcaption></figcaption></figure>

* Enter your desired amount of $GOFX tokens you want to stake and click the "Stake" button

<figure><img src="/files/cvTjN2iaffNGuxyeQvUT" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Disclaimer! You must wait 7 days after Unstaking to reclaim your GOFX. No rewards will be earned on the "Unstaked" $GOFX tokens for these 7 days.&#x20;
{% endhint %}

<figure><img src="/files/yxbfFbsNxjh1IpuNPRqw" alt=""><figcaption></figcaption></figure>

## How to Unstake $GOFX

* Click unstake and enter your desired amount of tokens you want to unstake.

<figure><img src="/files/JFg87Nvkjs3S7kaIjSWy" alt=""><figcaption></figcaption></figure>

* Click "Yes, Continue with Cooldown" to unstake the tokens.

<figure><img src="/files/Zhdgx8ORt3oSNd0C7w13" alt=""><figcaption></figcaption></figure>

* Click "See all active cooldowns" to monitor the progress

<figure><img src="/files/n7iL6iNug4SMTaLMy0ya" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/flEk4XBMU3MJVHphBu0Q" alt=""><figcaption></figcaption></figure>

* After 7 days you will be able to claim your unstaked tokens by clicking "Unstake GOFX"

<figure><img src="/files/A5C8xY8sa65I0kNls8TV" alt=""><figcaption></figcaption></figure>


# Geo Restricted

Why is GooseFX geo-restricted?

We have geo-restricted to comply with legal regulations hence GooseFX is correctly geo restricted across US, Canada and OFAC countries. If you have deposited funds before use this [link to withdraw tokens safely.](https://twitter.com/GooseFX1/status/1727330449989464203)


# FAQs

FAQs from our social channels to assist with knowledge sharing about the GFX project.

## Project FAQs

1. **What market is the $GOFX Token traded on?**
   * Please refer to the markets on [CoinGecko](https://www.coingecko.com/en/coins/goosefx)
   * **Contract Address:** GFX1ZjR2P15tmrSwow6FjyDYcEkoFb4p4gJCpLBjaxHD<br>
2. **What is the total supply of $GOFX tokens?**
   * [Check real time total supply](https://api-services.goosefx.io/total-supply)<br>
3. **What is the circulating supply of $GOFX tokens?**
   * [Check real time circulating supply](https://api-services.goosefx.io/circulating-supply)<br>
4. **Does GooseFX burn tokens, and if so, how?**
   * A small percentage of the fees generated from our SSL pools goes to our [Buyback and Burn mechanism](https://x.com/GooseFX1/status/1725248615663222855?s=20)<br>
5. **How is revenue generated and distributed on GooseFX?**
   * Our revenue is generated across our 3 platforms which is then distributed amongst liquidity providers, $GOFX stakers, for our Buyback and Burn mechanism and much more! You can read about this in detail on our [documentation](https://docs.goosefx.io/tokenomics/stake-rewards-and-fee-share)

***

### $GOFX Stake Rewards

1. **How often are staking rewards distributed?**
   * Daily around 10AM UTC<br>
2. **How can I stake GOFX tokens?**
   * [Follow our detailed guide](https://docs.goosefx.io/tutorials/how-to-stake-unstake-gofx)<br>
3. Does GooseFX burn tokens, and if so, how?
   * A small percentage of the fees generated from our SSL pools goes to our [Buyback and Burn mechanism](https://x.com/GooseFX1/status/1725248615663222855?s=20)<br>
4. How is revenue generated and distributed on GooseFX?
   * Our revenue is generated across our 3 platforms which is then distributed amongst liquidity providers, $GOFX stakers, for our Buyback and Burn mechanism and much more! You can read about this in detail on our [documentation](https://docs.goosefx.io/tokenomics/stake-rewards-and-fee-share)

***

### GooseFX Farm SSL&#x20;

1. **What are the risks involved in farming on GooseFX?**
   * [Learn about the risks in SSL pool](https://twitter.com/GooseFX1/status/1724463284110192857)<br>

2. **How is the APY for staking calculated, and why is it so high?**
   * Our SSL pools work as an on-chain market maker and thus generate revenue from swap fees as well as arbitrage profits generated from the spreads between pool and oracle prices all while offering the best swaps to users.<br>

3. **Can GooseFX launch a pool for a specific token X?**
   * A token should fulfill 2 basic requirements to be listed on our SSL Pools: Should have a Pyth price feed Should have consistent $1Million+ in daily volume<br>

4. **Do rewards auto-compound?**&#x20;
   * No we recommend you to claim rewards once or twice everyday and deposit again if you wish to compound.<br>

5. **Why are the deposits sometimes more than 100% of the capacity?**&#x20;
   * Since the deposits are native tokens like mSOL, SOL, BONK etc., these can fluctuate in prices resulting in an increase in deposits over the capacity.
   * Secondly, it could also happen if the last user depositing into the pool, deposits X tokens over the caps. Example: If the USDC pool has a deposit cap of 100 USDC and it is currently at 95 USDC (i.e 5 USDC to hit our deposit caps), and a user comes and deposits 15 USDC, our SSL pool won’t restrict his deposits to only 5 USDC. They would be able to deposit their 15 USDC after which the deposit caps would hit and deposits would be restricted.<br>

6. **Why do rewards change for SSL Pools?**

   * If a user comes in and deposits a large amount of liquidity, it leads to dilution of rewards further lowering your current rewards by a bit. We recommend claiming rewards at least once a day!

7. **What should I do if I encounter the 'Fetching Accounts' error?**&#x20;

   * To fix this, try either a hard refresh or switching your RPC node.

8. **I am not able to withdraw / claim rewards.**
   * You might have deleted the token account of the token you want to withdraw. Example atleast have 1 BONK in wallet if you are trying to claim or withdraw the token.


# Perps DEX Tutorial

Welcome to the GooseFX Perpetuals DEX tutorial section! With step-by-step video guides on how to use our platform effectively.

### USDC Deposit Guide

Learn how to deposit USDC on the GooseFX perpetual DEX.

{% embed url="<https://youtu.be/7EMqlyZ-98k>" %}
Devnet USDC Deposit Guide - GooseFX Perpetuals Platform
{% endembed %}

### Long Order Tutorial

Learn how to place long orders on the GooseFX Perpetuals DEX.

{% embed url="<https://youtu.be/Vv3l9NNKGxM>" %}
Long Order Tutorial - GooseFX Perpetuals Platform
{% endembed %}

### Short Order Tutorial

Learn how to place short orders on the GooseFX Perpetuals DEX.

{% embed url="<https://youtu.be/K_ot8UQZJd4>" %}
Short Order Tutorial - GooseFX Perpetuals Platform
{% endembed %}

### Closing a Position Guide

Learn how to close a position on the GooseFX Perpetuals DEX.

{% embed url="<https://youtu.be/ysR7iVngLAs>" %}
Closing a Position Guide - GooseFX Perpetuals Platform
{% endembed %}

### Customizing Layout Tutorial

Personalize your trading experience on the GooseFX Perpetuals DEX. Learn how to adjust and customize the platform to suit your trading preferences.

{% embed url="<https://youtu.be/q6N27OyvbIE>" %}
Customizing Layout Tutorial - GooseFX Perpetuals Platform
{% endembed %}


# How to Swap Tokens

A walkthrough for new users

## 1. Create a Solana wallet

To use GooseFX, you will need to have a compatible Solana wallet. GooseFX currently has support for [Phantom](https://phantom.app/), [Glow](https://glow.app/), [Solflare](https://solflare.com/), [Torus](https://tor.us/), [Math Wallet](https://mathwallet.org/en-us/), [Solong](https://solongwallet.io/), [Sollet](https://www.sollet.io/), and [Slope](https://slope.finance/). GooseFX is a decentralized protocol on Solana that helps users trade tokens and NFTs, provide liquidity, and more in a non-custodial manner. This means that the application interacts indirectly with you through the wallet.

## 2. Fund the wallet with SOL

GooseFX is a decentralized application built on Solana and thus to conduct transactions you must pay Solana network fees for transactions and these fees are paid in the SOL. You have multiple ways to purchase SOL such as one of these centralized exchanges: [FTX](https://ftx.com/), [Binance](https://www.binance.com/en), [Coinbase](https://www.coinbase.com/), [MEXC](https://www.mexc.com/), [Gate](https://www.gate.io/), etc.&#x20;

## 3. Connect your wallet with GooseFX

Click “connect wallet” on the GooseFX home page, then enter your wallet password, click ‘’Unlock‘’, and then click ‘’Connect‘’.&#x20;Once connected you will be able to interact with the platform.

<figure><img src="/files/99i9y30SWD3EXCZ9HSVC" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/aVULw1l43r80VSF6RnwO" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Tkrk5b9Bqef0tCEt4ja1" alt=""><figcaption></figcaption></figure>

## 4. Swap Tokens

Once you have connected your wallet you will be able to select the token you would like to use to perform the swap and the token you would like to recieve. After choosing the tokens and entering the amount you would like to swap click "Swap." You will then be prompted by your wallet to approve the transaction. After clicking "Approve" your swap will begin and you may confirm the transaction by checking a Solana network explorer.&#x20;

<figure><img src="/files/pi38CBVfwk8S2UiJsm21" alt=""><figcaption></figcaption></figure>


# How to LP with GFX Single-Sided Liquidity Pools

## 1. Connect Wallet on Farm Page

Please connect the wallet of your choice to begin

<figure><img src="/files/4G74Lwq74i84GTAf81gH" alt=""><figcaption></figcaption></figure>

## 2. Choose the Pool

Please select the pool that you would like to deposit into. In this example we chose Hyper.

<figure><img src="/files/qFHUdWLUF1lmMnQfONRC" alt=""><figcaption></figcaption></figure>

## 3. Choose the Token

Please select the token that you would like to deposit. In this example we chose Bonk.

<figure><img src="/files/BgH0aq8x3E4zayPBMia7" alt=""><figcaption></figcaption></figure>

## 3. Enter the Amount and Click 'Deposit'

Select the amount of liquidity you would like to provide then click 'Deposit' and approve the transaction.

<figure><img src="/files/jYUOFC5nHNLXtZaK5JaU" alt=""><figcaption></figcaption></figure>

You can confirm the deposit by clicking the blue popup which will take you to a Solana explorer.

<figure><img src="/files/dE6XGDy1OO4rcjudjTzc" alt=""><figcaption></figcaption></figure>

## 4. How to Withdraw your Tokens

Select the amount of tokens you would like to withdraw and click 'Withdraw' then click approve the transaction to complete the withdrawal.

<figure><img src="/files/txt5XyrrDmunBJeLReLk" alt=""><figcaption></figcaption></figure>

You can confirm the withdrawal by clicking the blue popup which will take you to a Solana explorer.


# NestQuest

Official Game Webpage: NestQuest.io

NestQuest is a gamified leaderboard and rewards tracking program intended to promote the launch of each of the GooseFX platform features. Play the game, gain prestige in the GooseFX community and level up your NFT to unlock additional rewards and added benefits on the platform. Added benefits include:&#x20;

* Reduced platform fees
* Priority access on future features&#x20;
* Access the NestQuest NFT Gated discord channels
* Level 6 Citadel NFT will grant permanent whitelist access to our NFT Launchpad

There are a total of 25,002 NQ NFTs in the NestQuest Collection. This is a strategic total supply amount that encompasses in-game logic. &#x20;

### Where Can I get a NestQuest Egg?

The NestQuest Eggs are available for purchase for 1 SOL or 500 GOFX (\~50% discount) here:

{% embed url="<https://app.goosefx.io/NFTs/NestQuest>" %}

{% embed url="<https://app.goosefx.io/NFTs/NestQuest>" %}

### You can find higher Tiers listed for sale on several exchanges:&#x20;

{% embed url="<https://app.goosefx.io/NFTs/collection/NestQuest>" %}
GFX Nest Marketplace
{% endembed %}

{% embed url="<https://hyperspace.xyz/collection/nestFGrTJ4QoRtvo8ZbASZZ2PSuv8AvvmaN1H31GhBQ>" %}
HyperSpace
{% endembed %}

{% embed url="<https://magiceden.io/marketplace/nestquest>" %}
MagicEden
{% endembed %}

### What's so cool about NestQuest?

#### Dynamic Attribute Assignment System - DAAS

NestQuest utilizes a dynamic attribute assignment system(DAAS) during the NFT evolution process. During the evolution window, the NFTs selected for evolution randomly assign the next Tier NFT.  This gives all NQ NFTs the same opportunity for attributes and rarity when they evolve.

What hatches from the egg is randomly determined and assigned during the incubation process. The attributes that are inherited when the egg hatches stay with the NFT and as it evolves further it can acquire additional attributes. The breakdown of the probabilities of each Tier 2 Hatchling is shown below.&#x20;

#### Proof of Work NFT

NestQuest has created a new form of NFT that tracks user activity to advance through the Tiers. We are calling this a Proof of Work NFT because each Tier the NFT advances requires directed effort. The higher the Tiers, the more stored effort the NFT has.&#x20;

### **Troubleshooting**

If you have trouble connecting your wallet please use the approved wallets Phantom, Slope, Solflare, or Ledger. Try clearing your cache and using a different browser. Please make sure you have some SOL in your wallet to approve transactions.&#x20;

You can ONLY evolve your Tier 1 Egg NFT once. That means it will evolve after 30 days from an Egg to a Hatchling. Once it is evolved, it will not allow you to evolve again. If you have multiple eggs however, you are able to evolve them after incubating for 30 days.&#x20;

If you are still having issues make sure you have enough SOL in your wallet to approve the transaction. If you are having issues with NQ please use this URL to produce a bug report: <https://nestquest.io/?debug=true> and please post in the #support channel of our Discord.&#x20;

### NestQuest Contract Address

<https://solscan.io/account/NQDKVecDDY3espZ7LynBrFSy8fTr8VrTrXQ7PRBMK1a>


# Tier 1 - The Egg

<div align="center"><figure><img src="/files/IPEtGGBMu4xBxefn52Pf" alt=""><figcaption><p>The Egg - By Nolan Nassar</p></figcaption></figure></div>

As you might expect with an egg, the first step is simply to hatch it. To do this, visit NestQuest.io and enter the game board by connecting your wallet. It will register the egg in your wallet and allow you to start incubating. When you incubate the egg on the NQ board a timer for 30 days appears. At the end of the 30 days the egg will hatch and be available for withdrawal.

&#x20;NestQuest players start on the same level playing field, all of the Eggs are the same, there are no pre-assigned attributes.&#x20;

Attributes are only randomly assigned as users advance through the NFT Tiers.

### Game Lore - The Egg

A mysterious egg abandoned in a peculiar tree stump nest. The egg emits a faint glow, as your hand gets close to the surface you feel radiant heat. Something is alive inside. You must incubate this egg for it to hatch.


# Tier 2 - The Hatchling

The Hatchling comes from the Tier 1 Egg.  As one might expect, hatchlings require sustenance and attention to grow and evolve. So for the Tier 2 evolution, users are required to stake a minimum of 25 GOFX tokens for > 7 day period.  Once that criteria is met with the users wallet, you will be prompted by the Game Board, to "Evolve" your hatchling.&#x20;

You stake GOFX here: <https://app.goosefx.io/farm>  Make sure you are on the STAKING tab.

### **Tier 2 Probability Assignments**

<table><thead><tr><th width="158.58134098714692" align="center">Body</th><th width="194.8207006444827" align="center">Egg</th><th width="181.09350984824022" align="center">Aura</th><th align="center">Probability</th></tr></thead><tbody><tr><td align="center">Gold</td><td align="center">Gold</td><td align="center">Gold</td><td align="center">4%</td></tr><tr><td align="center">Black</td><td align="center">Purple</td><td align="center">Teal</td><td align="center">7%</td></tr><tr><td align="center">Red</td><td align="center">Purple</td><td align="center">Purple</td><td align="center">11%</td></tr><tr><td align="center">Orange</td><td align="center">Purple</td><td align="center">Orange</td><td align="center">13%</td></tr><tr><td align="center">Green</td><td align="center">Purple</td><td align="center">Green</td><td align="center">15%</td></tr><tr><td align="center">Purple</td><td align="center">Purple</td><td align="center">Teal</td><td align="center">20%</td></tr><tr><td align="center">Blue</td><td align="center">Purple</td><td align="center">Blue</td><td align="center">30%</td></tr></tbody></table>

These assignments for the "Body", "Egg" and "Aura" are made once, when the egg hatches and they carry through with the NFT the entire lifetime of NestQuest.&#x20;

### Game Lore - The Hatchling

A hatchling has emerged from the egg... What unique coloring... Not much is known about these creatures but it will require activity to evolve into a stronger form.

<div align="center"><figure><img src="/files/BGzEdRAlMqW8tvsi4iJE" alt=""><figcaption><p>Gold</p></figcaption></figure> <figure><img src="/files/XTRsBbPe9dLmM6IQV1DO" alt=""><figcaption><p>Black</p></figcaption></figure> <figure><img src="/files/unhjc5ebLQd1i9BaUtTl" alt=""><figcaption><p>Red</p></figcaption></figure> <figure><img src="/files/R9T6xBsmNqHvtDdHhyI7" alt=""><figcaption><p>Orange</p></figcaption></figure> <figure><img src="/files/MpM3ohmjTCva6gI6I7Sv" alt=""><figcaption><p>Green</p></figcaption></figure> <figure><img src="/files/C0cX8et9OLqPU04EZRxd" alt=""><figcaption><p>Purple</p></figcaption></figure> <figure><img src="/files/bbP37CKp3YjVKNE66YmM" alt=""><figcaption><p>Blue</p></figcaption></figure></div>


# Tier 3 - The Gosling

The Gosling is the third tier evolution of NestQuest. With your training the Gosling has grown much larger and stronger then the Hatchling. Its aura has been maintained during the transformation and it appears to be a much better equipped combatant facing the NestQuest unknowns.

The same 7 Distinct Colors exist for Tier 3 as well: Gold, Black, Red, Orange, Green, Purple, Blue

### Tier 3 Attributes

| Body   | Flame     | Aura   |
| ------ | --------- | ------ |
| Gold   | Lightning | Life   |
| Black  | Plague    | Death  |
| Red    | Fire      | Sun    |
| Orange | Molten    | Earth  |
| Green  | Growth    | Forest |
| Purple | Heart     | Love   |
| Blue   | Frost     | Water  |

### Game Lore

The training has paid off and the Hatchling has evolved into a much stronger Gosling. The Gosling still emits a dangerous flame from its mouth which appears to be related to its prior Aura. Additional training is required to evolve again.

<div><figure><img src="/files/3WgX6ubaTenm1gpOefHq" alt=""><figcaption><p>Gold</p></figcaption></figure> <figure><img src="/files/xmbDxZ2QCD4Kti6KCaCK" alt=""><figcaption><p>Black</p></figcaption></figure> <figure><img src="/files/zVvyPDAkopDdvdA9Q4NL" alt=""><figcaption><p>Red</p></figcaption></figure> <figure><img src="/files/B2cpjWDnxb6zDmfxoTT1" alt=""><figcaption><p>Orange</p></figcaption></figure> <figure><img src="/files/y8YT9pIKkRiy9MwH3UOR" alt=""><figcaption><p>Green</p></figcaption></figure> <figure><img src="/files/n5LPWpyZRshaRp8BKnuF" alt=""><figcaption><p>Purple</p></figcaption></figure> <figure><img src="/files/ds7MhYJm6hhNPZ3PNymQ" alt=""><figcaption><p>Blue</p></figcaption></figure></div>


# Tier 4 - The Armored Goose

The Armored Goose is the fourth tier evolution of NestQuest. The Gosling and the Orb combined powers on the altar to turn into this more powerful creature. Each color of the Armored Goose now has a unique armor class attribute. The armor classes are also related to the gooses auras.

The same 7 Distinct Colors exist for Tier 4: Gold, Black, Red, Orange, Green, Purple, Blue

### Tier 4 Attributes

<table><thead><tr><th width="162">Body</th><th width="157">Flame</th><th width="163">Aura</th><th width="180">Armor</th></tr></thead><tbody><tr><td>Gold</td><td>Lightning</td><td>Life</td><td>Light Helm</td></tr><tr><td>Black</td><td>Plague</td><td>Death</td><td>Plague Plate</td></tr><tr><td>Red</td><td>Fire</td><td>Sun</td><td>Fire Cloak</td></tr><tr><td>Orange</td><td>Molten</td><td>Earth</td><td>Lava Girdle</td></tr><tr><td>Green</td><td>Growth</td><td>Forest</td><td>Petrified Wood</td></tr><tr><td>Purple</td><td>Heart</td><td>Love</td><td>Mithril Chain</td></tr><tr><td>Blue</td><td>Frost</td><td>Water</td><td>Ice Armor</td></tr></tbody></table>

### Game Lore

The Gosling has grown even larger and now wears ancient elemental armor. With its dangerous flame and the aura power, your Armored Goose is well equipped to handle any trouble that may lie ahead. It is unclear what is required to advance further, but the Armored Goose appears to be a qualified foe to any challenger.

<div><figure><img src="/files/L9WhG1dpl38ltvlBltgw" alt=""><figcaption><p>Gold</p></figcaption></figure> <figure><img src="/files/sebV7qfETgw3uuBby1Po" alt=""><figcaption><p>Black</p></figcaption></figure> <figure><img src="/files/mTpronKUio2CVY975dKl" alt=""><figcaption><p>Red</p></figcaption></figure> <figure><img src="/files/lkHwZdUhhIGl8VtPLdrr" alt=""><figcaption><p>Orange</p></figcaption></figure> <figure><img src="/files/TKuzzBsmJi3NQdbdliu6" alt=""><figcaption><p>Green</p></figcaption></figure> <figure><img src="/files/hRKrdxM1m9hOSUpiN4y2" alt=""><figcaption><p>Purple</p></figcaption></figure> <figure><img src="/files/Dy6Ci8J6MGAm0ORXGeyE" alt=""><figcaption><p>Blue</p></figcaption></figure></div>


# Tier 5 - Coming Soon!


# Tier 6 - Coming Soon!


# About the Artist - Source Point Games

The team behind Source Point Games is leading the artistic development of NestQuest.&#x20;

### Source Point Press Socials

{% embed url="<https://sourcepointpress.com/>" %}
Website
{% endembed %}

{% embed url="<https://www.facebook.com/SourcePointPress/>" %}
Facebook
{% endembed %}

{% embed url="<https://mobile.twitter.com/SourcePtPress>" %}
Twitter
{% endembed %}

{% embed url="<https://www.instagram.com/sourcepointpress/>" %}
Instagram
{% endembed %}


# Evolution Mechanics

If you inspect each NFT tier, you will see custom descriptions that will give HINTS as to what is required to evolve to the next tier. As NQ is also a RACE in a way, because the higher tier NFTs will have a lower supply. So it will literally PAY to keep up on NestQuest as new Tiers are released.&#x20;

### How to Evolve

**Tier 1 > Tier 2** - To hatch The Egg, you must incubate it for 30 days on the NestQuest Board Game.&#x20;

**Tier 2 > Tier 3** - To evolve The Hatchling, you must stake >25 GOFX tokens on the GOFX Staking pool.

**Tier 3 > Tier 4** - To evolve The Gosling, you must successfully acquire "The Orb" from the NestQuest Chest Guessing Game, and evolve it on the Altar of Migration.&#x20;

**Tier 4 > Tier 5** - Coming Soon!

Tier 5 > Tier 6 - Coming Soon!


# Perpetual Futures

GooseFX Perpetual DEX

<figure><img src="/files/Si7ZczuY3zRo8Gnz0LoN" alt=""><figcaption><p>Ui Design / GooseFX Perps DEX</p></figcaption></figure>

## Unleash your trading potential with GooseFX Perpetuals&#x20;

The ultimate decentralized future trading experience on Solana. Allowing you to capitalize on market opportunities and take control of your positions like never before. Elevate your decentralized trading game with GooseFX Perpetuals.

## Understanding GooseFX Perpetuals: Documentation

{% content-ref url="/pages/brSmTrbUatetidfL3BVc" %}
[Understanding Perpetual Futures](/archived/perpetual-futures/understanding-perpetual-futures)
{% endcontent-ref %}

{% content-ref url="/pages/x1UwgMsY89O5FmfbzHhb" %}
[Perps DEX Tutorial](/archived/perps-dex-tutorial)
{% endcontent-ref %}


# Understanding Perpetual Futures

## What are Perpetual Futures?

Perpetual Futures are a type of derivative contract in the decentralized world of cryptocurrency trading. They are similar to traditional futures contracts but with a key difference: Perpetual Futures do not have an expiration date. This means that traders can hold their position for as long as they want without worrying about the contract expiring.

Allowing traders to speculate on the price of an underlying asset, such as Bitcoin, without actually owning the asset. By using leverage, traders can control a large position with a relatively small amount of capital. In a perpetual future contract, a trader can go long, meaning they expect the price of the underlying asset to rise, or short, meaning they expect the price to fall.

For example, imagine Alice believes that the price of Bitcoin will increase in the near future. She enters into a perpetual future contract with a leverage of 10x, meaning for every $1 she invests, she controls $10 worth of Bitcoin. If the price of Bitcoin rises by 10%, Alice will make a profit of $1, which is 10% of her $10 investment. On the other hand, if the price of Bitcoin falls by 10%, Alice will suffer a loss of $1. It's important to note that with leverage comes risk, and traders must be careful to manage their positions to avoid significant losses.

### Why use Perpetual Futures?

* Perpetual futures offers a flexible and convenient way to trade underlying assets
* Hedging against price movements and managing asset exposure is possible
* Ease of leverage trading&#x20;
* No pre-specified delivery date required, reducing the need for constant position management.


# The Basics

Discover the Power of Perpetual Futures with GooseFX

Unlock the potential of perpetual futures, or "perps," versatile derivatives that derive their value from an underlying asset. GooseFX's state-of-the-art platform offers a variety of applications for perps, including leverage, speculation, arbitrage, and hedging. Plus, all perpetual futures on GooseFX are securely backed by USDC as collateral.

Elevate your trading game with GooseFX by capitalizing on price movements in both directions. Go long or short on assets to manage risk or make strategic bets, all while enjoying up to 10x leverage. With a 100 USDC deposit, you'll gain access to an impressive 1000 USDC in purchasing power.

This unique advantage of perps makes them an alluring option for leveraging, allowing you to risk minimal capital while standing to achieve substantial returns. Embrace the world of perpetual futures with GooseFX, and transform your trading experience with this powerful financial instrument.

**Go Long (Buy a Perp)**

When you buy a perp, you're anticipating that its price will rise. As the perp's value mirrors that of its underlying asset, any increase in the asset's price boosts the perp's worth. Imagine you foresee $SOL's price going up and want to profit from this upward trend; simply go long by buying the $SOL perp. As the $SOL price rises, so does your position's value.

**Go Short (Sell a Perp)**

Conversely, selling a perp means you expect its price to fall. Just as with going long, the perp's price closely follows its underlying asset. If you predict a decline in $SOL's price and aim to profit from this downward movement, go short by selling the $SOL perp. As the price of $SOL drops, your position's value increases.

**Is Trading Spot Markets Less Risky?**&#x20;

Think Again! While it may seem that spot market trading is less risky, that's not always the case. For instance, if you wanted to make a $1,000 trade in the spot market, you'd need to risk the full $1,000 of your capital.

In contrast, trading a perp allows you to risk only a portion of your capital while retaining the same potential for profit. This also applies to risk management. Instead of allocating a large sum of your capital to safeguard your portfolio, you can use perps to protect it with significantly less collateral. By trading perpetual futures, you can optimize your capital usage while still achieving your desired level of exposure and risk management.

**Diversify Your Trading Strategy with Perps**

Perpetual futures offer traders an excellent opportunity to diversify their strategies and explore new ways of capitalizing on market movements. Whether you're a seasoned investor or new to trading, perps can help enhance your portfolio's performance by providing additional options for leverage, speculation, and hedging.

**Ready to Dive In?**&#x20;

Unlock the potential of perpetual futures and elevate your trading experience. Embrace the flexibility and versatility of going long or short with perps, and seize the opportunities offered by these exciting financial instruments. Don't miss your chance to explore this captivating world of trading and embark on a journey toward greater financial rewards.


# Cross-Collateral Deposits

At GooseFX, we understand that having the ability to trade and manage multiple assets is crucial for our traders. That's why we support cross-collateral token deposits for our Perpetual Futures markets.

With cross-collateral deposits, traders can deposit USDC, SOL and BTC which can then be used as margin within the Perpetuals Markets. The market quotes are in USD and the P\&L is settled in USDC.


# Risk Parameters

## Risk Engine

The Risk Engine is an automated system that monitors your positions and the collateral supporting them. The main role of this system is to liquidate positions when the collateral in your account is not sufficient to support the loss of the position.

#### How Does the Risk Engine Work?

When you take a position on our platform, you deposit collateral as a guarantee against any potential losses. This deposited collateral must be substantial enough to sustain the position, otherwise, you risk getting liquidated.

The Risk Engine monitors this situation. If it calculates that the deposited collateral is not enough to sustain the position, it triggers a liquidation process. The threshold at which the Risk Engine will liquidate a position is if the collateral cannot support a loss of more than 10x.

#### Preventing Liquidation

To prevent your positions from being liquidated, make sure you have enough collateral deposited in your account. You should always be prepared for market volatility and have extra collateral to sustain unexpected market movements.

The goal of the Risk Engine is to protect your account from major losses. Be aware of your positions and manage your collateral efficiently to keep your trades profitable and your account healthy.

## Price Bands

In GooseFX, to protect users during volatile events and prevent market manipulation, markets will prevent orders from being filled if the oracle-mark price breaches the 10% band of the oracle's 5-minute exponentially weighted moving average price (EWMA). If the mark and the 5-minute oracle EWMA diverge by 10%, markets will pause until the price reverts back within this band.

**Formulas are defined as follows:**

`Oracle-mark divergence = (mark - oracle) * max_spread`

`Oracle-EWMA-mark band = within 10% of mark - oracle_ewma_{5 minutes}`

Further risk parameters are also set out in ﻿[Risks & Disclaimer](/risks).


# Margin

Margin  refers to the collateral required to open and maintain a position in a perpetual futures contract. A trader must have a sufficient amount of margin in their account to maintain a position. In the event of price fluctuations, if the margin falls below a certain level, the trader may  their account. In case of price fluctuations, if margin falls below a certain level, traders must add more collateral to avoid liquidation. Liquidation occurs when margin falls below the maintenance margin level.

Example: In GooseFX DEX, Alice wants to open a long position in Bitcoin worth $1000. Alice must have a margin of 10% of the opened position, which in this case is $100. To open the position, Alice must deposit $100 as collateral to ensure she can cover any potential losses. The leverage used in this example is 10, meaning Alice can control $1000 worth of Bitcoin with only $100 of collateral.

As the price of Bitcoin changes, the value of Alice's position also changes. If the price of Bitcoin decreases and Alice's margin falls below the liquidation level, GooseFX DEX will automatically close Alice's position to protect against further losses. This is known as liquidation, and Alice will lose the remaining value of her margin.<br>

<table><thead><tr><th width="136" align="center">Perpetuals</th><th align="center">Initial Margin (Margin Ratio / Leverage)</th><th align="center">Maintenance Margin (Margin Ratio / Leverage)</th></tr></thead><tbody><tr><td align="center">SOL-PERP</td><td align="center">10% / 10x</td><td align="center">5% / 20x</td></tr></tbody></table>


# Funding Rates

Perpetual futures contracts are a type of futures contract that never expires. To enforce convergence with the index price of the underlying asset, funding rates are used to balance the market. In a perpetual futures contract, funding rates are periodic amounts of an asset paid between short and long traders who hold positions in the contract.

### Funding Rates Calculation and Payment

Funding rates on GooseFX DEX are recalculated every hour. Traders will only pay or receive funding if they hold a position at one of these times. If the position is closed prior to the funding exchange, traders will not pay or receive funding.&#x20;

The Formula for calculating the Funding Payment is:

`Funding Amount = (Oracle Price - Orderbook Price) * min(1, Elapsed Time/ Full Funding Period)`

where;

* Oracle Price is the price fetched from the oracle.
* Orderbook Price is the average of the best bid and best ask prices.
* Elapsed Time is the time passed since the last funding time.
* Full Funding Period is the total duration of the funding period. *Since our Funding Payments are made on an hourly basis, the full funding period is 1 Hour.*

### The Importance of Funding Rates

It is important to pay attention to funding rates when trading perpetual futures contracts on GooseFX. Depending on the amount of leverage used, funding rates can have a big effect on a trader's account. In fact, depending on their leverage, a trader’s position may get liquidated if they are unable to pay for funding.

*For more insights into Funding Rates, check out our blog* [*here*](https://www.blog.goosefx.io/funding-rates/)*.*


# Oracles

GooseFX utilises [Pyth](https://pyth.network/) as an oracle source. The protocol has the flexiblility to update and customize as necessary on a per market basis.


# Liquidations

## What is Liquidation?

Liquidation is a process in leveraged trading that occurs when a trader's position falls below its required Minimum Maintenance Margin. In the context of GooseFX DEX, traders who use leverage are borrowing funds from the platform to increase their exposure to a particular asset.

To ensure the stability of the platform and to protect against potential losses, GooseFX DEX requires traders to maintain a minimum amount of collateral in their account, known as the Minimum Maintenance Margin. If a trader's position falls below this level, the platform will trigger a liquidation process to take over the position and use the remaining collateral to settle any potential losses.

It is important for traders to keep an eye on their position's value and margin levels to avoid liquidation. The Insurance Fund, which is created by liquidation fees, may also be used to settle losses in the event of a rapid price movement or if liquidations do not happen in time.

## Example <a href="#irn8v" id="irn8v"></a>

* *Alice open's a long position on BTC at $20,000 dollars with 10x leverage using $100 USDC*
* *The position value is $1000 USDC long on BTC, with $100 USDC in margin/collateral*

The current maintenance margin of your position is calculated by total collateral / position size.

Here, that would be 10% as 100 / 1000.

If the maintenance margin of your position drops below the Minimum Maintenance Margin, your position will be eligble for liquidation by liquidators.


# Insurance Fund

### What is Insurance Fund? <a href="#cbmen" id="cbmen"></a>

The Insurance Fund is a safety mechanism in GooseFX perps DEX that protects against levered losses sustained by traders in the platform. It acts as a backstop to maintain the solvency of the exchange in case of any bankruptcies.&#x20;

The Insurance Fund is funded by premiums collected from liquidation fees & trading fees. The fund is used to pay off liabilities when an account becomes bankrupt. If the losses incurred are greater than the balance of the Insurance Fund, the losses will be socialized among participants, such as perpetual traders, in proportion to their deposits or positions.

### Why is Insurance Fund necessary?  <a href="#hqk4j" id="hqk4j"></a>

The Insurance Fund is necessary to protect against levered losses sustained by users of the platform. It serves as a safety net in the event that a user's account has more unrealized losses than available collateral, which may occur during particularly volatile market conditions when accounts with insufficient margin may not be liquidated in time or at their zero-price. The insurance fund acts as a solvency buffer, ensuring that there are sufficient funds to pay out profitable positions in the event of a bankruptcy.

### What is Socialised Loss? <a href="#mab63" id="mab63"></a>

Socialized Loss occurs when the losses sustained on a platform are shared among all the deposits and/or positions of the users. It only happens when the leveraged losses in a particular market are greater than the token balance of the Insurance Fund, meaning that deleveraging was not sufficient to ease the outstanding debt.&#x20;

In such a scenario, the losses incurred are shared among participants: Perpetual Traders are paid pro-rata (by base amount) by all open positions.


# Single Sided Pools

Revolutionizing DeFi with Single-Sided Liquidity Pools and Concentrated Liquidity Swap

<figure><img src="/files/bBnQm10EQyE2mvUwix7z" alt=""><figcaption><p>GooseFX Single Sided Pools</p></figcaption></figure>

Welcome to [GooseFX](https://app.goosefx.io/farm) - a novel DeFi solution that incorporates a brand new *Single-Sided Liquidity or SSL pool design* and a unique swap utilising a new *flexible liquidity mechanism*. *SSL or Single Sided Liquidity pools* are pools where users can provide **only one type of asset to earn yield** rather than requiring both assets as opposed to traditional liquidity pools.

This platform aims to reshape the DeFi landscape by enhancing user experience and market efficiency, ensuring optimum returns for liquidity providers or *LPs* and traders alike. Our objective with the SSL pools is to elevate and streamline the user experience for yield generation while at the same time ensuring optimum and sustainable returns for the liquidity provider&#x73;*.*

## **Single-Sided Liquidity v2: Sustainable and Efficient Real Yield**

GooseFX is proud to launch the second iteration of its Single-Sided Liquidity provision, GooseFX SSL v2 called [Dynamic SSL](/archived/farm/dynamic-single-sided-liquidity-pools). SSL v2 builds on top of the strong foundation of GooseFX SSL v1, with innovative features like concentrated liquidity, and loss protection. This version introduces innovative safeguards and functionalities, revolutionizing the user experience while providing LPs even greater protection and capital efficiency.

***

Traders, on the other hand, can leverage the best price combinations made possible through our integration with the Jupiter Swap aggregator.


# Dynamic Single-Sided Liquidity Pools

GooseFX SSL v2: Advanced Single-Sided Liquidity Pools

<figure><img src="/files/Px8VD0eubGl0V4Rl3jmc" alt=""><figcaption><p>Introducing Single Sided Liquidity Pools v2</p></figcaption></figure>

### [**Tutorial on How to Deposit Funds into v2 SSL Pools**](https://docs.goosefx.io/tutorials/how-to-lp-with-gfx-single-sided-liquidity-pools) <a href="#tutorial" id="tutorial"></a>

## Introduction

GooseFX is proud to unveil the second iteration of its Single-Sided Liquidity (SSL) provision, GooseFX SSL v2.&#x20;

*SSL or Single Sided Liquidity pools* are liquidity pools where users can provide **only one type of asset to earn yield** rather than requiring both assets as opposed to traditional liquidity pools.

This version builds upon the features of GooseFX SSL v1 and boosts these capabilities with innovative functionalities to grant the liquidity providers or *LPs* even greater protection and capital efficiency.

> *Note: Our SSL v2 is currently in closed beta. To get access to it, visit our* [*twitter thread*](https://x.com/GooseFX1/status/1696553337498558720?s=20)

## Overview

This overview presents a brief look into the key features of the latest version of our offering - SSL v2 and how it has improved upon its former version.

> *To deposit your assets into SSL v2, check out our* [*Farm*](https://app.goosefx.io/farm) *page*

#### Better SSL Swap Pricing

* Our exchange rates are based on **enhanced price references**. This ensures users get a fair trade value for any assets. The system also uses historical data and some manual settings to decide these rates.

#### Improved SSL Pool Organization

* SSL Pools are now **grouped by domains**, allowing them to easily trade with each other. The PoolRegistry manages these groupings and settings of each pool. Only pools in the same group can trade with each other.

#### Easy Participation in SSL Liquidity

* We've simplified the process for users to **become liquidity providers**. By making a special account for an SSL Pool, users can *deposit or withdraw their funds anytime*. They also get a share of the fees as a reward, which they can collect *anytime*.

#### Primary and Secondary Tokens in SSL Pools

* Every SSL Pool has a **main token**, which is its primary source of funds. There are also other assets in the same group called **"secondary" tokens**. The system first tries to use *secondary balances for trading* and if that's not possible, it uses the main funds with certain restrictions.

#### Keeping Track of Price History

* We have special accounts to record historical prices, which are updated regularly. These prices come from reliable sources such as **Pyth oracles**.

#### Effortless Swaps Within Pools

* We have a new feature allowing easy transfers between pools for **best fund distribution**. This uses the latest price data to ensure trades are fair and accurate.

***

### Original Features from GooseFX SSL v1

GooseFX SSL v2 continues to uphold the avant-garde benefits introduced in GooseFX SSL v1. These encompass *single-sided liquidity provision, auto-compounding, and intelligent market-making* using both pool and oracle prices.

***

## Conclusion

GooseFX SSL v2 is a big stride in Solana DeFi, delivering an **upgraded and intuitive liquidity provision experience**. The *v2 version* not only preserves the merits of *v1* but also infuses new functionalities for **advanced risk management and capital productivity**.&#x20;


# FAQ SSL v2

Common questions are answered here, for more discussion message on Discord

### What is Single-Sided Liquidity?

* Single-sided liquidity is a revolutionary AMM that allows you to deposit a single asset to earn auto-compounded yield. The yield is derived from the arbitrage profit from the spread between the quoted oracle and pool price and the swap fee.\
  \
  We use a proprietary advanced market making algorithm we developed and tested for several months. This math logic gives us a superior edge in quoting for best prices and therefore generating substantial fees on swaps along with arbitrage. Due to this, we are also capital efficient and thus can outperform other AMMs. All fees and volume are done on chain and can be verified if there are any doubts. APY can change with the amount of users/liquidity in the pools. It is ratio based as well as a proponent of fees generated which are split amongst pool participants.

### What is the difference between stable, primary, and hyper pools?

* The distinction between stable, primary, and hyper pools lies in the types of assets they hold. Stable pools are composed of stablecoins, primary pools house prevalent ecosystem tokens, while hyper pools cater to more volatile assets.

### What are the risks?

* The risks associated with single-sided liquidity are price inventory risk which is common for any market maker. This risk occurs when the price of the assets used for market making declines in value in excess of the fees generated.\
  \
  The SSL system is designed to not have impermanent loss. However, with our new type of single sided liquidity automated market maker there is risk that we call "Token Exposure Risk". Before we explain what Token Exposure Risk is, let's define some terminology. \
  \
  Main Pool Token : The main pool token of a pool is the token that is deposited into the pool by liquidity providers. For e.g. the main pool token of a SOL pool is SOL. \
  \
  Secondary Token : A secondary token is any token that is not the main pool token for a pool. An example: For the SOL pool, BONK is a secondary token. And for the BONK pool, SOL is a secondary token. \
  \
  Token Exposure Risk is defined as a pools exposure to secondary tokens. For example, let's say that a user interacts with a SSL SOL pool by swapping her BONK into SOL. Until the SOL pool has gotten rid of the BONK tokens either by making another swap, the value of the SOL pool will experience change depending on the movement in BONKs price. If BONK goes up in value as compared to SOL, then the pool value will increase, while if BONK goes down in value as compared to SOL, then the SOL pool will experience a value decrease. Even if token exposure risk can result in a value increase of the pool, our purpose is profitable market making and not speculation on price movements. Therefore, rules and thresholds are in place to control the amount of token exposure risk our pools are exposed to in order to maximize the exposure to market-making profits.

### How are LP fees distributed?

* 50% of fees are sent directly to LPs in the native asset of the token pool. The rest of the fee distribution details can be found in our [Fee Share](/tokenomics/stake-rewards-and-fee-share) docs.

### How is APY calculated for SSL Pools?

* APY is calculated based on the swap fees generated by the liquidity pools on a 3 day rolling average. The APY provides an indication of the potential returns that LPs might earn over a year from profit/loss of marketing making and arbitrage. It is calculated on a three-day basis and then annualized. The SSL system is designed so that impermanent loss doesn't occur, but because of the occasional exposure that the single-sided pools get due to trading, there is some risk. We control the token exposure risk using thresholds and by updating the prices we quote in order to balance the trade-off between profitable market-making and holding inventory.

### Are the SSL Yields Incentivized?

* No. The yield generated by our single-sided liquidity pools is composed of the swap fee as well as the profit and loss from market-making activities.

### Are there controls in the program that prevent the MM strategy from withdrawing more than a certain amount from the pools to float?

* Yes, there is a max drawdown per pool and this value is dependent on the volatility of the asset where it will be lower for stables and have a higher tolerance for volatile assets.&#x20;

### Bob and Alice Numerical Example

**Initial Setup**

1. Bob: Starts with $1000, wants to buy SOL.
2. Alice: Has deposited in an SSL pool and will earn fees from transactions.
3. Swap Fee: Set at 0.1%. Transaction Details

**Transaction Details**

1. Bob's Action:
   * Wants to buy SOL with his $1000.
   * GooseFX offers the best swap rate at $50/SOL. The market rate (oracle price) is $50/SOL, and the SSL pool rate is $49.98/SOL.
2. Bob's SOL Purchase:
   * Buys SOL at $50 per SOL.
   * Total SOL bought = 1000/50 = 20 SOL.
   * Swap fee = 0.1% of $1000 = $1.
3. Bob's Final Balance:
   * Ends up with 20 SOL.
4. Earnings for Alice (LP):
   * From the swap: Swap fee = $1.
   * From the price difference: Profit per SOL = $0.02 (since Bob bought at $50/SOL while pool price was $49.98/SOL).
   * Total profit from price difference = 20 \* 0.02 = $0.40
   * Total earnings = Swap fee + Price difference profit = $1 + $0.40 = $1.40. Final Balances and Earnings

**Final Balance and Earnings**

1. Bob:
   * Started with $1000.
   * Ended with 20 SOL.
   * Successfully swapped his USDC for SOL at a competitive rate.
2. Alice (Liquidity Provider):
   * Earned a total of $1.40 from Bob's transaction.
   * This amount is added to her assets in the SSL pool.

***

### SSL Withdrawal Fee Structure Update

As part of our continuous efforts to enhance the security and efficiency of our platform, we have introduced a new withdrawal fee mechanism designed to mitigate specific vulnerabilities associated with atomic transactions involving deposit, swap, and withdrawal actions. This update is crucial for maintaining the integrity of asset pricing within our liquidity pools.

#### Purpose of the Withdrawal Fee

The new withdrawal fee addresses a vulnerability where liquidity providers (LPs) could engage in atomic transactions—depositing, swapping, and withdrawing within the same transaction—to manipulate the quoted price of the input asset unfavorably. This manipulation not only affects the fairness of the trading environment but also undermines the overall stability of the liquidity pool.

#### Fee Structure

The withdrawal fee is dynamically calculated based on a timed decay model, effectively reducing the fee to 0% over a predefined period. This period is set to a day, measured in 216,000 slots.

**Initial Fee and Decay Factor**

* **Initial Fee:** The withdrawal fee starts at 2% at the time of the deposit.
* **Decay Factor:** The fee is subject to a decay factor, calculated as follows:&#x20;

$$
\[ \text{Decay Factor} = \left(1 - \frac{t}{T}\right) ]
$$

Where:

* *T* is the total interval for the fee application (216,000 slots in this case).
* *t* is the elapsed time since the last deposit, measured in slots.

**Examples**

* At *t* = 0 (the same slot as the deposit), the withdrawal fee is at its maximum of 2%.
* At *t* = *T*/2, the fee would decay to 1%, demonstrating the gradual reduction in the fee over time.

#### Implementation Details

To accommodate this new fee structure, we've added a new field to the liquidity account. This addition is backward compatible since the field is initialized as 0, ensuring that no existing LPs are unfairly subjected to withdrawal fees if they deposited just before the upgrade.


# GooseFX - Powered By Pyth

To power our DeFi suite, requires a fast and reliable oracle. This is where [Pyth Network](https://twitter.com/PythNetwork?ref=blog.goosefx.io) comes in!

<figure><img src="/files/OB4WwOXF8sm4J63MxTIH" alt=""><figcaption><p><a href="https://x.com/PythNetwork/status/1755169598763413534?s=20&#x26;ref=blog.goosefx.io">Pyth Network</a> powering a huge <em>network</em> of dApps!</p></figcaption></figure>

[Pyth Network](https://pyth.network/price-feeds?ref=blog.goosefx.io) provides more than 450 price feeds to over 300 dApps across various chains! At GooseFX, we've carefully selected Pyth as our trusted provider for price feeds. It serves as the backbone for both our Perps Market Maker and our groundbreaking AMM model that drives our Single-Sided Liquidity pools. These price feeds are the lifeblood of our trading ecosystem, but you might be wondering, *why PYTH?*

<figure><img src="/files/VDuHweBwOBDJFBqkI8kV" alt=""><figcaption><p>Why Pyth?</p></figcaption></figure>

* **Latency and Frequency of Updates:** [Pyth](https://pyth.network/benchmarks?ref=blog.goosefx.io) offers lightning-fast updates with high frequency which is crucial for our AMM to be as effective as possible!
* **Security Measures:** Pyth prioritizes security with tight measures such as [confidence intervals](https://pyth.network/blog/what-is-confidence?ref=blog.goosefx.io), providing added reliability and trustworthiness to the price data it delivers.
* **Ease of Integration:** Integrating Pyth into our platform was seamless and hassle-free, thanks to its user-friendly APIs and developer-friendly documentation.
* **Competitive Platform Fees:** Pyth's innovative [Pull Oracle design](https://pyth.network/blog/pyth-a-new-model-to-the-price-oracle?ref=blog.goosefx.io) enables us to enjoy competitive platform fees while maintaining the highest standards of accuracy and reliability.
* **Wide Coverage of Assets:** With Pyth, we have access to a vast array of assets, ensuring comprehensive coverage across various markets and instruments not only for our Perps DEX but also for our SSL Pools!


# NFTs

NFT Aggregator Deprecated \[DEC 2023]

## To Delist NFTs use one of the links below.

**GFX AH Contract v1** <https://feature-nft-v1-depr.doi1f799swne9.amplifyapp.com/nfts/profile>

**GFX AH Contract v2** <https://feature-nft-v2-depr.doi1f799swne9.amplifyapp.com/nfts/profile>

## Deprecating NFT Aggregator

Dear GooseFX Community,

After thorough deliberation, we have decided to phase out the NFT Aggregator from GooseFX. This decision aligns with our strategic focus to intensify our efforts and resources on enhancing our core DeFi offerings, including the SSL pools and Perpetual Futures DEX.

Our journey in the NFT space has been incredibly rewarding. We've collaborated with various projects, contributing significantly to the advancement of the NFT ecosystem. We extend our deepest gratitude to everyone who has been part of this exciting journey.

**What This Means for Our Users:**

* **De-listing or Selling NFTs**: We encourage our users to de-list or sell any NFTs they currently hold on our Auction House contract.
* **Continued Focus on DeFi**: The retirement of the NFT Aggregator marks a new chapter for GooseFX, allowing us to channel our energy and innovation into DeFi services, notably the SSL pools and our Perpetual Futures DEX.

We appreciate your understanding and support as we make this transition. Our commitment to providing an exceptional DeFi experience remains steadfast, and we are excited about what the future holds for GooseFX and our community.

Warm regards,

The GooseFX Team


# Nest NFT Aggregator

NFTs on GooseFX: A Unified Marketplace and Aggregator

## NFT Aggregator Deprecated \[DEC 2023]

{% content-ref url="/pages/52zVtfEpxrlnM5GoEXbf" %}
[NFTs](/archived/nfts)
{% endcontent-ref %}

The rapid growth of the NFT space signals a pivotal change in how we interact with art, collectibles, music, and in-game assets. GooseFX leverages this opportunity to foster the NFT and creator economy within the Solana ecosystem.

Our Goose Nest NFT marketplace aims to create a harmonious space where digital creators, physical makers, and blockchain NFT markets can thrive. We strive to build a platform that caters to all these sectors individually and collectively.

The Nest marketplace employs the cutting-edge Metaplex auction house contract. This contract transforms the way users engage with their NFTs. It allows NFT owners to maintain custody of their assets while they are listed on the marketplace and while receiving offers. The contract also supports self-executing auction house listings, eliminating the need for users to manually accept offers. This innovative contract significantly improves market efficiency, facilitates market-wide listings, and minimizes user intervention in transaction execution.

A unique aspect of this contract is the profound understanding of collection pricing it offers, leading to better liquidity data in the form of active bids. This redefines the concept of the "floor price" for NFT collections, shifting its meaning towards sell pressure rather than being a primary data point. This contract holds immense implications for both collectors and sellers, driving a shift toward this new NFT marketplace standard.

GooseFX recognizes the vast potential in the overlap of digital content creation and licensing, especially in the game development and 3D printing sectors. We aim to be the marketplace hub for all creators in the Solana ecosystem. From picking out basic game assets for metaverse projects to purchasing NFTs and their corresponding file types for replication, the Nest marketplace supports both the digital and physical creator economies.

Our NFT aggregator integrates with several Metaplex auction house contracts, including Magic Eden, Tensor, and Hyperspace, featuring the most popular collections. Additionally, our NFT appraisal engine provides valuations for these popular collections, further enhancing our platform's value proposition.

**Nest Marketplace Launch Functionality:**

* Basic search and filter functionality by collection, attribute, prices, verified creators, and more.
* Creator signup and verification.
* NFT Collection Registration and Listing.
* Ability to bid on listed and unlisted NFTs.

Dive into the world of NFTs with GooseFX, your trusted partner in the ever-evolving blockchain landscape.

###


# Nest NFT Launchpad

## NFT Aggregator Deprecated \[DEC 2023]

{% content-ref url="/pages/52zVtfEpxrlnM5GoEXbf" %}
[NFTs](/archived/nfts)
{% endcontent-ref %}

At GooseFX we pay close attention to problems which plague the NFT ecosystem, in particularly what our customers desire but might not fully comprehend; such as mint botting and rug insurance. With our launchpad implementation we are taking a number of unique steps forward for the NFT scene as a whole on Solana with thoughtful mechanics and optionality to help increase transparency for both creators and collectors.

### Launchpad Features

* Multicurrency support (SOL and USDC)
* Optional Creator Vesting&#x20;
* Mint Freeze Period
* Unique Civic Captcha Pass enforced mints
* Wallet-Based On-chain Whitelist
* Hidden Reveal

First, we are introducing multi-currency support for our Launchpad so collectors can choose which asset they want to hold during market fluctuations without being locked into a particular crypto to participate in mints.

Second, we will introduce Option Creator Vesting for mint funds. We feel this option will offer collectors more confidence in the projects they choose to mint. Creators can assign milestones, and vesting time lines to show off how they are intending to build their community post mint. This can also including a voting mechanism for communities to propose refunds if projects fail to hit their promised project deliverables or choose to abandon them completely.

Third, our newly designed and unique mint process has both anti-botting and fairness in mind. The mint process starts with a pre-defined mint queue period, where users are required to complete a captcha to get into line for the mint. We have partnered with Civic, and utilize their Captcha Pass functionality for this feature. During this mint queue period only one mint transaction per address is allowed to promote fairness and access to as many interested parties as possible. After the period is complete that queue of mint transactions is sent through to be processed, and we open up the Candy Machine for any un-minted NFTs, which become First Come First Serve.

Fourth, we will be adding various whitelist perks to benefit platform users. This will include guaranteed whitelist spots for all Tier 6 NestQuest NFT holders, as well as a "Golden Ticket" whitelist component. The Golden Tickets will be sold and distributed through our marketing promotions and ticket holders will be able to register for whitelist spots as we prepare for project launches.&#x20;

Most recently, we added the Hidden Reveal feature to give creators added flexibility during their mints. This feature enables a default image to be utilized for the collection mint, until a specified future time when all of the NFTs will become visible to the minting users. This interaction ads another bit of mystery for minters and allows for more coordinated mint events.&#x20;

### Future Enhancements

Civic Facial Scan - Proof of Uniqueness Whitelisting - We are still investigating this option, and think that there may be a future use for this technology in NFT mints

Creator Vesting Schedule Templates and Refund Voting Process - Because of how unique and new this feature is we are researching the best ways to implement these processes in a meaningful way to serve their intended purpose.


# NFT Appraisal API Documentation

If you have any additional examples or added documentation that we could add please reach out to a team member in discord! We would love to include it.

## NFT Aggregator Deprecated \[DEC 2023]

{% content-ref url="/pages/52zVtfEpxrlnM5GoEXbf" %}
[NFTs](/archived/nfts)
{% endcontent-ref %}

## Background - NFT Appraisal As a Service&#x20;

For the past six months, we have been building what we believe to be one of the world's most accurate appraisal engines for non-fungible tokens. By combining mathematical modeling and machine learning, we have built an NFT appraisal tool with an [R2 score of 0.92.](https://en.wikipedia.org/wiki/Coefficient_of_determination) We are currently packaging the model into a service we are calling the “GFX NFT Appraisal Engine”, which will be available from a web interface and through an API at <https://appraise-my-nft.goosefx.io>.

#### The GFX Appraisal Engine supports four distinct call inputs:&#x20;

* **GFX Specific Rarity Appraisal** - a unique appraisal value taking into account attributes and rarity of a specified NFT
* **GFX Collection Appraisal** - a new appraisal value applying to any generic NFT in a collection. This is intended to replace the collection floor price metric as a much more appropriate data point.
* **Collection Mint ID List** - Returns the complete collections mint ID list
* **GFX Appraisal Supported Collections List** - Returns a complete list of Appraisal Engine-supported collections.

Let's look at the examples below for more details.

### Usage Examples

#### GFX Specific Rarity Appraisal&#x20;

To get a real-time valuation (in SOL) of any NFT belonging to one of these collections, get a token\_id, for instance, AVrGwmwkQkoaCBx3UcAhDHca9hJReEtjaG797UY5yHtp for SMB #664, and then call the API with the ID, like so:

<https://appraise-my-nft.goosefx.io/?address=AVrGwmwkQkoaCBx3UcAhDHca9hJReEtjaG797UY5yHtp>

To get a response in the following format.

{"AVrGwmwkQkoaCBx3UcAhDHca9hJReEtjaG797UY5yHtp":248.62337219046563}

This amount of 248.63 represents the Specific Rarity Appraisal of the #664, SMB NFT in Solana.

#### GFX Collection Appraisal&#x20;

We have also developed a collection level appraisal metric that tracks the bottom quantile of NFT sales over time. This results in a metric that resembles some characteristics of the commonly used “floor price”, but with less volatile fluctuations and fewer possible attack vectors for price manipulation, meaning that our appraisal engine is well suited to build products around.

The Collection Appraisal call takes in the collection name to return the value. replace the Collection name from the example call below and viola!

For instance, to get the Collection Appraisal of the Solana Monkey Business collection, call the API like this: <https://appraise-my-nft.goosefx.io/?address=Solana+Monkey+Business>

And you get the response: {"Solana\_Monkey\_Business":234.94823853138848}

This amount of 234.94.. represents the GFX Collection Appraisal for the SMB collection.

#### Collection Mint ID List

Much like above, just swap out the collection names and use the "+" for spaces to utilize this call.

{% embed url="<https://appraise-my-nft.goosefx.io/?get_token_ids=Pesky+Penguins>" %}
Collection Mint ID List
{% endembed %}

####

#### **All Supported Collections List**

{% embed url="<https://appraise-my-nft.goosefx.io/available_collections>" %}
Currently Supported Collections for GFX Appraisal Engine
{% endembed %}

Currently, the Appraisal Engine Supports these collections:

* Solana Monkey Business = "Solana+Monkey+Business"
* Thugbirdz = "Thugbirdz"
* Pesky Penguins = "Pesky+Penguins"
* Degen Ape Academy = "Degenerate+Ape+Academy"
* Degods = "Degods"
* Doge Capital = "Doge+Capital"
* Famous Fox Federation = "Famous+Fox+Federation"
* Stoned Ape Crew = "Stoned+Ape+Crew"
* Aurory = "Aurory"
* Blocksmith Labs = "Blocksmith+Labs"
* Catalina Whale Mixer = "Catalina+Whales"
* Cets on Creck = "Cets+On+Creck"

#### Planned enhancements: We will be adding to this service in the coming months as we get new features defined and built out. Stay tuned!


# Referral Program

Refer your friends and earn 20% of their perps taker fees in USDC!

### How to create a referral link?

* Create a trader account by navigating to the trade tab and clicking the 'Deposit/Withdraw' button

<figure><img src="/files/EcXV0zXIdec8lF6M7Mtw" alt=""><figcaption></figcaption></figure>

* Deposit any amount of USDC&#x20;

<figure><img src="/files/HeAhNRMMjRwyvyPHUiXR" alt=""><figcaption></figcaption></figure>

* Once you have deposited some amount of USDC click the 'Rewards' button in the navigation bar and click the 'Refer' tab

<figure><img src="/files/xlsHrADNrcPhEuB4Ed2b" alt=""><figcaption></figcaption></figure>

* You should now see your referral link!

### Example

Let's say Bob refers Alice using his referral link and Alice generates $10,000 of taker volume. This would generate $10,000 \* 0.001 = $10 in fees. Since Bob will earn 20% of those fees he receives $2 claimable in USDC.

### Is this on-chain?

Yes! Our referral program is powered by Buddylink and everything is verifiable on-chain.&#x20;


# Perps Leaderboard

Learn about how we calculate points, loyalty, and PnL

Our loyalty system is designed to reward active users. Your loyalty score starts at 0% and increases as you engage more on the platform. Earn loyalty points based on your trading volume and trading frequency. The more you trade and participate, the higher your loyalty score will be.&#x20;

More Volume → More POINTS\
Trade Regularly → Higher LOYALTY\
Higher Loyalty → More POINTS\
Higher PnL→ Does **NOT** affect points

## **Categories of Points**

We display three types of points:

* 24hr points: All points collected within the last 24 hours.
* 14D points: All points collected within the last 14 days.
* Total points: All points collected over your lifetime on GooseFX Perps \[Devnet].

## **Reward Distribution**

Just like the NFT Leaderboard, the Perpetuals Leaderboard on GooseFX Mainnet also offers exciting rewards for our top-performing traders.

### **Biweekly Reset**

* Every 14 days, we reset the points to start a fresh and thrilling biweekly competition.
* Don't worry, your hard-earned loyalty score remains intact and unaffected by this reset.

### **Total Points Accumulation**

* Throughout the season, your total points continue to accumulate, reflecting your overall trading performance.
* This allows you to compete for top positions on the leaderboard and claim monthly rewards.

### **Points Reset**

* The points in the 24hr and 14D categories reset every 14 days, specifically on Monday at 00:00 UTC.

### **Amazing Prizes**

* Within 48 hours of each biweekly reset, GooseFX will distribute rewards to the winners based on their positions on the Perpetuals Leaderboard.
* As a top-performing trader, you'll not only receive prizes but also earn recognition among the GooseFX community.

## **Coming Soon - Season 1**

* In the upcoming Season 1, we are introducing a new and improved point system for the Perpetuals Leaderboard.
* All rewards will be sent out automatically on-chain via the rewards tab on our platform, ensuring a seamless experience for all winners.

### **Lottery - Additional Chance to Win**

* Excitingly, the Perpetuals Leaderboard also offers a lottery draw, providing additional chances to win prizes.
* By simply interacting with the platform and actively trading, you'll automatically be enrolled in the lottery.
* Lucky users will receive airdropped lottery winnings and get notified to redeem the prize on the platform.

**Get Ready for an Exciting Journey!** Participate actively, earn points, and increase your loyalty to stand a chance to win big!


# Market Maker Reward Program

Rewards Program for Market Makers

Our Market Maker Reward Program is designed to incentivize liquidity provision and reward active participants.

### Program Fees

As a market maker on GooseFX, you enjoy competitive fee structures that encourage active participation and liquidity provision.

**Maker Fee:** 0.02% (2bps)\
**Taker Fee:** 0.04% (4 bps)\
\
These are base fees, rebates are below based on volume.

### **Tiered Rebate Structure:**

Our Market Maker Program operates on a tiered system based on your trading volume over the past 7 days. The more volume you contribute, the higher your tier and the greater your maker rebate.

<table><thead><tr><th width="131">Tier</th><th width="225">7D Volume Requirement</th><th>Maker Rebate</th><th>Taker Rebate</th></tr></thead><tbody><tr><td>1</td><td>5% of exchange maker volume</td><td>-0.01% (-1 bps)</td><td>0%</td></tr><tr><td>2</td><td>10% of exchange maker volume</td><td>-0.02% (-2 bps)</td><td>0%</td></tr><tr><td>3</td><td>15% of exchange maker volume</td><td>-0.03% (-3 bps)</td><td>0%</td></tr></tbody></table>

### **Maker Token and Cash Bonus**

As an additional reward, we offer a Maker Token and Cash Bonus to our top market makers for Perpetual Futures on a weekly basis. By achieving high trading volumes, you can earn significant bonuses.

<table><thead><tr><th width="105">Rank</th><th width="232">7D Volume Requirement</th><th>Cash Bonus</th><th>$GOFX Bonus</th></tr></thead><tbody><tr><td>1</td><td>Top market maker for the week</td><td>$500 USDC</td><td>10,000 GOFX</td></tr><tr><td>2</td><td>Second largest share of maker volume </td><td>$250 USDC</td><td>5,000 GOFX</td></tr><tr><td>3</td><td>Third largest share of maker volume</td><td>$100 USDC</td><td>2,500 GOFX</td></tr></tbody></table>

*Please note that the cash and token bonuses are subject to change based on program updates and market conditions.*\
\
**Uptime Requirement**

Minimum $2.5K USD notional depth on both sides of the book ($5K USD in total) within a 40bps spread. Market makers must meet this requirement for 90% of the epoch for all markets currently listed.&#x20;

### **Join the Market Maker Program: Drop a DM on** [**@GooseFX1**](https://twitter.com/GooseFX1)

By becoming a market maker, you contribute to the overall liquidity and efficiency of our platform while enjoying reduced fees and bonus rewards. Join the program today and be part of the vibrant ecosystem of GooseFX!


# Switch from Mainnet to Devnet \[GUIDE]

Mainnet is used for real transactions, devnet is used for testing and development purposes.

## Changing Wallet Networks on Phantom

1. Click the top left icon
2. Then click Developer Settings
3. Click Change Network
4. Then select the desired network, Mainnet to Devnet.
5. Perform the same steps to switch between Devnet to Mainnet

<figure><img src="/files/DkLX9JvFTKcYKq99w58L" alt=""><figcaption></figcaption></figure>

## Changing Wallet Networks on xNFT Backpack <a href="#changing-wallet-networks-on-xnft-backpack" id="changing-wallet-networks-on-xnft-backpack"></a>

1. Click on the profile icon in the top right corner.
2. Next, select Preferences.
3. Look for the section labeled Solana and click on it.&#x20;
4. Select RPC connection.
5. Switch to either Mainnet or Devnet<br>

<figure><img src="/files/ePW2L139punqpqT1l2pq" alt=""><figcaption></figcaption></figure>

## Changing Wallet Networks on Glow Wallet <a href="#changing-wallet-networks-on-glow-wallet" id="changing-wallet-networks-on-glow-wallet"></a>

1. Click on the gear icon in the bottom right corner.
2. Next, select Network from the menu.
3. Choose the desired network Mainnet or Devnet and click on the glow wallet icon in the bottom left corner.

<figure><img src="/files/0g6mZAOflEXD4rF4qmZY" alt=""><figcaption></figcaption></figure>

## Changing Wallet Networks on Solflare Wallet <a href="#changing-wallet-networks-on-solflare-wallet" id="changing-wallet-networks-on-solflare-wallet"></a>

1. click on the gear icon in the bottom right corner.
2. Next, select Network from the menu.
3. Choose desired network Mainnet or Devnet.
4. Finally, select Proceed to continue.

<figure><img src="/files/Aifw1cdp9QlwfmRHnrwg" alt=""><figcaption></figcaption></figure>


# Perpetual DEX SDKs

GooseFX Perpetual Futures SDK is designed for market makers and trading enthusiasts, allowing interaction with the GooseFX on-chain perpetual futures. We have a Typescript and Python SDK for your convenience with code examples!

Typescript SDK: <https://www.npmjs.com/package/gfx-perp-sdk>

Python SDK: <https://pypi.org/project/gfx-perp-sdk/>


# Typescript SDK

Typescript SDK: <https://www.npmjs.com/package/gfx-perp-sdk>

GooseFX Perpetual Futures SDK is designed for market makers and trading enthusiasts, allowing interaction with the GooseFX on-chain perpetual futures.&#x20;

The Typescript SDK consists of three classes:

1. **Perp**
2. **Product**
3. **Trader**

### Perp

The Perp class is essential for initializing the connection and wallet used for subsequent interactions. Initializing the Perp class should always be the first step, regardless of the operation type.&#x20;

**Constructor**

```javascript
const perp = new Perp(connection, networkType, wallet);
```

| Parameter                 | Description                                                                                          |
| ------------------------- | ---------------------------------------------------------------------------------------------------- |
| `connection` (Connection) | An instance of the `Connection` class from `@solana/web3.js` to communicate with the Solana network. |
| `networkType` (string)    | A string indicating the network type, such as 'mainnet' or 'devnet'.                                 |
| `wallet` (Wallet)         | An instance of the `Wallet` class from `@project-serum/anchor` representing the user's wallet.       |

Methods

init()

Initializes the `Perp` instance by setting up necessary market and product group information.

```javascript
await perp.init();
```

**Returns:** `Promise<void>`

| Properties         | Description                                                                       |
| ------------------ | --------------------------------------------------------------------------------- |
| wallet             | The wallet instance passed during the construction of the `Perp` object.          |
| connection         | The connection instance to the Solana network.                                    |
| program            | The on-chain program associated with the perp market.                             |
| networkType        | The type of network the `Perp` instance is connected to.                          |
| marketProductGroup | The product group information for the market, undefined until `init()` is called. |

Here's an example of how to initialize the Perp class.

```javascript
const perp = new Perp(connection, 'mainnet', wallet);
await perp.init();
```

### Product

A Product instance represents one of the perpetual products we offer to trade. You can initialize the Product class in two ways: by index or by name. The Product instance can be used for various functions, such as getting the L2 and L3 orderbooks, and subscribing to the orderbook.

**Constructor**

```javascript
const product = new Product(perp);
```

| Parameters    | Desription                                                               |
| ------------- | ------------------------------------------------------------------------ |
| `perp` (Perp) | An instance of the Perp class representing the perpetual futures market. |

#### Methods

**initByIndex(index)**

Initializes the product by its index within the market.

```javascript
product.initByIndex(0);
```

| Parameters       | Description                                 |
| ---------------- | ------------------------------------------- |
| `index` (number) | The index of the product within the market. |

**Returns:** `void`

**getOrderbookL2()**

Retrieves the Level 2 order book for the product.

```javascript
const orderbook = await product.getOrderbookL2();
```

**Returns:** `Promise<Ordrbook>` - An object representing the Level 2 order book.

**getOrderbookL3()**

Retrieves the Level 3 order book for the product.

```javascript
const orderbook = await product.getOrderbookL3();
```

**Returns:** `Promise<Ordrbook>` - An object representing the Level 3 order book.

#### Initializing Product by Index:

```javascript
const perp = new Perp(connection, 'mainnet', wallet);
await perp.init();
const product = new Product(perp);
product.initByIndex(0);
```

#### Initializing Product by Name:

```javascript
const perp = new Perp(connection, 'mainnet', wallet);
await perp.init();
const product = new Product(perp);
product.initByName('SOL-PERP');
```

### Product Function Examples:

**1. Get L2 Orderbook**

```javascript
const orderbook = await product.getOrderbookL2();
```

**2. Get L3 Orderbook**

```javascript
const orderbook = await product.getOrderbookL3();
```

**3. Subscribe to Orderbook**

Subscribe to the orderbook account and listen to changes. Pass your function as the parameter to the `subscribeToOrderbook` function to handle orderbook changes. Don't forget to unsubscribe when it's no longer needed!

```javascript
async function handleAccountChange(){
    const res = await product.getOrderbookL2();
    console.log("Updated orderbook: ", res);
  }
  const subscribeId = product.subscribeToOrderbook(handleAccountChange);
  connection.removeAccountChangeListener(subscribeId); //To close the subscription
```

### Trader

The Trader class is necessary for obtaining instructions to send transactions to the program. Each wallet must have a unique trader account initialized to place orders and deposit funds. Create the trader account once using the `createTraderAccountIxs` instruction. After that, initialize the Trader class using the `init` function for all subsequent wallet interactions.

**Constructor**

```javascript
const trader = new Trader(perp);
```

| Parameters    | Description                                                   |
| ------------- | ------------------------------------------------------------- |
| `perp` (Perp) | An instance of the `Perp` class representing the perp market. |

#### Methods

**createTraderAccountIxs()**

Creates the transaction instructions and signers required to initialize a new trader account.

```javascript
const [ixs, signers] = await trader.createTraderAccountIxs();
```

**Returns:** `Promise<[TransactionInstruction[], Keypair[]]>` - An array containing the transaction instructions and signers.

**depositFundsIx(fractional)**

Creates a transaction instruction for depositing funds into the trader's account.

```javascript
const ix = await trader.depositFundsIx(fractional);
```

| Parameters                | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `fractional` (Fractional) | An object representing the amount to be deposited. |

**Returns:** `Promise<[TransactionInstruction>` - The transaction instruction for depositing funds.

**withdrawFundsIx(fractional)**

Creates a transaction instruction for withdrawing funds from the trader's account.

```javascript
const ix = await trader.withdrawFundsIx(fractional);
```

| Parameters                | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `fractional` (Fractional) | An object representing the amount to be withdrawn. |

**Returns:** `Promise<[TransactionInstruction>` - The transaction instruction for withdrawing funds.

**newOrderIx(size, price, side, type, product, ttl)**

Creates a transaction instruction for placing a new order.

{% code overflow="wrap" %}

```javascript
const ix = await trader.newOrderIx(size, price, side, type, product, ttl);
```

{% endcode %}

| Parameters           | Description                                                                              |
| -------------------- | ---------------------------------------------------------------------------------------- |
| `size` (Fractional)  | An object representing the size of the order                                             |
| `price` (Fractional) | An object representing the price of the order.                                           |
| `side` (string)      | The side of the order, either 'buy' or 'sell'.                                           |
| `type` (string)      | The type of the order, such as 'limit' or 'market'.                                      |
| `product` (Product)  | An instance of the Product class representing the product for which the order is placed. |
| `ttl` (number)       | Time to live for the order.                                                              |

**Returns:** `Promise<[TransactionInstruction>` - The transaction instruction for placing a new order.

**cancelOrderIx(orderId, product)**

Creates a transaction instruction for canceling an existing order.

```javascript
const ix = await trader.cancelOrderIx(orderId, product);
```

| Parameters          | Description                                                                          |
| ------------------- | ------------------------------------------------------------------------------------ |
| orderId (string)    | The ID of the order to be canceled.                                                  |
| `product` (Product) | n instance of the Product class representing the product for which the order exists. |

**Returns:** `Promise<[TransactionInstruction>` - The transaction instruction for canceling the order.

**getOpenOrders(product)**

Retrieves the open orders for the trader within a specific product.

```javascript
const orderbookData = await trader.getOpenOrders(product);
```

| Parameters          | Description                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------------- |
| `product` (Product) | An instance of the Product class representing the product for which open orders are retrieved. |

**Returns:** `Promise<OrderbookData>` - An object representing the open orders data.

| Properties          | Description                                     |
| ------------------- | ----------------------------------------------- |
| `perp`              | The `Perp` instance associated with the trader. |
| `totalDeposited`    | The total amount deposited by the trader.       |
| `totalWithdrawn`    | The total amount withdrawn by the trader.       |
| `marginAvailable`   | The available margin for trading.               |
| `totalTradedVolume` | The total volume traded by the trader.          |
| `traderPositions`   | The active positions held by the trader.        |

#### Creating a New Trader Account On-Chain:

```javascript
  const perp = new Perp(connection, 'mainnet', wallet);
  await perp.init();
  const trader = new Trader(perp);
  const [ixs, signers] = await trader.createTraderAccountIxs();
```

In this example, `ixs` is an array of required instructions and `signers` is an array of required keypairs for signature. The wallet must also sign the transaction along with the keypairs in the `signers` array.

#### Initializing a Trader Instance

Once you successfully create an account, initialize the Trader instance as follows:

### Fractional Data Type

The Fractional data type represents a fractional number based on its mantissa (m) and exponent (exp) using this formula: `number = mantissa / (10 ^ exponent)`.

### Trader Instructions

#### Depositing Funds

To place new orders, traders need to deposit collateral. This instruction transfers the required USDC from the wallet to the trader account, which will be used as collateral to place new orders.

The only parameter for this function is the amount of USDC to deposit:

```javascript
  const perp = new Perp(connection, 'mainnet', wallet);
  await perp.init();
  const trader = new Trader(perp);
  await trader.init();
  const ix = await trader.depositFundsIx(new Fractional({
    m: new BN(1),
    exp: new BN(0)
  }));
```

#### Withdrawing Funds

Similar to depositing funds, this function takes the amount of USDC to be withdrawn as the only parameter. This instruction transfers funds from the trader account to the wallet address:

```javascript
  const perp = new Perp(connection, 'mainnet', wallet);
  await perp.init();
  const trader = new Trader(perp);
  await trader.init();
  const ix = await trader.withdrawFundsIx(new Fractional({
    m: new BN(1),
    exp: new BN(0)
  }));java
```

**Note**: The deposit and withdraw instructions do not require a `product` instance as a parameter, as the market is cross collateralized and the amount of USDC deposited can be used across products. The following instructions, placing a new order and canceling an order, are specific to products and need a `product` instance as one of the parameters.

#### Getting Trader's Open Orders for a Product

To get all open orders for a `Trader` for a `product`:

```javascript
  const perp = new Perp(connection, 'mainnet', wallet);
  await perp.init();
  const product = new Product(perp);
  product.initByIndex(0);
  const trader = new Trader(perp);
  await trader.init();
  const orderbookData = await trader.getOpenOrders(product);
  console.log("orderbook: ", orderbookData);
```

#### Placing a New Order

The new order instruction requires the following parameters:

* Quantity (Fractional): *1 unit of the product is denoted by 1 \* 100,000 units. To buy 1 unit, pass the following parameter as quantity:*

```javascript
  new Fractional({
    m: new BN(100000),
    exp: new BN(0)
  })
```

* Price (Fractional)
* Order side ('buy' or 'sell')
* Order Type ('limit', 'market', 'immediateOrCancel', 'postOnly')
* Product instance

**Here's an example of placing a new order:**

```javascript
  const perp = new Perp(connection, "mainnet", wallet);
  await perp.init();
  const product = new Product(perp);
  product.initByIndex(0);
  const trader = new Trader(perp);
  await trader.init();
  const ix = await trader.newOrderIx(
    new Fractional({
      m: new BN(10000), //Implies 0.1 units
      exp: new BN(0),
    }),
    new Fractional({
      m: new BN(2245), //Price 22.45$
      exp: new BN(2),
    }),
    "buy",
    "limit",
    product
  );
```

#### Canceling an Order

The cancel order instruction requires the `orderId` in string format. Use `getOpenOrders()` to get open orders and their IDs to pass as a parameter to cancel the order:

```javascript
const perp = new Perp(connection, "mainnet", wallet);
  await perp.init();
  const product = new Product(perp);
  product.initByIndex(0);
  const trader = new Trader(perp);
  await trader.init();
  const ix = await trader.cancelOrderIx("7922816251444880503428103912726", product);
```

#### ***Checkout*** [***https://github.com/GooseFX1/gfx-perp-ts-sdk/blob/main/test/index.test.js***](https://github.com/GooseFX1/gfx-perp-ts-sdk/blob/main/test/index.test.js) ***for examples on the above functionalities!***


# Python SDK

Python SDK: <https://pypi.org/project/gfx-perp-sdk/>\
\
This SDK contains 3 classes to interact with the GooseFX on-chain perpetual futures.

* `Perp`
* `Product`
* `Trader`

### Perp

The `Perp` class is required to initialize the connection and wallet that is going to be used for subsequent interaction.&#x20;

**Constructor**

{% code overflow="wrap" %}

```python
perp = Perp(connection, network_type, wallet, mpg=None, mpgBytes=None)
```

{% endcode %}

| Parameters                           | Description                                                                                                 |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `connection` (Client)                | An instance of the `Client` class from `solana.rpc.api` to communicate with the Solana blockchain.          |
| `network_type` (NETWORK\_TYPE)       | An enum value indicating the network type (either `NETWORK_TYPE.mainnet` or `NETWORK_TYPE.devnet`).         |
| `wallet` (Keypair)                   | An instance of the `Keypair` class representing the user's wallet.                                          |
| `mpg` (MarketProductGroup, optional) | Optional. An instance of the `MarketProductGroup` class for initializing the market product group directly. |
| `mpgBytes` (bytes, optional)         | Optional. Raw bytes data for the market product group.                                                      |

**Methods**

**init()**

Initializes the Perp instance by setting up the market product group and related data.

```python
perp.init()
```

Returns: `None` (Can raise exceptions for error handling)

**place\_order(product, order\_type, trade\_side, size, price)**

Places an order in the perpetual market.

{% code overflow="wrap" %}

```python
perp.place_order(product, order_type, trade_side, size, price)
```

{% endcode %}

| Parameters               | Description                                                      |
| ------------------------ | ---------------------------------------------------------------- |
| `product` (Product)      | The product instance for which the order is being placed.        |
| `order_type` (OrderType) | The type of order (e.g., `OrderType.limit`, `OrderType.market`). |
| `trade_side` (TradeSide) | The side of the trade (`TradeSide.buy` or `TradeSide.sell`).     |
| `size` (int)             | The size of the order.                                           |
| `price` (float)          | The price at which the order is to be executed.                  |

Returns: `None` (Implementation-dependent, can return order details or raise exceptions)

| Properties           | Description                                                                        |
| -------------------- | ---------------------------------------------------------------------------------- |
| `marketProductGroup` | A `MarketProductGroup` instance containing market product group details.           |
| `mpgBytes`           | Raw bytes data representing the market product group.                              |
| `connection`         | The `Client` instance for Solana network communication.                            |
| `wallet`             | The `Keypair` instance representing the user's wallet.                             |
| `networkType`        | The network type (`NETWORK_TYPE.mainnet` or `NETWORK_TYPE.devnet`).                |
| `ADDRESSES`          | A `ConstantIDs` instance containing various constant IDs for the perpetual market. |

Initializing the `Perp` class should be the first step irrespective of the type of operation in the following manner:

```python
perp = Perp(rpc_client, 'devnet', wallet)
perp.init()
```

### Product

An instance of the `product` class signifies one of the perp product we offer to trade.&#x20;

**Constructor**

{% code overflow="wrap" %}

```python
product = Product(name, PRODUCT_ID, ORDERBOOK_ID, BIDS, ASKS, EVENT_QUEUE, tick_size, decimals)
```

{% endcode %}

| Parameters                 | Description                                                                                  |
| -------------------------- | -------------------------------------------------------------------------------------------- |
| `name` (str)               | A string representing the name of the product.                                               |
| `PRODUCT_ID` (PublicKey)   | An instance of the `PublicKey` class representing the unique identifier for the product.     |
| `ORDERBOOK_ID` (PublicKey) | An instance of the `PublicKey` class representing the order book identifier for the product. |
| `BIDS` (PublicKey)         | An instance of the `PublicKey` class representing the bids in the order book.                |
| `ASKS` (PublicKey)         | An instance of the `PublicKey` class representing the asks in the order book.                |
| `EVENT_QUEUE` (PublicKey)  | An instance of the `PublicKey` class representing the event queue for the product.           |
| `tick_size` (int)          | An integer specifying the minimum price movement of the product.                             |
| `decimals` (int)           | An integer indicating the decimal precision of the product prices.                           |

**Methods**

The Product class primarily serves as a data structure and does not contain specific methods for operations.

| Properties     | Description                                     |
| -------------- | ----------------------------------------------- |
| `name`         | The name of the product.                        |
| `PRODUCT_ID`   | The unique identifier for the product.          |
| `ORDERBOOK_ID` | The identifier for the product's order book.    |
| `BIDS`         | The `PublicKey` for bids in the order book.     |
| `ASKS`         | The `PublicKey` for asks in the order book.     |
| `EVENT_QUEUE`  | The `PublicKey` for the product's event queue.  |
| `tick_size`    | The minimum price movement for the product.     |
| `decimals`     | The decimal precision for the product's prices. |

Initialization of the `product` class can be done in one of two ways:

1. By index:

```python
perp = Perp(rpc_client, 'devnet', wallet)
perp.init()
product = Product(perp)
product.initByIndex(0)
```

2. By name:

```python
perp = Perp(rpc_client, 'devnet', wallet)
perp.init()
product = Product(perp)
product.initByName('SOL-PERP')
```

This `product` instance will be useful for the following functions:

* `GET L2 Orderbook`: Get the latest layer 2 orderbook

```python
orderbook = product.get_orderbook_L2()
```

* `GET L3 Orderbook`: Get the latest layer 3 orderbook. (Orders mapped to users)

```python
orderbook = product.get_orderbook_L3()
```

### Trader

The `Trader` class is required to get instructions to send transactions to the program. Each wallet must have a unique trader account initialized to be able to place orders and deposit funds. This account needs to be created once using the `create_trader_account_ixs` instruction. After it has been created once, for all subsequent interactions by the wallet, the `Trader` class needs to be initialized using the `init` function.

**Constructor**

{% code overflow="wrap" %}

```python
trader = Trader(connection, network_type, wallet, product, order_type, trade_side, size, price)
```

{% endcode %}

| Parameters                     | Description                                                                                              |
| ------------------------------ | -------------------------------------------------------------------------------------------------------- |
| `connection` (Client)          | An instance of the `Client` class from `solana.rpc.api`, used to communicate with the Solana blockchain. |
| `network_type` (NETWORK\_TYPE) | An enum value representing the network type (either `NETWORK_TYPE.mainnet` or `NETWORK_TYPE.devnet`).    |
| `wallet` (Keypair)             | An instance of the `Keypair` class from `solders.keypair`, representing the user's wallet.               |
| `product` (Product)            | An instance of the `Product` class, representing the trading product.                                    |
| `order_type` (OrderType)       | An enum value representing the type of order (e.g., `OrderType.limit`, `OrderType.market`).              |
| `trade_side` (TradeSide)       | An enum value representing the side of the trade (`TradeSide.buy` or `TradeSide.sell`).                  |
| `size` (int)                   | An integer specifying the size of the order.                                                             |
| `price` (float)                | A float specifying the price at which the order is to be executed.                                       |

**Methods**

**place\_order()**

Places an order in the market.

```python
trader.place_order()
```

Returns: Varies depending on implementation, typically order details or confirmation.

**cancel\_order(order\_id)**

```python
trader.cancel_order(order_id)
```

| Parameters       | Description                          |
| ---------------- | ------------------------------------ |
| `order_id` (str) | The ID of the order to be cancelled. |

Returns: Varies depending on implementation, typically cancellation confirmation.

**update\_order(order\_id, new\_size, new\_price)**

Updates an existing order.

```python
trader.update_order(order_id, new_size, new_price)
```

| Parameters          | Description                        |
| ------------------- | ---------------------------------- |
| `order_id` (str)    | The ID of the order to be updated. |
| `new_size` (int)    | The new size of the order.         |
| `new_price` (float) | The new price of the order.        |

Returns: aries depending on implementation, typically update confirmation.

| Properties              | Description                                                         |
| ----------------------- | ------------------------------------------------------------------- |
| `wallet`                | The user's `Keypair` wallet instance.                               |
| `connection`            | The `Client` instance for communication with the Solana network.    |
| `networkType` (Keypair) | The network type (`NETWORK_TYPE.mainnet` or `NETWORK_TYPE.devnet`). |
| `product`               | The `Product` instance for the trading operations.                  |
| `orderType`             | The type of order to be placed.                                     |
| `tradeSide`             | The side of the trade (buy or sell).                                |
| `size`                  | The size of the trade order.                                        |
| `price`                 | The price at which the trade order will be executed.                |

* To create a new `Trader` account on-chain:

```python
  perp = Perp(rpc_client, 'devnet', wallet)
  perp.init()
  trader = Trader(perp)
  [ixs, signers] = trader.create_trader_account_ixs()
```

where `ixs` is an array of required instructions and `signers` is an array of required wallet pairs for signature. The wallet must also sign the transaction along with the wallet pairs in the `signers` array

* Once the account is created successfully, the `Trader` instance must be initialized in the following way:

```
  perp = Perp(rpc_client, 'devnet', wallet)
  perp.init()
  trader = Trader(perp)
  trader.init()
```

### Fractional Datatype

The Fractional data type uses a simple formula to represent a fractional number based on its mantissa (m) and exponent (exp): `number = mantissa / (10 ^ exponent)`

### Trader Instructions

#### Deposit Funds

To start placing new orders, traders need to deposit some collateral. This instruction will transfer the required USDC from the wallet to the trader account which will be used as collateral to place new orders.

The only parameter to this function is the amount of USDC to be deposited.

```
  perp = Perp(rpc_client, 'devnet', wallet)
  perp.init()
  trader = Trader(perp) 
  trader.init()
  [ix, signers] = trader.deposit_funds_ix(Fractional.to_decimal(100))
```

#### Withdraw Funds

Similar to deposit funds, this function takes the amount of USDC to be withdrawn as the only parameter. This instruction will transfer funds from the trader account to the wallet address.

```
  perp = Perp(rpc_client, 'devnet', wallet)
  perp.init()
  trader = Trader(perp) 
  trader.init()
  [ix, signers] = await trader.withdraw_funds_ix(Fractional.to_decimal(100))
```

NOTE: The above two instructions do not need a `product` instance as a parameter since the market is cross-collateralized and the amount of USDC deposited can be used across products. The following two instructions to place a new order and cancel an order are specific to products and hence need a `product` instance as one of the parameters.

#### Trader's open orders for a product

To get all open orders for a `Trader` for a `product`:

```
  perp = Perp(rpc_client, 'devnet', wallet)
  perp.init()
  product = Product(perp)
  product.initByIndex(0)
  trader = Trader(perp) 
  trader.init()
  orderbookData = trader.getOpenOrders(product)
```

#### New Order

The New order instruction needs the following as parameters

* Quantity (Fractional) **Please note: 1 unit of the product is denoted by 1 \* 100000 units. So to buy 1 unit, the parameter to pass as quantity should be**

```
  Fractional.to_decimal(100000)
```

* Price (Fractional)
* Order side ('buy' or 'sell')
* Order Type ('limit', 'market', 'immediateOrCancel', 'postOnly')
* Product instance

```
  perp = Perp(rpc_client, 'devnet',wallet)
  perp.init()
  product = Product(perp)
  product.initByIndex(0)
  trader = Trader(perp) 
  trader.init()
  [ix, signers] = trader.new_order_ix(product, Fractional.to_decimal(50000), Fractional.to_decimal(35), 'ask', 'limit')
```

#### Cancel Order

The cancel order instruction needs the orderId in string format to cancel the order. Use `getOpenOrders()` to get open orders and its id's to pass as a parameter to cancel the order

```
  perp = Perp(rpc_client, 'devnet',wallet)
  perp.init()
  product = Product(perp)
  product.initByIndex(0)
  trader = Trader(perp) 
  trader.init()
  [ix, signers] = trader.cancel_order_ix(product, 269375752548498747818049433352371) # Get this order id from t.get_open_orders()
```

#### Get All Trader Risk Group Accounts

`get_all_trg_accounts()` will fetch all the trader accounts in your wallet

#### Withdraw Funds for Trader Risk Group

`withdraw_funds_ix_for_trg()` will withdraw funds from specific trg(trader) account

#### Close Trader Risk Group

`close_trader_risk_group_ix_for_trg()` will close a specific trg(trader) account (ideally it can be done after withdrawing funds)

#### Get Cash Balance

`get_cash_balance()` will fetch available balances of the main trader account.

#### Get Cash Balance for Trader Risk Group

`get_cash_balance_for_trg()` will fetch available balance of specific trader account

#### Get Deposited Amount

`get_deposited_amount()` will fetch available deposited amounts

#### Get Withdrawn Amount

`get_withdrawn_amount()` will fetch available withdrawn amounts

#### Get Trader Positions by Product Index

`get_trader_positions_by_product_index()` will get all trader positions by product index

#### Get Trader Positions by Product Name

`get_trader_positions_by_product_name()` will get all trader positions by product name

#### Get Trader Positions by Trader Risk Group

`get_trader_positions_for_trg()` will get all trader positions for the Trader Risk Group

Checkout <https://github.com/GooseFX1/gfx-perps-python-sdk/blob/dev/test_perp.py> for examples on the above functionalities! Happy trading!


