# Polynomial

Welcome to Polynomial - the next-generation decentralized trading platform built on Polynomial Chain.

## What is Polynomial?

Polynomial Trade is a gasless, hybrid orderbook exchange for perpetual contracts with native cross-margin capabilities.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FIpJtYS6NVjBESzaxhzPD%2FPolynomial%20Trade.png?alt=media&#x26;token=b0447e36-274f-4595-ac15-5ed7f1e49bbe" alt=""><figcaption></figcaption></figure>

**Key Benefits:**

* **Gasless Trading** - No gas fees on Polynomial Chain
* **Hybrid Orderbook** - Combines CLOB and AMM for optimal execution
* **Cross-Margin** - Use shared collateral across all positions
* **Ultra-Fast** - 200ms latency with Pyth Lazer integration

## Quick Start

### Getting Started

1. [**Wallet Setup Guide**](/how-to-guides/wallet-setup) - Connect and configure your wallet
2. [**Complete Trading Guide**](/how-to-guides/trading) - Learn to trade step-by-step
3. [**Complete Staking Guide**](/how-to-guides/staking) - Learn to stake and earn rewards

## Documentation Structure

Our documentation follows the Diátaxis Framework for optimal user experience:

### 🛠️ [How-to Guides](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/README.md) - Solve problems

**Purpose**: Task-oriented guides for specific problems

* [**Wallet Setup Guide**](/how-to-guides/wallet-setup) - Connect and configure your wallet
* [**Complete Trading Guide**](/how-to-guides/trading) - All trading operations in one place
* [**Complete Staking Guide**](/how-to-guides/staking) - All staking operations in one place
* [**Chain Operations Guide**](/how-to-guides/chain) - Bridge assets, configure RPC
* [**Advanced Features Guide**](/how-to-guides/advanced) - Keepers, arbitrage, API integration

### 📖 [Reference](https://github.com/Polynomial-Protocol/gitbook/blob/master/reference/README.md) - Technical details

**Purpose**: Factual information for quick lookup

* [**Trading API**](/reference/trading-api) - API documentation and endpoints
* [**Contract Addresses**](/reference/contract-addresses) - Smart contract addresses
* [**Trading Fees**](/reference/trading-fees) - Fee structure and calculations
* [**Audit Reports**](/reference/audit-reports) - Security audit documentation
* [**Network Configuration**](/reference/network-config) - Network settings and RPC

### 💡 [Explanations](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/README.md) - Understand concepts

**Purpose**: Deep understanding of how things work

* [**Polynomial Chain**](/explanations/polynomial-chain) - Understanding the blockchain
* [**Cross-Margin Trading**](/explanations/cross-margin) - Margin management concepts
* [**Liquidity Layer**](/explanations/liquidity-layer) - How liquidity works
* [**Hybrid Orderbook**](/explanations/hybrid-orderbook) - Trading mechanism explained
* [**Debt Mechanism**](/explanations/debt-mechanism) - Risk management system

### 🆘 [Support](https://github.com/Polynomial-Protocol/gitbook/blob/master/support/README.md) - Get help

**Purpose**: Problem-solving and community resources

* [**FAQ**](/support/faq) - Common questions and answers
* [**Troubleshooting**](/support/troubleshooting) - Fix common issues
* [**Community**](/support/community) - Join our community
* [**Contact Support**](/support/contact) - Get direct help

## Popular Topics

* [Understanding Cross-Margin](/explanations/cross-margin)
* [Staking Points System](/explanations/staking-points)
* [Hybrid Orderbook System](/explanations/hybrid-orderbook)
* [Missions System](/explanations/missions-system)
* [Debt Mechanism](/explanations/debt-mechanism)
* [TradingView Webhooks](/explanations/tradingview-webhooks)
* [Audit Reports](/reference/audit-reports)

## Need Help?

* Check our [FAQ](/support/faq) for quick answers
* Join our [Community](/support/community) for discussions
* [Contact Support](/support/contact) for direct help


# Wallet Setup Guide

This guide will walk you through setting up your wallet for Polynomial, including connecting your existing wallet and understanding how polynomial wallets work for enhanced functionality.

## Connect Your Wallet

1. Go to [Polynomial Trade](https://trade.polynomial.fi)
2. Click "Connect Wallet"
3. Select your wallet (MetaMask, WalletConnect, etc.)
4. Approve the connection

Your wallet will automatically switch to Polynomial Chain.

## Fund Your Account

**Important:** Only use Polynomial's official bridge.

1. Click "Deposit" in the interface
2. Select your source chain (Ethereum, Arbitrum, Optimism, Base)
3. Choose your asset (USDC, sDAI, sUSDe, WETH)
4. Enter the amount to bridge
5. Confirm the transaction

Bridge takes 10-15 seconds to complete.

## What Happens Next

* A Polynomial wallet is automatically created when you first deposit
* You get gasless transactions and one-click trading
* Your original wallet keeps control and signing authority

## Next Steps

* [**Your First Trade**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/first-trade.md) - Start trading
* [**Your First Stake**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/first-stake.md) - Begin staking

## Need Help?

* [FAQ](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/faq.md) - Common questions
* [Community](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/community.md) - Join Discord
* [Support](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/contact.md) - Get help


# Complete Trading Guide

This comprehensive guide covers all aspects of trading on Polynomial Trade, from basic position management to advanced risk management techniques.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FIpJtYS6NVjBESzaxhzPD%2FPolynomial%20Trade.png?alt=media&#x26;token=b0447e36-274f-4595-ac15-5ed7f1e49bbe" alt=""><figcaption></figcaption></figure>

## Table of Contents

1. [Opening and Closing Positions](#opening-and-closing-positions)
2. [Order Types and Execution](#order-types-and-execution)
3. [Risk Management](#risk-management)
4. [Leverage Management](#leverage-management)
5. [Cross-Margin Trading](#cross-margin-trading)
6. [Avoiding Liquidation](#avoiding-liquidation)
7. [VIP Program](#vip-program)
8. [Trading Referral Program](#trading-referral-program)

***

## Opening and Closing Positions

### Prerequisites

* Connected wallet with USDC deposited
* Understanding of trading basics
* Basic knowledge of position types

### Opening Positions

#### **Step 1: Choose a Market**

1. Go to [Polynomial Trade](https://trade.polynomial.fi)
2. Select a market from the list (e.g., BTC-PERP, ETH-PERP)
3. Review market information:
   * Current price
   * 24h change
   * Volume
   * Open interest

#### **Step 2: Select Position Type**

**Long Position (Bullish)**

* **When to Use:** Expecting price to rise
* **How it Works:** Buy low, sell high
* **Risk:** Limited to your margin
* **Reward:** Unlimited upside potential

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2Fg0GjHXfUGMS5yz2BfDxR%2FScreenshot%202024-08-21%20at%204.27.27%E2%80%AFAM.png?alt=media&#x26;token=5331ffca-dadd-4783-8c68-c43ce541d95a" alt=""><figcaption></figcaption></figure>

**Short Position (Bearish)**

* **When to Use:** Expecting price to fall
* **How it Works:** Sell high, buy low
* **Risk:** Limited to your margin
* **Reward:** Profit from price decline

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2F75ef1Wu2kcEP9ElkGMbL%2FScreenshot%202024-08-21%20at%204.30.43%E2%80%AFAM.png?alt=media&#x26;token=f3b92af6-95cb-4af2-975d-8f5767f1c242" alt=""><figcaption></figcaption></figure>

#### **Step 3: Set Position Parameters**

**Position Size**

* Enter the amount of USDC you want to use as margin
* This is your collateral, not your total position size
* Start small for beginners ($10-50)

**Leverage**

* Choose your leverage multiplier (1x to 50x)
* **Beginners:** Start with 1x-3x leverage
* **Higher leverage:** Higher risk and potential reward
* **Maximum:** 50x leverage available

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2Fm1o9lfmw1rvhAS9srTUi%2FScreenshot%202024-08-21%20at%204.39.38%E2%80%AFAM.png?alt=media&#x26;token=ed782591-268f-40b7-be25-799023f38a66" alt=""><figcaption></figcaption></figure>

**Order Type**

* **Market Order:** Executes immediately at current price
* **Limit Order:** Executes only at your specified price
* **TP/SL Order:** Includes take-profit and stop-loss

#### **Step 4: Review and Execute**

1. Review all position details:
   * Market and direction
   * Position size and leverage
   * Fees and keeper deposit
   * Liquidation price
2. Click "Long" or "Short" to execute
3. Confirm the transaction in your wallet

### Managing Open Positions

#### **Position Overview**

After opening a position, you can view:

* **Entry Price:** Price at which you entered
* **Current Price:** Current market price
* **Position Size:** Size of your position
* **Unrealized P\&L:** Current profit/loss
* **Liquidation Price:** Price at which you'll be liquidated

#### **Position Management Options**

**Add to Position**

1. Go to the Positions tab
2. Click on your existing position
3. Select "Add to Position"
4. Enter additional margin amount
5. Confirm the transaction

**Reduce Position**

1. Go to the Positions tab
2. Click on your position
3. Select "Reduce Position"
4. Enter the amount to reduce
5. Confirm the transaction

### Closing Positions

#### **Step 1: Access Your Position**

1. Go to the Positions tab
2. Find the position you want to close
3. Click on the position to view details

#### **Step 2: Choose Closing Method**

**Market Close**

* **Execution:** Immediate at current market price
* **Use Case:** Quick exit from position
* **Risk:** Price may move against you

**Limit Close**

* **Execution:** Only at your specified price
* **Use Case:** Better price execution
* **Risk:** May not execute if price doesn't reach target

#### **Step 3: Execute Close**

1. Select your closing method
2. Review the closing details:
   * Closing price
   * Realized P\&L
   * Fees
3. Click "Close Position"
4. Confirm the transaction

***

## Order Types and Execution

### Limit Orders

Limit orders allow you to specify the exact price at which you want your trade to be executed. Unlike market orders that execute immediately at the current price, limit orders only execute when the market reaches your specified price.

#### **Key Benefits**

* **Price Control:** Execute at your desired price
* **Better Execution:** Avoid slippage from market orders
* **Risk Management:** Set precise entry and exit points
* **Patience:** Wait for better prices without monitoring

#### **Types of Limit Orders**

**Buy Limit Orders**

* **Purpose:** Buy at a lower price than current market
* **Use Case:** Entering long positions on dips
* **Execution:** Only executes when price drops to your limit

**Sell Limit Orders**

* **Purpose:** Sell at a higher price than current market
* **Use Case:** Taking profits or entering short positions
* **Execution:** Only executes when price rises to your limit

#### **Setting Limit Orders**

**Step 1: Choose Your Market**

1. Go to [Polynomial Trade](https://trade.polynomial.fi)
2. Select the market you want to trade
3. Review current price and market conditions

**Step 2: Select Limit Order Type**

1. In the order panel, select "Limit" order type
2. Choose "Buy" or "Sell" based on your strategy
3. Set your position parameters

**Step 3: Set Order Parameters**

**Limit Price**

* Enter your desired execution price
* **Buy Limit:** Set below current market price
* **Sell Limit:** Set above current market price
* **Precision:** Use appropriate decimal places

**Position Size**

* Enter the amount of USDC for margin
* This determines your position size
* Consider your risk tolerance

**Leverage**

* Choose your leverage multiplier
* **Beginners:** Start with 1x-5x leverage
* **Advanced:** Use higher leverage with caution

**Step 4: Review and Place Order**

1. Review all order details:
   * Market and direction
   * Limit price
   * Position size and leverage
   * Fees and keeper deposit
2. Click "Place Order"
3. Confirm the transaction in your wallet

### Stop Market Orders

Stop market orders are conditional orders that convert to market orders when a specified stop price is reached. They're primarily used for risk management and breakout trading strategies.

#### **Key Characteristics**

* **Conditional Execution:** Only execute when stop price is hit
* **Market Execution:** Convert to market order when triggered
* **Price Protection:** Protect against adverse price movements
* **Breakout Trading:** Enter positions on price breakouts

#### **Types of Stop Market Orders**

**Stop-Loss Orders**

* **Purpose:** Limit losses on existing positions
* **Direction:** Opposite to your position direction
* **Use Case:** Risk management for open positions
* **Execution:** Triggers when price moves against you

**Stop-Entry Orders**

* **Purpose:** Enter positions on price breakouts
* **Direction:** Same as desired position direction
* **Use Case:** Breakout trading strategies
* **Execution:** Triggers when price breaks key levels

#### **Setting Stop Market Orders**

**Step 1: Choose Your Market**

1. Go to [Polynomial Trade](https://trade.polynomial.fi)
2. Select the market you want to trade
3. Review current price and market conditions
4. Identify key support/resistance levels

**Step 2: Select Stop Market Order**

1. In the order panel, select "Stop Market" order type
2. Choose "Buy" or "Sell" based on your strategy
3. Set your order parameters

**Step 3: Set Order Parameters**

**Stop Price**

* **For Stop-Loss:** Set below current price for longs, above for shorts
* **For Stop-Entry:** Set above current price for longs, below for shorts
* **Key Levels:** Use support/resistance levels
* **Buffer:** Add small buffer to avoid false triggers

**Position Size**

* Enter the amount of USDC for margin
* Consider your risk tolerance
* Account for potential slippage
* Plan for worst-case scenarios

**Leverage**

* Choose appropriate leverage
* **Beginners:** Start with 1x-5x leverage
* **Advanced:** Use higher leverage with caution
* **Risk Management:** Consider leverage impact on risk

**Step 4: Review and Place Order**

1. Review all order details:
   * Stop price and trigger conditions
   * Position size and leverage
   * Fees and execution details
   * Risk parameters
2. Click "Place Order"
3. Confirm the transaction in your wallet

### Take-Profit and Stop-Loss Orders

Take-profit and stop-loss orders are essential risk management tools that automatically close your positions at predetermined price levels.

#### **Take-Profit (TP) Orders**

* **Purpose:** Automatically close position at profit target
* **Use Case:** Secure profits without manual monitoring
* **Execution:** Closes position when price reaches target
* **Benefit:** Guarantees profit at desired level

#### **Stop-Loss (SL) Orders**

* **Purpose:** Automatically close position at loss limit
* **Use Case:** Limit downside risk
* **Execution:** Closes position when price hits stop level
* **Benefit:** Prevents large losses

#### **Setting TP/SL Orders**

**Step 1: Access Your Position**

1. Go to [Polynomial Trade](https://trade.polynomial.fi)
2. Navigate to the Positions tab
3. Find your open position
4. Click on the position to view details

**Step 2: Choose Order Type**

1. Select "TP/SL Order" from the order types
2. Choose your position direction (Long/Short)
3. Set your order parameters

**Step 3: Set Take-Profit Price**

**For Long Positions**

* Set TP price **above** your entry price
* **Example:** Entry at $50,000, TP at $55,000
* **Calculation:** Target profit = (TP - Entry) × Position Size

**For Short Positions**

* Set TP price **below** your entry price
* **Example:** Entry at $50,000, TP at $45,000
* **Calculation:** Target profit = (Entry - TP) × Position Size

**Step 4: Set Stop-Loss Price**

**For Long Positions**

* Set SL price **below** your entry price
* **Example:** Entry at $50,000, SL at $47,500
* **Calculation:** Maximum loss = (Entry - SL) × Position Size

**For Short Positions**

* Set SL price **above** your entry price
* **Example:** Entry at $50,000, SL at $52,500
* **Calculation:** Maximum loss = (SL - Entry) × Position Size

**Step 5: Review and Confirm**

1. Review all order details:
   * Take-profit price and potential profit
   * Stop-loss price and maximum loss
   * Risk-reward ratio
   * Fees and execution details
2. Click "Place Order"
3. Confirm the transaction in your wallet

***

## Risk Management

### Position Sizing

#### **Risk Per Trade**

* **Conservative:** Risk only 1-2% of account balance per trade
* **Maximum Position:** 10-20% of account balance
* **Diversification:** Don't put all capital in one position

#### **Risk-Reward Ratio**

* **1:2 Ratio:** Risk $1 to make $2
* **1:3 Ratio:** Risk $1 to make $3
* **Minimum:** Aim for at least 1:1.5 ratio
* **Calculation:** (TP - Entry) / (Entry - SL)

### Stop-Loss Strategies

#### **Fixed Stop-Loss**

* **Method:** Set stop at fixed percentage below entry
* **Example:** 5% stop-loss on long position
* **Advantages:** Simple and consistent
* **Disadvantages:** May not account for volatility

#### **Technical Stop-Loss**

* **Method:** Set stop at technical levels
* **Example:** Below support level for longs
* **Advantages:** Accounts for market structure
* **Disadvantages:** Requires technical analysis

#### **Trailing Stop-Loss**

* **Method:** Stop follows price in favorable direction
* **Example:** 3% trailing stop on profitable position
* **Advantages:** Locks in profits while allowing upside
* **Disadvantages:** May exit too early in trends

### Take-Profit Strategies

#### **Fixed Take-Profit**

* **Method:** Set profit target at fixed percentage
* **Example:** 10% take-profit on long position
* **Advantages:** Simple and consistent
* **Disadvantages:** May not capture full trend

#### **Technical Take-Profit**

* **Method:** Set profit target at technical levels
* **Example:** At resistance level for longs
* **Advantages:** Based on market structure
* **Disadvantages:** Requires technical analysis

#### **Partial Take-Profit**

* **Method:** Close portion of position at targets
* **Example:** Close 50% at first target, 50% at second
* **Advantages:** Reduces risk while maintaining exposure
* **Disadvantages:** More complex management

***

## Leverage Management

### What is Leverage?

Leverage allows you to control a larger position size with a smaller amount of capital. It amplifies both potential profits and losses, making it a powerful but risky tool.

#### **How Leverage Works**

* **Position Size:** Leverage multiplies your position size
* **Margin Requirement:** You only need a fraction of the position value as margin
* **Profit Amplification:** Profits are multiplied by leverage amount
* **Loss Amplification:** Losses are also multiplied by leverage amount

#### **Example**

* **Capital:** $1,000
* **Leverage:** 10x
* **Position Size:** $10,000
* **10% Price Move:** Results in 100% profit/loss on your capital

### Leverage Options on Polynomial

#### **Available Leverage**

* **Minimum:** 1x (no leverage)
* **Maximum:** 50x
* **Common Ranges:** 1x-5x (conservative), 5x-20x (moderate), 20x-50x (aggressive)
* **Adjustable:** Can be changed for each position

### Choosing Appropriate Leverage

#### **For Beginners (1x-5x)**

* **Risk Level:** Low to moderate
* **Learning Phase:** Good for learning the platform
* **Capital Preservation:** Focus on capital preservation
* **Gradual Increase:** Can increase as experience grows

#### **For Intermediate (5x-20x)**

* **Risk Level:** Moderate to high
* **Experience Required:** Need trading experience
* **Risk Management:** Must have good risk management
* **Market Knowledge:** Should understand market dynamics

#### **For Advanced (20x-50x)**

* **Risk Level:** Very high
* **Expert Level:** Only for experienced traders
* **Risk Management:** Must have excellent risk management
* **Market Timing:** Requires precise market timing

### Leverage Management Strategies

#### **Conservative Approach**

* **Low Leverage:** Use 1x-3x leverage
* **Capital Preservation:** Focus on preserving capital
* **Gradual Growth:** Aim for steady, consistent growth
* **Risk Control:** Maintain strict risk control

#### **Moderate Approach**

* **Medium Leverage:** Use 5x-15x leverage
* **Balanced Risk:** Balance risk and reward
* **Market Analysis:** Use technical and fundamental analysis
* **Position Sizing:** Size positions appropriately

#### **Aggressive Approach**

* **High Leverage:** Use 20x-50x leverage
* **High Risk/Reward:** Accept high risk for high reward
* **Expert Level:** Only for expert traders
* **Strict Management:** Requires strict risk management

***

## Cross-Margin Trading

### What is Cross Margin?

Cross-margin uses your entire account balance as collateral for all open positions, allowing you to maximize capital efficiency and manage risk across your entire portfolio.

#### **Key Benefits**

* **Capital Efficiency:** Use entire account balance as collateral
* **Risk Distribution:** Spread risk across all positions
* **Flexibility:** Easy to manage multiple positions
* **Lower Margin Requirements:** Reduced overall margin needs

#### **How It Works**

* **Unified Collateral:** All positions share the same margin pool
* **Dynamic Allocation:** Margin automatically adjusts based on position sizes
* **Real-time Updates:** Margin requirements update continuously
* **Portfolio View:** See all positions and their combined impact

### Setting Up Cross Margin

#### **Step 1: Access Trading Interface**

1. Go to [Polynomial Trade](https://trade.polynomial.fi)
2. Connect your wallet
3. Navigate to the trading interface
4. Verify cross-margin is enabled (default setting)

#### **Step 2: Understand Your Account**

1. **Total Equity:** View your total account balance
2. **Used Margin:** See margin currently in use
3. **Available Margin:** See margin available for new positions
4. **Margin Ratio:** Monitor your margin utilization

### Cross Margin Strategies

#### **Portfolio Diversification**

* **Multiple Markets:** Trade across different markets
* **Uncorrelated Positions:** Use uncorrelated positions
* **Risk Distribution:** Distribute risk across positions
* **Capital Efficiency:** Maximize capital efficiency

#### **Hedging Strategies**

* **Long/Short Pairs:** Hedge positions with opposite trades
* **Market Neutral:** Create market-neutral strategies
* **Risk Reduction:** Use hedging to reduce overall risk
* **Profit Optimization:** Optimize risk-adjusted returns

#### **Dynamic Rebalancing**

* **Performance Based:** Adjust based on position performance
* **Risk Based:** Rebalance based on risk metrics
* **Market Based:** Adjust based on market conditions
* **Systematic:** Use systematic rebalancing rules

***

## Avoiding Liquidation

### What is Liquidation?

Liquidation occurs when your margin balance falls below the required maintenance margin level. When this happens, your position is automatically closed to protect the system and other users.

#### **Liquidation Process**

* **Trigger:** Margin falls below maintenance level
* **Automatic:** Position is automatically closed
* **Partial Recovery:** Any remaining margin is returned
* **Fees:** Liquidation fees are charged

#### **Why Liquidation Happens**

* **Insufficient Margin:** Not enough margin to cover losses
* **High Leverage:** Using too much leverage
* **Market Volatility:** Adverse price movements
* **Poor Risk Management:** Lack of proper risk management

### Understanding Liquidation Risk

#### **Liquidation Price**

* **Calculation:** Based on your entry price, leverage, and margin
* **Monitoring:** Always know your liquidation price
* **Updates:** Liquidation price updates with position changes
* **Safety Buffer:** Maintain buffer above liquidation price

#### **Margin Requirements**

* **Initial Margin:** Required to open position
* **Maintenance Margin:** Required to keep position open
* **Margin Call:** Warning when margin is low
* **Liquidation:** Automatic closure when margin is insufficient

### Liquidation Prevention Strategies

#### **1. Proper Position Sizing**

* **Risk Per Trade:** Risk only 1-2% of account per trade
* **Account Protection:** Protect account from large losses
* **Leverage Consideration:** Consider leverage impact on position size
* **Diversification:** Don't concentrate risk in one position

#### **2. Appropriate Leverage**

* **Start Low:** Begin with low leverage (1x-5x)
* **Gradual Increase:** Increase leverage as experience grows
* **Risk Assessment:** Assess risk tolerance before using high leverage
* **Market Conditions:** Adjust leverage for market conditions

#### **3. Stop-Loss Orders**

* **Always Use Stops:** Never trade without stop-loss orders
* **Logical Placement:** Place stops at logical technical levels
* **Regular Review:** Review and adjust stops regularly
* **Trailing Stops:** Use trailing stops to lock in profits

#### **4. Margin Management**

* **Adequate Margin:** Keep sufficient margin in account
* **Margin Monitoring:** Monitor margin levels regularly
* **Additional Funds:** Have additional funds available
* **Emergency Plans:** Have plans for margin emergencies

### Emergency Procedures

#### **When Liquidation Risk is High**

1. **Assess Situation:** Quickly assess the situation
2. **Reduce Leverage:** Reduce leverage if possible
3. **Close Positions:** Close some positions to free margin
4. **Add Margin:** Add more margin to account
5. **Use Stops:** Ensure stop-loss orders are in place

#### **Margin Call Response**

1. **Immediate Action:** Take immediate action
2. **Add Funds:** Add funds to account if possible
3. **Reduce Risk:** Reduce risk by closing positions
4. **Emergency Plans:** Execute emergency plans
5. **Contact Support:** Contact support if needed

***

## VIP Program

The Polynomial VIP Program rewards our most dedicated traders with exceptional fee discounts. Based on your 30-day trading volume on Polynomial Trade, you can achieve VIP tiers with fees as low as 0/1.5 bps at the highest tier.

### How the VIP Program Works

Our VIP program is all about rewarding trading volume. With nine tiers ranging from **Normie** to **Whale**, each level comes with progressively lower fees. Here's how you can climb the ladder:

1. **Live tracking**: Your trading volume is tracked over a rolling 30-day period. The more you trade, the more you level up!
2. **Automatic Upgrades**: As soon as you hit the volume requirement for a new tier, you'll instantly unlock the corresponding fee discounts.
3. **Benefit from Lower Fees**: Fee reductions happen in real-time, giving you immediate access to savings as soon as you reach a new level.

### Polynomial VIP Levels and Fee Structure

The standard **Normie** trader pays the regular fees of 4 **bps for maker** and 6 **bps for taker** trades. But with our new VIP program, high-volume traders can enjoy significant savings. Whale traders, for instance, can trade at incredibly low fees, thanks to the benefits of the VIP tiers.

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

***

## Trading Referral Program

Polynomial's trading referral program rewards you for bringing new users to the platform. With a powerful 3-tier system, you earn not just from your direct invites - but also from their network.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FbJEqh6Z9xCiNzJyxLymH%2FReferral%20Tier%20Image.jpg?alt=media&#x26;token=fdcc0782-8eb4-47df-a9fe-4575e62771ca" alt=""><figcaption></figcaption></figure>

### Rewards Structure

| Tier | Referral Type          | Your Reward                                               |
| ---- | ---------------------- | --------------------------------------------------------- |
| L1   | **Direct referrals**   | **10%** of trading fees + **20%** of their Trading Points |
| L2   | **Indirect referrals** | **2%** of their trading fees                              |
| L3   | **Extended referrals** | **1%** of their trading fees                              |

#### **Key Benefits**

* 🔁 **Lifetime rewards** - Earn forever from your network
* 💎 **Trading Points sharing** - Earn 20% of L1 referrals' Trading Points
* 💰 **USDC payouts** - All rewards paid in USDC
* 🎁 **Trader discounts** - Referrals get up to 40% discount on trading fees
* 🚫 **No caps** - Unlimited earning potential

### How Rewards Work

**Example:** You invite **Alice**, who trades **$10,000,000** and pays **$5,000** in trading fees.

* **Alice (L1)** → You earn:
  * **$500** (10% of fees)
  * **20% of the Trading Points** she earns
* **Alice invites Bob**, who pays $5,000 in fees → You earn **$100** (2%)
* **Bob invites Charlie**, who pays $5,000 in fees → You earn **$50** (1%)

**Total earnings:** **$650 USDC + Trading Points**

### How to Get Started

#### **Step 1: Generate Your Referral Link**

1. Navigate to the **Referral Page** in your Polynomial Trade account
2. Copy your unique referral link
3. Note your referral code for easy sharing

#### **Step 2: Share the Link**

* **Social Media:** Share on Twitter, Discord, Telegram
* **Content Creation:** Include in articles, videos, blogs
* **Direct Sharing:** Send to friends and network
* **Community Engagement:** Share in relevant communities

**Note:** Traders who use your link get **up to 40% off on fees** when they sign up.

#### **Step 3: Track Referrals**

* See who signed up through your link
* Monitor their trading activity
* Track your total rewards
* View detailed analytics

4. **Watch the Video** 🎥 Quick walkthrough below 👇

{% embed url="<https://www.loom.com/share/a87e35df788c4b8fa3ef147d72eca963?sid=32377089-a3d6-409f-976f-8641e98bd14b>" %}

### Claiming Rewards

#### **Reward Distribution**

* **See total earnings** and **withdrawable amount** on the Referral page
* **USDC payouts** to your **Polynomial Wallet**
* **Minimum balance** of $10 required to withdraw
* **Daily updates** at 1 PM UTC - withdraw anytime

#### **Withdrawal Process**

1. Check your referral dashboard for available balance
2. Ensure you have minimum $10 balance
3. Click withdraw to transfer USDC to your wallet
4. Use bridge to move funds to other chains if needed

### Tips to Grow Your Referral Tree

#### **Content Strategy**

* **Educational content:** Create tutorials and guides
* **Success stories:** Share your trading success
* **Platform updates:** Keep community informed
* **Community engagement:** Be active in discussions

#### **Network Building**

* **Quality over quantity:** Focus on active traders
* **Support network:** Help referrals succeed
* **Encourage referrals:** Motivate your network to refer others
* **Community building:** Create value for your network

#### **Strategic Sharing**

* **Right communities:** Share in relevant trading communities
* **Timing:** Share during high-activity periods
* **Personal touch:** Personalize your approach
* **Value first:** Provide value before asking for referrals

### Terms & Conditions

* Referral rewards are based on **net trading fees paid**
* Payouts are made in **USDC**
* Polynomial reserves the right to update the program as needed
* All referrals must be new users to the platform
* Rewards are subject to platform terms and conditions

***

## Best Practices

### Before Opening Positions

* **Research:** Understand the market you're trading
* **Plan:** Have entry, exit, and risk management plan
* **Size:** Start with small position sizes
* **Leverage:** Use appropriate leverage for your experience

### While Managing Positions

* **Monitor:** Regularly check your positions
* **Adjust:** Modify stops and targets as needed
* **Emotions:** Don't let emotions drive decisions
* **Journal:** Keep track of your trades

### When Closing Positions

* **Stick to Plan:** Follow your original plan
* **Take Profits:** Don't be greedy
* **Cut Losses:** Don't let losses run
* **Learn:** Analyze your trades for improvement

## Common Mistakes to Avoid

1. **Over-leveraging:** Using too much leverage too soon
2. **No Stop-Loss:** Not setting risk management orders
3. **Emotional Trading:** Making decisions based on fear or greed
4. **Revenge Trading:** Trying to recover losses immediately
5. **Ignoring Fees:** Not accounting for trading and funding costs

## Troubleshooting

### Common Issues

#### **Position Not Opening**

* Check if you have sufficient margin
* Verify you're on the correct network
* Ensure you have enough gas for transactions
* Try again during lower traffic periods

#### **Position Not Closing**

* Check if you have sufficient balance for fees
* Verify the position is still open
* Ensure you're using the correct closing method
* Contact support if persistent issues

#### **Unexpected Liquidation**

* Review your liquidation price
* Check if you had sufficient margin
* Understand the liquidation process
* Learn from the experience

### Getting Help

* **FAQ:** Check [common questions](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/faq.md)
* **Community:** Join [Discord](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/community.md) for peer support
* **Support:** [Contact us](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/contact.md) for direct assistance

## Next Steps

After learning to trade:

1. [**Understanding Cross-Margin**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/cross-margin.md) - Learn margin management
2. [**Debt Mechanism**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/debt-mechanism.md) - Understand risk management
3. [**Advanced Trading Strategies**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/how-to/advanced.md) - Explore advanced techniques
4. [**API Documentation**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/reference/trading-api.md) - Access trading APIs

## Important Reminders

* **Start Small:** Begin with small position sizes
* **Use Stop-Losses:** Always set risk management orders
* **Monitor Positions:** Regularly check your open positions
* **Learn Continuously:** Improve your trading skills over time

***

*This comprehensive trading guide covers all essential aspects of trading on Polynomial. Master these fundamentals before moving on to advanced strategies and risk management techniques.*


# Complete Staking Guide

This comprehensive guide covers all aspects of staking on Polynomial, from depositing assets to earning rewards and managing your positions.

## Table of Contents

1. [Depositing Assets](#depositing-assets)
2. [Withdrawing Assets](#withdrawing-assets)
3. [Claiming Rewards](#claiming-rewards)
4. [Missions System](#missions-system)
5. [Staking Referral Program](#staking-referral-program)

***

## Depositing Assets

### Prerequisites

* Connected wallet with supported assets
* Understanding of staking basics
* Minimum deposit amount ($100)

### Supported Assets

#### **USDC**

* **Chains:** Ethereum, Arbitrum, Optimism, Base
* **Minimum:** $100
* **Best for:** Beginners, stable returns

#### **sDAI (Savings DAI)**

* **Chains:** Ethereum, Arbitrum, Optimism, Base
* **Minimum:** $100
* **Best for:** Higher yield potential

#### **sUSDe (Savings USDe)**

* **Chains:** Ethereum, Arbitrum, Optimism, Base
* **Minimum:** $100
* **Best for:** Maximum yield potential

### Step-by-Step Deposit Process

#### **Step 1: Access Staking Interface**

1. Go to [Polynomial Staking](https://polynomial.fi)
2. Connect your wallet
3. Navigate to the staking section
4. Select "Deposit"

#### **Step 2: Sign Terms of Service**

By signing, users agree to the [Terms of Service](https://www.polynomial.fi/terms-conditions) and [Privacy Policy](https://www.polynomial.fi/privacy-policy). This step is necessary to continue on Polynomial chain.

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2F7mo5ZuFp1E1VXWT0X9St%2FScreenshot%202024-06-13%20at%206.26.08%E2%80%AFPM.png?alt=media&#x26;token=17dfbd43-59a3-4cef-9696-a25577238553" alt=""><figcaption></figcaption></figure>

#### **Step 3: Choose Your Asset**

1. Select your preferred asset (USDC, sDAI, or sUSDe)
2. Choose your source chain (Ethereum, Arbitrum, Optimism, Base)
3. Verify you have sufficient balance

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2FI1aJe3bSKPT5NLpJK9gq%2FScreenshot%202024-06-13%20at%206.35.05%E2%80%AFPM.png?alt=media&#x26;token=8972e8c4-ef6b-4871-af57-e40c21d17eb0" alt=""><figcaption></figcaption></figure>

#### **Step 4: Enter Deposit Amount**

1. Enter the amount you want to deposit
2. Ensure it meets the minimum requirement ($100)
3. Review the estimated bridge time (10-15 seconds)
4. Check any applicable bridge fees

#### **Step 5: Bridge Assets**

If depositing from another chain:

1. **Bridge Process:** The system will bridge your assets
2. **Wait for Confirmation:** Wait for bridge confirmation (10-15 seconds)
3. **Verify Balance:** Check that your balance is updated

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2F8lRHIHuWmrkoBvtyFthG%2Fpoly%20doc%201.png?alt=media&#x26;token=b17e80dc-38f3-4455-b8bc-138fab79d0d1" alt=""><figcaption></figcaption></figure>

#### **Step 6: Review and Confirm**

1. Review all deposit details:
   * Asset and amount
   * Source and destination chains
   * Bridge fees and timing
   * Expected rewards
2. Confirm the transaction in your wallet
3. Wait for transaction confirmation

#### **Step 7: Verify Deposit**

1. Check that your deposit is reflected in your balance
2. Verify you're now earning points
3. Monitor your staking performance

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2FOOyMzHdxbMaCa4qtTvjQ%2FScreenshot%202024-06-13%20at%206.56.04%E2%80%AFPM.png?alt=media&#x26;token=b44ac750-9581-42b8-baab-f899932e55fb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2FwqnJQqzPdHEm6DPFqwHm%2FScreenshot%202024-06-13%20at%206.56.56%E2%80%AFPM.png?alt=media&#x26;token=a789cb41-0d63-4deb-a7aa-8fdde78234f1" alt=""><figcaption></figcaption></figure>

### Understanding Rewards

#### **Immediate Rewards**

* **Points:** Start earning points immediately
* **Fee Sharing:** Begin earning from trading fees
* **Boost Multipliers:** Early deposits get boost multipliers
* **Mission Bonuses:** Complete missions for bonus points

#### **Long-term Rewards**

* **Compounding:** Rewards compound over time
* **Network Effects:** Benefits from network growth
* **Token Rewards:** Potential future token rewards
* **Ecosystem Growth:** Benefits from ecosystem development

### Important Notes

* **Bridge Time:** Assets typically bridge within 10-15 seconds
* **Minimum Deposit:** $100 minimum for all assets
* **Points:** You start earning points immediately after deposit
* **Fees:** 50% of trading fees are distributed to stakers

***

## Withdrawing Assets

Withdrawing from the Liquidity layer is a two-step process: first, users must unstake their assets, then proceed to withdraw the funds, bridging them to the desired chain via the staking interface.

### Prerequisites

* Staked assets in Polynomial pools
* Understanding of debt mechanism
* 24-hour waiting period after unstaking

### Withdrawal Process

#### **Step 1: Unstake from Liquidity Layer**

You can unstake from the liquidity layer at any time by clearing your share of the debt. For more details on how debt works, check out our [debt guide](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/debt-mechanism.md).

To learn how to withdraw, follow our step-by-step tutorial 👇

{% embed url="<https://youtu.be/gSxwN2WgC3s>" %}

**Check Debt Status**

1. Navigate to the staking interface
2. Check your current debt share
3. If you have debt, you'll need to pay it off first
4. If no debt, proceed to unstake

**Pay Debt (If Required)**

1. **Bridge Additional Funds:** Debt must be bridged to Polynomial Chain
2. **Pay Debt:** Use additional funds to settle your share of debt
3. **Verify Payment:** Confirm debt is cleared
4. **Proceed to Unstake:** Once debt is paid, you can unstake

**Unstake Process**

1. Click "Unstake" in the staking interface
2. Enter the amount you want to unstake
3. Review the unstaking details
4. Confirm the transaction
5. Wait for transaction confirmation

#### **Step 2: 24-Hour Waiting Period**

Once you've unstaked, there's a **24-hour waiting period** before you can withdraw your funds. This lock applies to claiming the yield, and any new deposits will reset the timer.

**During the Waiting Period**

* **Check Timing:** Be sure to check the exact timing for when your funds will be available
* **Restake Option:** You can stake back into the pool at any time, even during the 24-hour window
* **Timer Reset:** Any new deposits will reset the timer

#### **Step 3: Withdraw and Bridge**

After the 24-hour lockup period, users can withdraw their funds from the liquidity layer and bridge them to their desired chain using the official bridge on the staking UI.

**Withdrawal Process**

1. **Check Availability:** Verify your funds are available for withdrawal
2. **Select Destination:** Choose the chain you want to bridge to
3. **Enter Amount:** Enter the amount you want to withdraw
4. **Review Details:** Check bridge fees and timing
5. **Confirm Transaction:** Approve the withdrawal transaction
6. **Wait for Bridge:** Wait for bridge completion (10-15 seconds)

**Bridge Options**

* **Ethereum Mainnet**
* **Arbitrum**
* **Optimism**
* **Base**

### Important Considerations

#### **Debt Requirements**

* **Debt Payment:** You must pay off any outstanding debt before unstaking
* **Additional Funds:** Debt won't reduce from your staked amount - you need additional funds
* **Bridge Required:** Debt must be paid with fresh funds bridged to Polynomial Chain

#### **Timing Considerations**

* **24-Hour Lock:** 24-hour waiting period after unstaking
* **Timer Reset:** New deposits reset the 24-hour timer
* **Bridge Time:** Additional 10-15 seconds for bridge completion

#### **Fee Considerations**

* **Bridge Fees:** Fees for bridging to other chains
* **Gas Fees:** Gas fees for transactions
* **Total Cost:** Factor in all fees when calculating withdrawal amounts

### Restaking During Unstaking Window

You can stake back into the pool at any time, even during the 24-hour window.

For detailed instructions, follow our step-by-step tutorial below 👇

{% embed url="<https://youtu.be/zc-BZ1O_dJQ>" %}

#### **Restaking Process**

1. **Navigate to Staking:** Go to the staking interface
2. **Select Amount:** Choose the amount you want to restake
3. **Confirm Transaction:** Approve the restaking transaction
4. **Timer Reset:** This will reset your 24-hour withdrawal timer

### Withdrawal Strategies

#### **Partial Withdrawal**

* **Flexible Amounts:** Withdraw only what you need
* **Maintain Position:** Keep some assets staked for continued rewards
* **Risk Management:** Reduce exposure while maintaining participation

#### **Full Withdrawal**

* **Complete Exit:** Withdraw all staked assets
* **No Ongoing Rewards:** Stop earning rewards from staking
* **Clean Slate:** Start fresh if needed

#### **Gradual Withdrawal**

* **Dollar-Cost Averaging:** Withdraw gradually over time
* **Market Timing:** Time withdrawals based on market conditions
* **Risk Reduction:** Reduce risk gradually

***

## Claiming Rewards

Yield is coming from the fees generated by the derivative apps on the ecosystem. Currently, our flagship product Polynomial trade gives 50% of fees back to the Liquidity layer, and 100% of those fees will be distributed to the stakers.

**To learn how to claim your yield, check out this tutorial 👇**

{% embed url="<https://youtu.be/RL6GOxDVg54>" %}

### Understanding Rewards

#### **Reward Sources**

* **Trading Fees:** 50% of all trading fees from Polynomial Trade
* **Protocol Fees:** Fees from other protocols built on Polynomial Chain
* **Ecosystem Growth:** Additional rewards as the ecosystem grows

#### **Reward Distribution**

* **100% to Stakers:** All fees are distributed to liquidity providers
* **Proportional:** Rewards distributed based on your stake size
* **Continuous:** Rewards accumulate continuously

### Step-by-Step Reward Claiming Process

#### **Step 1: Check Your Rewards**

1. Navigate to the staking interface
2. Check your current reward balance
3. Verify the amount available for claiming
4. Review your reward history

#### **Step 2: Understand Claiming Requirements**

1. **24-Hour Lock:** You can claim rewards after a 24-hour lock-up period
2. **Minimum Balance:** Check if there's a minimum balance requirement
3. **Claiming Window:** Verify the claiming window is open
4. **Fees:** Check any fees associated with claiming

#### **Step 3: Claim Your Rewards**

1. **Navigate to Claim:** Go to the reward claiming section
2. **Enter Amount:** Enter the amount you want to claim
3. **Review Details:** Check claiming details and fees
4. **Confirm Transaction:** Approve the claiming transaction
5. **Wait for Confirmation:** Wait for transaction confirmation

#### **Step 4: Choose Your Next Step**

After claiming, you have two options:

**Option 1: Compound Rewards**

1. **Deposit Back:** Deposit claimed rewards back into the liquidity layer
2. **Compound Growth:** Increase your stake for higher future rewards
3. **Maximize Returns:** Optimize your long-term returns

**Option 2: Withdraw Rewards**

1. **Bridge to Other Chains:** Use the official bridge to withdraw to other chains
2. **Use Elsewhere:** Use rewards for other purposes
3. **Diversify:** Diversify your portfolio

### Reward Claiming Strategies

#### **Regular Claiming**

* **Claim Frequently:** Claim rewards regularly to compound growth
* **Consistent Schedule:** Set a regular claiming schedule
* **Monitor Performance:** Track your reward performance
* **Optimize Timing:** Time claiming for optimal gas fees

#### **Compound Strategy**

* **Reinvest Rewards:** Reinvest all claimed rewards
* **Maximize Growth:** Maximize long-term growth potential
* **Patience:** Be patient for compound effects
* **Long-term Focus:** Focus on long-term wealth building

#### **Withdrawal Strategy**

* **Regular Withdrawals:** Withdraw rewards for living expenses
* **Diversification:** Use rewards to diversify portfolio
* **Risk Management:** Reduce risk by taking profits
* **Flexibility:** Maintain flexibility in your strategy

### Important Considerations

#### **Timing Considerations**

* **24-Hour Lock:** 24-hour waiting period after claiming
* **Gas Optimization:** Time claiming for optimal gas fees
* **Market Conditions:** Consider market conditions when claiming
* **Personal Schedule:** Plan claiming around your schedule

#### **Fee Considerations**

* **Claiming Fees:** Fees for claiming rewards
* **Bridge Fees:** Fees for bridging to other chains
* **Gas Fees:** Gas fees for transactions
* **Total Cost:** Factor in all fees when calculating net rewards

#### **Tax Considerations**

* **Tax Implications:** Consider tax implications of claiming rewards
* **Record Keeping:** Keep records of all reward claims
* **Consultation:** Consult tax professionals if needed
* **Compliance:** Ensure compliance with local tax laws

***

## Missions System

Earn extra points by completing missions in the Polynomial ecosystem. Different missions have different point values based on their difficulty and impact.

### Staking Missions

Complete missions by depositing and referring friends to Polynomial:

* **Deposit Missions:** Earn points for staking specific amounts
* **Referral Missions:** Earn points for bringing new users
* **Duration Missions:** Earn points for long-term staking
* **Asset Missions:** Earn points for staking specific assets

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2FeUVyHYiTt7dqt1pAZmVz%2FScreenshot%202024-07-29%20at%203.31.01%E2%80%AFPM.png?alt=media&#x26;token=a5aa8bc6-be22-4792-91f0-11db6bd92d6c" alt=""><figcaption></figcaption></figure>

#### **Mission Characteristics**

* **Time-bound:** Missions may not last forever
* **Difficulty-based:** Different point values based on complexity
* **Early believer bonus:** Extra boost for early participants
* **Limited time:** Some missions are only available for specific periods

### Social Missions

Earn points for creating content and social activities:

<figure><img src="https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2Fq2R4NnsNGqrSsCdIOSYX%2FScreenshot%202024-07-29%20at%203.32.07%E2%80%AFPM.png?alt=media&#x26;token=f4660d70-8dab-4612-aa47-bc09e27510e7" alt=""><figcaption></figcaption></figure>

#### **Content Creation**

* **Educational content:** Create tutorials and guides
* **Video content:** Make educational videos
* **Written content:** Write articles and blog posts
* **Infographics:** Create visual content

#### **Social Engagement**

* **Community participation:** Active Discord/Telegram engagement
* **Social media:** Share and promote Polynomial content
* **Event participation:** Join community events and AMAs
* **Feedback provision:** Provide valuable product feedback

#### **Reward Structure**

* **Points based on engagement:** Views, likes, shares, comments
* **2-week epochs:** Rewards distributed every 2 weeks
* **Quality over quantity:** High-quality content earns more
* **Community impact:** Content that helps others earns more

### How to Access Missions

1. **Navigate to Missions:** Go to the missions section in your dashboard
2. **Browse Available:** Check what missions are currently available
3. **Read Requirements:** Understand what's needed to complete each mission
4. **Plan Strategy:** Decide which missions to prioritize
5. **Track Progress:** Monitor your completion status

### Mission Tips

#### **Maximizing Rewards**

* **Complete regularly:** Check for new missions frequently
* **Combine activities:** Some missions can be completed together
* **Quality content:** Focus on creating valuable content
* **Community engagement:** Be active in community discussions

#### **Strategic Planning**

* **Time management:** Some missions have deadlines
* **Resource allocation:** Plan your time and effort effectively
* **Network building:** Use referrals to complete multiple missions
* **Consistent participation:** Regular activity unlocks more opportunities

### Mission Categories

#### **Beginner Missions**

* **Easy completion:** Simple requirements
* **Good rewards:** Decent point bonuses
* **Learning focused:** Help understand the platform
* **Foundation building:** Set up for advanced missions

#### **Advanced Missions**

* **Complex requirements:** Multiple steps needed
* **Higher rewards:** Significant point bonuses
* **Skill building:** Develop advanced knowledge
* **Community contribution:** Help grow the ecosystem

#### **Special Missions**

* **Limited time:** Available for specific periods
* **Unique rewards:** Special bonuses or recognition
* **Event-based:** Tied to specific events
* **Exclusive access:** May unlock special features

### Important Notes

* **Time-bound:** Many missions are only available for limited periods
* **Early believer bonus:** Early participants get extra rewards
* **Quality matters:** Better content earns more points
* **Community impact:** Missions that help others earn more

***

## Staking Referral Program

Polynomial's staking referral program rewards you for bringing new users to stake on the platform. When your referrals complete onboarding and deposit to our pool, you earn a share of their staking points.

### How Staking Referrals Work

#### **Getting Invite Codes**

* **Discord Drops:** Look for upcoming invite code drops on our Polynomial Discord
* **Twitter Announcements:** Follow Polynomial Twitter for code releases
* **Friend Referrals:** Get referral codes from friends who are early users
* **Retroactive Campaign:** Qualified users from the retroactive point campaign can generate codes

#### **How to Refer Someone**

1. **Visit Invites Page:** Go to the 'Invites' page in your staking dashboard
2. **Find Your Codes:** Locate your unique referral codes
3. **Share with Friends:** Send codes to friends and invite them to stake
4. **Track Progress:** Monitor who signs up through your codes

### Rewards Structure

#### **Direct Referrals (L1)**

* **10% of their staking points** - Earn points from your direct referrals
* **Lifetime rewards** - Continue earning as long as they stake
* **Points sharing** - Get a percentage of their accumulated points

#### **Indirect Referrals (L2)**

* **5% of their staking points** - Earn from your referrals' referrals
* **Network effect** - Build a referral tree for ongoing rewards
* **Compound growth** - Your network grows your rewards

### How to Maximize Staking Referrals

#### **Target the Right Users**

* **Staking enthusiasts:** People interested in earning yield
* **DeFi users:** Those familiar with staking protocols
* **Long-term holders:** Users looking for passive income
* **Community members:** Active participants in DeFi communities

#### **Share Strategically**

* **Educational content:** Create guides about staking benefits
* **Success stories:** Share your staking rewards and experience
* **Community engagement:** Be active in staking discussions
* **Direct outreach:** Personally invite friends and colleagues

#### **Provide Value**

* **Help with setup:** Assist new users with the staking process
* **Share knowledge:** Educate about staking strategies
* **Support network:** Help your referrals succeed
* **Stay engaged:** Maintain relationships with your referrals

### Important Notes

* **Points-based rewards:** Rewards are paid in staking points, not USDC
* **Lifetime earnings:** Continue earning as long as referrals stake
* **Network building:** Focus on building a strong referral network
* **Quality over quantity:** Better to have active, long-term stakers

***

## Troubleshooting

### Common Issues

#### **Transaction Stuck**

* Wait for transaction to complete
* Check gas fees are sufficient
* Contact support if stuck for hours

#### **Deposit Not Showing**

* Wait for bridge completion (10-15 seconds)
* Check transaction on source chain
* Refresh the page
* Contact support if still not visible

#### **Bridge Issues**

* Wait for bridge completion
* Verify transaction on source chain
* Contact support if bridge fails

#### **Cannot Unstake Due to Debt**

* **Check Debt Status:** Verify your current debt share
* **Bridge Funds:** Bridge additional funds to pay debt
* **Pay Debt:** Use fresh funds to clear debt
* **Retry Unstaking:** Once debt is cleared, retry unstaking

#### **24-Hour Timer Issues**

* **Check Timer:** Verify the exact time when funds become available
* **Wait Patiently:** Wait for the full 24-hour period
* **No Shortcuts:** There are no shortcuts around the 24-hour lock

#### **Cannot Claim Rewards**

* **Check Lock Period:** Verify 24-hour lock period has passed
* **Check Balance:** Verify you have rewards available
* **Check Requirements:** Verify all claiming requirements are met
* **Contact Support:** Contact support if issues persist

### Getting Help

* **FAQ:** Check [common questions](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/faq.md)
* **Community:** Join [Discord](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/community.md) for help
* **Support:** [Contact support](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/contact.md) for direct assistance

## Best Practices

### Before Staking

* **Plan Ahead:** Plan your staking strategy
* **Check Debt:** Verify debt status before depositing
* **Consider Fees:** Factor in all fees and costs
* **Review Strategy:** Review your overall strategy

### During Staking

* **Monitor Performance:** Monitor your staking performance
* **Complete Missions:** Complete available missions
* **Build Network:** Build your referral network
* **Stay Informed:** Stay informed about any updates

### After Staking

* **Track Rewards:** Track your reward accumulation
* **Compound Growth:** Consider compounding rewards
* **Diversify:** Diversify your staking strategy
* **Stay Engaged:** Stay engaged with the community

## Related Topics

* [**Understanding Rewards**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/staking-points.md) - Learn about reward systems
* [**Understanding Debt**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/debt-mechanism.md) - Learn about debt mechanism
* [**Bridge Guide**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/how-to/bridge-operations.md) - Learn about bridging assets

***

*This comprehensive staking guide covers all essential aspects of staking on Polynomial. Start with small amounts to learn the platform, then scale up as you become more comfortable with the system.*


# Chain Operations Guide

This comprehensive guide covers all aspects of working with Polynomial Chain, from bridging assets to configuring RPC endpoints.

## Table of Contents

1. [Bridging Assets](#bridging-assets)
2. [RPC Configuration](#rpc-configuration)
3. [Network Management](#network-management)
4. [Troubleshooting](#troubleshooting)

***

## Bridging Assets

Bridging allows you to move assets between different blockchain networks. Polynomial Chain supports bridging from multiple networks to enable seamless asset movement.

### Prerequisites

* Connected wallet with supported assets
* Understanding of bridge concepts
* Some ETH for gas fees on source chains

### Supported Networks

* **Ethereum Mainnet**
* **Arbitrum**
* **Optimism**
* **Base**

### Supported Assets

* **USDC:** Most liquid and stable
* **sDAI:** Higher yield potential
* **sUSDe:** Highest yield potential
* **WETH:** Wrapped ETH for gas and trading (not native ETH)

### Asset Breakdown

For a detailed breakdown of assets and their values in Polynomial's bridges, visit the [L2BEAT TVS breakdown](https://l2beat.com/scaling/projects/polynomial/tvs-breakdown) for comprehensive insights into the assets and their respective values within the Polynomial ecosystem.

### Bridging Assets to Polynomial Chain

#### **Step 1: Access Bridge Interface**

1. Go to [Polynomial Bridge](https://polynomial.fi/en/mainnet/earn/bridge)
2. Connect your wallet
3. Ensure you're on the correct source network
4. Verify you have sufficient balance

#### **Step 2: Select Source and Destination**

1. **Source Chain:** Choose your current chain (Ethereum, Arbitrum, Optimism, Base)
2. **Destination Chain:** Select Polynomial Chain
3. **Asset:** Choose the asset you want to bridge
4. **Amount:** Enter the amount to bridge

#### **Step 3: Review Bridge Details**

1. **Bridge Amount:** Verify the amount to be bridged
2. **Estimated Time:** Review estimated bridge time (10-15 seconds)
3. **Bridge Fees:** Check any applicable bridge fees
4. **Gas Fees:** Ensure you have enough ETH for gas on source chain

#### **Step 4: Initiate Bridge**

1. Click "Bridge" or "Deposit"
2. Confirm the transaction in your wallet
3. Wait for transaction confirmation on source chain
4. Monitor bridge progress

#### **Step 5: Wait for Completion**

1. **Bridge Time:** Typically 10-15 seconds
2. **Status Tracking:** Monitor progress in your wallet
3. **Confirmation:** You'll receive notification when complete
4. **Verification:** Check your Polynomial Chain balance

### Bridging Assets from Polynomial Chain

#### **Step 1: Access Withdrawal Interface**

1. Go to [Polynomial Bridge](https://polynomial.fi/en/mainnet/earn/bridge)
2. Connect your wallet
3. Ensure you're on Polynomial Chain
4. Verify you have sufficient balance

#### **Step 2: Select Destination**

1. **Source Chain:** Polynomial Chain
2. **Destination Chain:** Choose your target chain
3. **Asset:** Select the asset to bridge out
4. **Amount:** Enter the amount to bridge

#### **Step 3: Review Withdrawal Details**

1. **Withdrawal Amount:** Verify the amount
2. **Destination:** Confirm destination chain
3. **Estimated Time:** Review estimated bridge time
4. **Fees:** Check any applicable fees

#### **Step 4: Initiate Withdrawal**

1. Click "Withdraw" or "Bridge Out"
2. Confirm the transaction in your wallet
3. Wait for transaction confirmation
4. Monitor bridge progress

#### **Step 5: Wait for Completion**

1. **Bridge Time:** Typically 1-5 mins
2. **Status Tracking:** Monitor progress
3. **Confirmation:** Check destination chain for arrival
4. **Verification:** Verify funds in destination wallet

### Bridge Process Details

#### **How Bridging Works**

Polynomial uses **Socket's mint and burn bridge mechanism** for fast, secure cross-chain transfers:

* **Mint and Burn:** Assets are burned on the source chain and minted on Polynomial Chain
* **Fast Execution:** Bridge completion typically takes 1-5 mins
* **Trustless:** Bridge is trustless and secure
* **Transparent:** All transactions are transparent and verifiable
* **Automated:** Process is automated once initiated

For detailed technical information about Socket's bridge mechanism, visit the [Socket.tech documentation](https://docs.socket.tech/).

#### **Bridge Security**

* **Smart Contracts:** Secured by audited smart contracts
* **Multi-Sig:** Multiple signatures required for bridge operations
* **Time Locks:** Time delays for additional security
* **Monitoring:** Continuous monitoring of bridge operations

#### **Bridge Fees**

* **Source Chain Gas:** Pay gas fees on source chain
* **Bridge Fees:** May include bridge-specific fees
* **Destination Gas:** No gas fees on Polynomial Chain
* **Total Cost:** Consider total cost of bridging

***

## RPC Configuration

RPC (Remote Procedure Call) endpoints allow your wallet to communicate directly with the Polynomial Chain network. Adding the correct RPC ensures your wallet can interact with Polynomial Chain properly.

### Prerequisites

* Web3 wallet (MetaMask, WalletConnect, etc.)
* Understanding of RPC concepts
* Basic knowledge of wallet configuration

### Why Add RPC?

* **Direct Connection:** Connect directly to Polynomial Chain
* **Better Performance:** Faster transaction processing
* **Reliability:** More reliable connection
* **Full Functionality:** Access to all network features

### Polynomial Chain Network Details

#### **Mainnet Configuration**

* **Network Name:** Polynomial Chain
* **RPC URL:** `https://rpc.polynomial.fi`
* **Alternative RPC:** `https://rpc-proxy.polynomial.fi`
* **Chain ID:** 8008
* **Currency Symbol:** ETH
* **Block Explorer:** <https://polynomialscan.io>

#### **Testnet Configuration**

* **Network Name:** Polynomial Sepolia
* **RPC URL:** `https://rpc.sepolia.polynomial.fi`
* **Chain ID:** 80008
* **Currency Symbol:** ETH
* **Block Explorer:** <https://sepolia.polynomialscan.io>

### Adding RPC to MetaMask

#### **Step 1: Open MetaMask**

1. Open your MetaMask wallet
2. Click on the network dropdown (top of wallet)
3. Select "Add network" or "Custom RPC"

#### **Step 2: Enter Network Details**

1. **Network Name:** Enter "Polynomial Chain"
2. **RPC URL:** Enter `https://rpc.polynomial.fi`
3. **Chain ID:** Enter `8008`
4. **Currency Symbol:** Enter `ETH`
5. **Block Explorer:** Enter `https://polynomialscan.io`

#### **Step 3: Save Network**

1. Review all details
2. Click "Save" or "Add Network"
3. MetaMask will switch to Polynomial Chain
4. Verify you're on the correct network

#### **Step 4: Verify Connection**

1. Check network name in MetaMask
2. Verify chain ID is 8008
3. Test by viewing your balance
4. Confirm you can see Polynomial Chain assets

### Adding RPC to Other Wallets

#### **WalletConnect**

1. **Connect Wallet:** Connect your wallet via WalletConnect
2. **Network Selection:** Select Polynomial Chain from network list
3. **Automatic Configuration:** WalletConnect handles RPC configuration
4. **Verification:** Verify connection to Polynomial Chain

#### **Coinbase Wallet**

1. **Open Settings:** Open Coinbase Wallet settings
2. **Networks:** Go to Networks section
3. **Add Network:** Click "Add Network"
4. **Enter Details:** Enter Polynomial Chain details
5. **Save:** Save the network configuration

#### **Other EVM Wallets**

1. **Find Network Settings:** Look for network or RPC settings
2. **Add Custom Network:** Add custom network option
3. **Enter Details:** Enter Polynomial Chain details
4. **Save Configuration:** Save the network configuration

### Alternative RPC Endpoints

* **Primary:** `https://rpc.polynomial.fi`
* **Secondary:** `https://rpc-proxy.polynomial.fi`
* **Backup:** Contact support for additional endpoints

***

## Network Management

### Polynomial Chain Details

#### **Network Specifications**

* **Consensus:** Proof of Stake
* **Block Time:** \~2 seconds
* **Gas Fees:** Gasless for most operations
* **EVM Compatible:** Full Ethereum compatibility

#### **Supported Features**

* **Smart Contracts:** Full smart contract support
* **Account Abstraction:** Native account abstraction
* **Cross-Chain:** Built-in cross-chain capabilities
* **Gasless Transactions:** Sponsored transactions

### Advanced RPC Configuration

#### **Custom RPC Settings**

* **Timeout Settings:** Adjust RPC timeout if needed
* **Retry Logic:** Configure retry logic for failed requests
* **Load Balancing:** Use multiple RPC endpoints
* **Monitoring:** Monitor RPC performance

#### **Developer Configuration**

* **Web3 Providers:** Configure Web3 providers
* **SDK Integration:** Integrate with development SDKs
* **API Keys:** Use API keys for enhanced access
* **Rate Limits:** Understand and manage rate limits

### Best Practices

#### **RPC Management**

* **Multiple Endpoints:** Use multiple RPC endpoints for reliability
* **Performance Monitoring:** Monitor RPC performance
* **Backup Endpoints:** Keep backup endpoints ready
* **Regular Updates:** Keep RPC configuration updated

#### **Security Considerations**

* **Official Endpoints:** Only use official RPC endpoints
* **HTTPS Only:** Ensure RPC URLs use HTTPS
* **Verify Sources:** Verify RPC endpoint sources
* **Avoid Public RPCs:** Avoid using public, untrusted RPCs

#### **Performance Optimization**

* **Choose Closest:** Choose geographically closest RPC
* **Monitor Latency:** Monitor RPC latency
* **Load Balancing:** Use load balancing for high usage
* **Caching:** Implement appropriate caching

***

## Troubleshooting

### Common Bridge Issues

#### **Bridge Taking Too Long**

* **Normal Time:** 10-15 seconds is normal
* **Peak Times:** May take longer during high traffic
* **Network Congestion:** Source chain congestion can delay
* **Wait Patiently:** Wait up to 30 minutes before concern

#### **Transaction Failed**

* **Insufficient Gas:** Ensure enough ETH for gas
* **Network Issues:** Check source chain network status
* **Insufficient Balance:** Verify sufficient balance
* **Try Again:** Retry during lower congestion

#### **Funds Not Arriving**

* **Check Destination:** Verify correct destination address
* **Network Status:** Check destination chain status
* **Transaction Status:** Verify transaction status
* **Contact Support:** Contact support if over 1 hour

#### **Failed Margin Deposit After Bridge**

Sometimes when bridging and depositing to margin, the margin deposit may fail even though the bridge was successful:

* **Check Polynomial Balance:** Your assets are likely already on Polynomial Chain
* **Direct Deposit:** You can deposit directly from your Polynomial Chain balance
* **Balance Verification:** Check your balance in the staking interface or trading interface
* **No Re-bridge Needed:** Assets are already on Polynomial Chain, no need to bridge again

#### **Wrong Network**

* **Switch Networks:** Switch to correct network
* **Check Address:** Verify you're using correct address
* **Network Configuration:** Check network configuration
* **Wallet Settings:** Update wallet network settings

### Common RPC Issues

#### **Cannot Connect to Network**

* **Check RPC URL:** Verify RPC URL is correct
* **Check Chain ID:** Ensure Chain ID is 8008
* **Network Status:** Check if Polynomial Chain is operational
* **Try Alternative RPC:** Use alternative RPC URL

#### **Slow Transactions**

* **RPC Performance:** Try alternative RPC endpoint
* **Network Congestion:** Wait for network congestion to clear
* **Wallet Issues:** Restart wallet application
* **Clear Cache:** Clear wallet cache

#### **Transaction Failures**

* **Insufficient Gas:** Ensure adequate gas for transactions
* **Network Mismatch:** Verify you're on correct network
* **RPC Issues:** Try alternative RPC endpoint
* **Wallet Issues:** Check wallet configuration

### Important Bridge Information

#### **Only Use Socket Bridge**

* **Official Bridge Only:** Polynomial only supports Socket bridge for all asset transfers
* **No Alternative Bridges:** Do not use other bridges (LayerZero, Wormhole, etc.) as they are not supported
* **ETH Bridge Warning:** Do not use Optimism's ETH bridge unless you're running a bot - this is not recommended for regular users

#### **WETH System**

* **WETH Instead of ETH:** Polynomial uses WETH (Wrapped ETH) on-chain, not native ETH
* **Polynomial Wallet Integration:** All assets are managed within your Polynomial wallet
* **Simplified Experience:** WETH provides the same functionality as ETH but optimized for Polynomial Chain

### Security Considerations

#### **Bridge Security**

* **Official Socket Bridge Only:** Always use Polynomial's official Socket bridge interface
* **Verify URLs:** Ensure you're on correct website (polynomial.fi)
* **No Alternative Bridges:** Do not use any other bridge services
* **Be Cautious:** Be cautious of phishing attempts

#### **Asset Security**

* **Private Keys:** Never share private keys
* **Seed Phrases:** Keep seed phrases secure
* **Hardware Wallets:** Use hardware wallets for large amounts
* **Regular Monitoring:** Monitor your accounts regularly

### Best Practices

#### **Before Bridging**

* **Verify Networks:** Ensure you're on the correct networks
* **Check Balances:** Verify sufficient balances
* **Review Fees:** Understand all applicable fees
* **Plan Timing:** Consider optimal timing for bridging

#### **During Bridging**

* **Monitor Progress:** Track bridge progress
* **Be Patient:** Allow sufficient time for completion
* **Don't Panic:** Don't worry if it takes longer than expected
* **Keep Records:** Keep transaction records

#### **After Bridging**

* **Verify Arrival:** Confirm funds arrived correctly
* **Update Records:** Update your records
* **Plan Next Steps:** Plan your next actions
* **Monitor Account:** Monitor your account balance

### Getting Help

#### **Common Questions**

* **RPC Configuration:** How to configure RPC endpoints
* **Network Issues:** Troubleshooting network problems
* **Performance Issues:** Optimizing RPC performance
* **Security Concerns:** RPC security best practices

#### **Support Channels**

* **FAQ:** Check [common questions](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/faq.md)
* **Community:** Join [Discord](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/community.md) for help
* **Support:** [Contact support](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/support/contact.md) for direct assistance
* **Documentation:** Review technical documentation

## Next Steps

After learning chain operations:

1. [**How to Deposit**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/how-to/staking.md) - Learn about staking deposits
2. [**How to Trade**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/how-to/trading.md) - Learn about trading
3. [**Understanding Polynomial Wallets**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/getting-started/polynomial-wallets.md) - Learn about polynomial wallets
4. [**Wallet Setup Guide**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/how-to/wallet-setup.md) - Learn about wallet setup

## Important Reminders

* **Be Patient:** Bridge operations take time
* **Verify Networks:** Always verify you're on correct networks
* **Keep Records:** Keep transaction records
* **Use Official Channels:** Always use official bridge interfaces
* **Use Official RPCs:** Always use official RPC endpoints
* **Verify Configuration:** Double-check all network details
* **Keep Updated:** Keep RPC configuration updated
* **Monitor Performance:** Monitor RPC performance regularly

***

*This comprehensive chain operations guide covers all essential aspects of working with Polynomial Chain. Follow these steps carefully to ensure proper network connectivity and successful asset transfers.*


# Advanced Features Guide

This comprehensive guide covers advanced topics for experienced users, including funding arbitrage, keeper bots, API integration, and affiliate programs.

## Table of Contents

1. [Funding Rate Arbitrage](#funding-rate-arbitrage)
2. [Keeper Bots](#keeper-bots)
3. [API Integration](#api-integration)
4. [Affiliate Program](#affiliate-program)

***

## Funding Rate Arbitrage

Polynomial uses an innovative funding rate mechanism that differs from traditional perpetual exchanges. The system employs a continuous funding rate velocity model combined with dynamic market pricing to create efficient markets and arbitrage opportunities.

### Introduction

Funding rates in Polynomial serve three primary purposes:

1. Maintain perpetual futures price alignment with the underlying asset
2. Balance long and short positions in the market
3. Create arbitrage opportunities that help maintain market efficiency

### Funding Rate Mechanism

#### **How Funding Works**

Unlike traditional exchanges that calculate funding at fixed intervals, Polynomial implements a continuous funding rate model where:

* Funding is calculated and applied continuously
* Rates adjust based on market skew
* Payments flow directly between longs and shorts

The basic funding formula is:

```
Funding Payment = Position Size × Funding Rate × Time Elapsed
```

Where:

* Position Size is in USD
* Funding Rate is an annualized percentage
* Time Elapsed is measured in years (e.g., 1 hour = 1/8760)

### Funding Rate Velocity Model

Polynomial uses a velocity-based approach to funding rate adjustments:

```
dr/dt = c × skew

Where:
- dr/dt is the funding rate velocity
- c is the velocity coefficient
- skew = (long_positions - short_positions) / skew_scale
```

This creates smoother funding rate transitions and more predictable arbitrage opportunities.

#### **Key Properties**

1. **Continuous Adjustment**: Funding rates evolve smoothly rather than jumping at fixed intervals
2. **Market Memory**: The system maintains memory of previous imbalances
3. **Path Independence**: Total funding is determined by net market imbalance

### Market Price Adjustment

Market prices on Polynomial adjust dynamically with skew using a premium/discount mechanism:

```
Market Price = Oracle Price × (1 + premium)
premium = skew / skewScale

Where:
- skew = (long_positions - short_positions) / skew_scale
- skewScale is a configurable parameter that modulates market liquidity
```

This creates two levels of incentives:

1. **Immediate price impact:** Premium for long skew, discount for short skew
2. **Ongoing funding payments:** Continuous funding rate velocity adjustments
3. **Risk management:** Creates soft limits on maximum exposure without restrictive OI limits

### Funding Rate Arbitrage Guide

#### **Basic Arbitrage Strategy**

1. **Identify Opportunity**
   * Monitor funding rates across exchanges
   * Look for significant rate differentials
   * Check liquidity on both venues
2. **Position Setup**
   * Short on the high funding rate venue (Polynomial)
   * Long on the low funding rate venue
   * Maintain equal position sizes for delta neutrality
3. **Capital Requirements**

   ```
   Required Margin = Position Size × Max(Margin_Rate_A, Margin_Rate_B)
   Buffer Margin = Required Margin × 0.3 (recommended 30% buffer)
   ```

#### **Advanced Implementation**

1. **Entry Execution**
   * Use limit orders to minimize slippage
   * Enter positions when funding rate differential exceeds transaction costs
   * Consider gas costs on both venues
2. **Position Monitoring**
   * Track funding payments
   * Monitor price deviation between venues
   * Watch for changes in funding rates
3. **Exit Conditions**
   * Funding rate convergence
   * Achievement of profit target
   * Risk threshold breach

#### **Cross-Margin Advantage**

Polynomial's cross-margin system provides several benefits for arbitrage:

1. **Capital Efficiency**
   * Single margin pool for all positions
   * Reduced total margin requirements
   * Better leverage utilization
2. **Risk Management**
   * Portfolio-wide liquidation pricing
   * Unified collateral management
   * Simplified position tracking

### Risk Management

#### **Key Risks**

1. **Exchange Risk**
   * Counterparty risk
   * Platform downtime
   * Oracle failures
2. **Market Risks**
   * Price deviation between venues
   * Sudden funding rate changes
   * Liquidity gaps
3. **Operational Risks**
   * Network congestion
   * Smart contract risk
   * Implementation errors

#### **Risk Mitigation Strategies**

1. **Position Sizing**

   ```
   Max Position Size = Account Value × Risk Factor / Max Expected Loss
   Where:
   - Risk Factor = 0.02 (2% risk per trade recommended)
   - Max Expected Loss includes potential funding and slippage
   ```
2. **Margin Management**
   * Maintain minimum 25% buffer above liquidation
   * Scale positions based on funding rate volatility
   * Consider correlation between venues

### Examples and Calculations

#### **Example 1: Basic Funding Arbitrage**

Given:

* Polynomial funding rate: +200% APR
* Other venue funding rate: +10% APR
* Position size: $100,000

Calculations:

```
Daily funding differential = $100,000 × (200% - 10%) / 365
                         = $100,000 × 1.90 / 365
                         = $520.55 per day
```

#### **Example 2: Position Sizing with Risk Management**

Given:

* Account value: $100,000
* Risk factor: 2%
* Expected worst-case loss: 5%

```
Max Position Size = $100,000 × 0.02 / 0.05
                  = $40,000
```

#### **Example 3: Required Margin Calculation**

Given:

* Position size: $40,000
* Margin rate A: 5%
* Margin rate B: 10%
* Buffer: 30%

```
Required Margin = $40,000 × Max(5%, 10%)
                = $40,000 × 0.10
                = $4,000

Total Required = $4,000 × 1.30 (including buffer)
               = $5,200
```

### Advanced Topics

#### **Funding Rate Velocity Implications**

The velocity model creates unique properties:

1. Smoother rate transitions
2. More predictable arbitrage opportunities
3. Better market stability

The funding rate velocity can be used to predict future funding rates:

```
Future_Rate = Current_Rate + (dr/dt × Time)

Where:
dr/dt = c × skew as defined earlier
```

#### **Market Impact Analysis**

When executing large arbitrage positions, consider the market impact:

```
Expected_Slippage = k × Position_Size / Market_Depth

Total_Cost = Slippage + Gas_Fees + Exchange_Fees
```

Only execute when:

```
Expected_Funding_Profit > Total_Cost × Safety_Margin
```

### Conclusion

Successful funding rate arbitrage on Polynomial requires:

1. Understanding of the continuous funding mechanism
2. Proper risk management
3. Efficient execution
4. Constant monitoring
5. Adaptation to market conditions

For the latest parameters and updates, refer to the contracts.

***

## Keeper Bots

Perps markets rely on keepers to fetch offchain price data to fill orders and liquidate accounts. Polynomial Perps use a delayed order mechanism to fill orders.

### Overview

#### **How It Works**

* **Minimum delay:** Set to one block (2 seconds)
* **Keeper rewards:** Gas cost + $0.1 tip per order
* **Liquidation rewards:** Around $5 per liquidation
* **Order execution:** Keepers receive gas cost and tip for their work

#### **Getting ETH on Polynomial Chain**

You can use <https://refuel.exchange> to get ETH on Polynomial chain.

### Multicall

Keepers are expected to batch their actions using `TrustedMulticallForwarder` contract:

```solidity
struct Call3Value {
    address target;
    bool requireSuccess;
    uint256 value;
    bytes callData;
}

function aggregate3Value(Call3Value[] calldata calls) public returns (bytes[] memory returnData);
```

### Price Updates

Both Order Settlement and Liquidation keepers are responsible for updating oracle price data from Pyth.

#### **API Endpoints**

* Latest price update: `/v2/updates/price/latest`
* Specific time price: `/v2/updates/price/{time}`

#### **Encoding Schema**

```solidity
bytes signedOffchainData = abi.encode(uint8 updateType, uint64 stalenessTolerance, bytes32[] priceIds, bytes[] updateData)
```

* `updateType`: Set to `1` for latest price updates and `2` for price snapshots
* `stalenessTolerance`: Maximum time in seconds (max 60 for most actions)
* `priceIds`: List of price IDs that the keeper is responsible for
* `updateData`: List of price update data

#### **Pushing Price Data**

```solidity
function fulfillOracleQuery(bytes memory signedOffchainData) external;
```

### Order Settlement

#### **Order Committed Event**

```solidity
event OrderCommitted(
    uint128 indexed marketId,
    uint128 indexed accountId,
    SettlementStrategy.Type orderType,
    int128 sizeDelta,
    uint256 acceptablePrice,
    uint256 commitmentTime,
    uint256 expectedPriceTime,
    uint256 settlementTime,
    uint256 expirationTime,
    bytes32 indexed trackingCode,
    address sender
);
```

#### **Settling Orders**

```solidity
function settleOrder(uint128 accountId) external;
```

### Liquidation

#### **Liquidating Accounts**

```solidity
function liquidate(uint128 accountId) external;
```

#### **Helper Methods**

```solidity
function canLiquidate(uint128 accountId) external view returns (bool isEligible);
function getRequiredMargins(uint128 accountId) external view returns (uint256 requiredInitialMargin, uint256 requiredMaintenanceMargin, uint256 maxLiquidationReward);
function getAvailableMargin(uint128 accountId) external view returns (int256 availableMargin);
```

### Contract Addresses

* `PerpsMarketProxy`: [0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688](https://polynomialscan.io/address/0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688)
* `PythERC7412Wrapper`: [0x4a2755b2F675218b55364E1f5928A59ea9c4616d](https://polynomialscan.io/address/0x4a2755b2F675218b55364E1f5928A59ea9c4616d)
* `TrustedMulticallForwarder`: [0xE2C5658cC5C448B48141168f3e475dF8f65A1e3e](https://polynomialscan.io/address/0xE2C5658cC5C448B48141168f3e475dF8f65A1e3e)

### Getting Started

#### **Prerequisites**

* ETH on Polynomial Chain for gas fees
* Understanding of Pyth oracle system
* Basic knowledge of smart contract interactions

#### **Setup Steps**

1. **Get ETH:** Use [refuel.exchange](https://refuel.exchange) to get ETH on Polynomial Chain
2. **Monitor Events:** Set up event monitoring for `OrderCommitted` events
3. **Price Updates:** Implement Pyth price update fetching
4. **Order Settlement:** Implement order settlement logic
5. **Liquidation:** Implement liquidation logic

***

## API Integration

### Trading API

The Polynomial Trading API allows you to programmatically interact with the platform for automated trading, portfolio management, and data analysis.

#### **Authentication**

* **API Keys:** Generate API keys from your account settings
* **Rate Limits:** Understand and respect rate limits
* **Security:** Keep API keys secure and never share them

#### **Endpoints**

* **Market Data:** Real-time market data and historical prices
* **Account Management:** Account information and balances
* **Order Management:** Place, modify, and cancel orders
* **Position Management:** View and manage positions

#### **WebSocket Support**

* **Real-time Data:** Live market data streams
* **Order Updates:** Real-time order status updates
* **Position Updates:** Live position and P\&L updates

### Webhook Integration

Webhooks allow you to receive real-time notifications about trading events and market conditions.

#### **Supported Events**

* **Order Fills:** Notifications when orders are filled
* **Position Changes:** Updates when positions change
* **Price Alerts:** Custom price level notifications
* **Account Events:** Account-related notifications

#### **Setup Process**

1. **Configure Webhook URL:** Set up your webhook endpoint
2. **Select Events:** Choose which events to receive
3. **Test Integration:** Test webhook delivery
4. **Monitor Performance:** Monitor webhook reliability

### SDK Integration

#### **JavaScript/TypeScript SDK**

```typescript
import { PolynomialSDK } from '@polynomial/sdk';

const sdk = new PolynomialSDK({
  apiKey: 'your-api-key',
  network: 'mainnet'
});

// Get market data
const marketData = await sdk.getMarketData('BTC-PERP');

// Place order
const order = await sdk.placeOrder({
  market: 'BTC-PERP',
  side: 'buy',
  size: 1000,
  price: 50000
});
```

#### **Python SDK**

```python
from polynomial_sdk import PolynomialClient

client = PolynomialClient(api_key='your-api-key')

# Get account info
account = client.get_account()

# Place order
order = client.place_order(
    market='BTC-PERP',
    side='buy',
    size=1000,
    price=50000
)
```

### Best Practices

#### **API Usage**

* **Rate Limiting:** Respect rate limits to avoid throttling
* **Error Handling:** Implement proper error handling
* **Retry Logic:** Use exponential backoff for failed requests
* **Monitoring:** Monitor API usage and performance

#### **Security**

* **API Key Management:** Rotate API keys regularly
* **HTTPS Only:** Always use HTTPS for API calls
* **Input Validation:** Validate all inputs before sending
* **Access Control:** Limit API key permissions

***

## Affiliate Program

This guide will walk you through joining Polynomial's affiliate program to earn rewards by referring users to the platform.

### Prerequisites

* Understanding of affiliate programs
* Ability to refer quality users
* Compliance with program terms
* Marketing and promotion capabilities

### What is the Affiliate Program?

The Polynomial affiliate program allows you to earn rewards by referring users to the platform. Affiliates earn a percentage of trading fees generated by their referrals.

#### **How It Works**

* **Referral Links:** Get unique referral links
* **User Registration:** Users sign up through your links
* **Trading Activity:** Earn from their trading activity
* **Ongoing Rewards:** Earn as long as they remain active

#### **Benefits**

* **Passive Income:** Earn ongoing rewards from referrals
* **High Rewards:** Competitive commission rates
* **Quality Users:** Focus on referring quality users
* **Long-term Value:** Build sustainable income streams

### Joining the Affiliate Program

#### **Step 1: Review Program Terms**

1. **Read Terms:** Review affiliate program terms and conditions
2. **Understand Requirements:** Understand program requirements
3. **Check Eligibility:** Verify you meet eligibility criteria
4. **Review Commission Structure:** Understand commission rates

#### **Step 2: Apply for Affiliate Status**

1. **Contact Team:** Reach out to the Polynomial team
2. **Provide Information:** Share your background and experience
3. **Explain Strategy:** Describe your referral strategy
4. **Wait for Approval:** Wait for application approval

#### **Step 3: Get Your Referral Links**

1. **Receive Links:** Get your unique referral links
2. **Test Links:** Test links to ensure they work
3. **Customize Links:** Customize links for different campaigns
4. **Track Performance:** Set up tracking for your links

### Affiliate Marketing Strategies

#### **Content Marketing**

* **Educational Content:** Create educational content about Polynomial
* **Tutorial Videos:** Make tutorial videos about using the platform
* **Blog Posts:** Write blog posts about DeFi and trading
* **Social Media:** Share content on social media platforms

#### **Community Building**

* **Discord Communities:** Build Discord communities around trading
* **Telegram Groups:** Create Telegram groups for discussions
* **YouTube Channels:** Start YouTube channels about crypto trading
* **Podcasts:** Host podcasts about DeFi and trading

#### **Influencer Marketing**

* **Crypto Influencers:** Partner with crypto influencers
* **Trading Educators:** Collaborate with trading educators
* **DeFi Experts:** Work with DeFi experts
* **Content Creators:** Partner with content creators

#### **Paid Advertising**

* **Social Media Ads:** Run ads on social media platforms
* **Google Ads:** Use Google Ads for targeted campaigns
* **Crypto Publications:** Advertise in crypto publications
* **Influencer Partnerships:** Pay influencers for promotion

### Best Practices

#### **Quality Over Quantity**

* **Focus on Quality:** Focus on referring quality users
* **User Education:** Educate users about the platform
* **Ongoing Support:** Provide ongoing support to referrals
* **Long-term Relationships:** Build long-term relationships

#### **Compliance and Ethics**

* **Follow Guidelines:** Follow affiliate program guidelines
* **Honest Marketing:** Use honest and transparent marketing
* **Disclose Relationships:** Disclose affiliate relationships
* **Respect Users:** Respect users and their decisions

#### **Performance Optimization**

* **Track Metrics:** Track key performance metrics
* **A/B Testing:** Test different marketing approaches
* **Optimize Campaigns:** Continuously optimize campaigns
* **Scale Success:** Scale successful strategies

### Tracking and Analytics

#### **Key Metrics**

* **Referral Count:** Number of users referred
* **Conversion Rate:** Percentage of referrals who become active
* **Trading Volume:** Trading volume generated by referrals
* **Commission Earned:** Total commission earned

#### **Analytics Tools**

* **Affiliate Dashboard:** Use affiliate dashboard for tracking
* **Custom Analytics:** Set up custom analytics
* **UTM Tracking:** Use UTM parameters for tracking
* **Conversion Tracking:** Track conversion funnels

### Commission Structure

#### **Commission Rates**

* **Trading Fees:** Percentage of trading fees generated
* **Tiered Structure:** Higher rates for higher volumes
* **Minimum Thresholds:** Minimum thresholds for payouts
* **Payment Schedule:** Regular payment schedule

#### **Payment Terms**

* **Payment Schedule:** Monthly or weekly payments
* **Minimum Payout:** Minimum amount for payout
* **Payment Methods:** Available payment methods
* **Tax Reporting:** Tax reporting requirements

### Compliance and Legal

#### **Regulatory Compliance**

* **Local Laws:** Comply with local laws and regulations
* **Disclosure Requirements:** Meet disclosure requirements
* **Tax Obligations:** Fulfill tax obligations
* **Terms of Service:** Follow platform terms of service

#### **Marketing Compliance**

* **Truthful Advertising:** Use truthful and accurate advertising
* **Disclosure:** Disclose affiliate relationships
* **No Misleading Claims:** Avoid misleading claims
* **Respect Users:** Respect users and their privacy

### Building Your Affiliate Business

#### **Long-term Strategy**

* **Brand Building:** Build your personal brand
* **Content Creation:** Create valuable content
* **Community Building:** Build engaged communities
* **Relationship Building:** Build relationships with users

#### **Scaling Your Business**

* **Team Building:** Build a team to help with marketing
* **Automation:** Automate marketing processes
* **Partnerships:** Form strategic partnerships
* **Diversification:** Diversify your marketing channels

### Common Mistakes to Avoid

1. **Spam Marketing:** Don't spam users with referral links
2. **Misleading Claims:** Don't make misleading claims about the platform
3. **Poor User Experience:** Don't provide poor user experience
4. **Non-compliance:** Don't violate program terms or regulations
5. **Short-term Thinking:** Don't focus only on short-term gains

### Troubleshooting

#### **Common Issues**

**Low Conversion Rates**

* Improve your marketing content
* Better target your audience
* Provide better user education
* Optimize your referral process

**Low Commission Earnings**

* Focus on quality referrals
* Help users become more active
* Provide ongoing support
* Build long-term relationships

**Compliance Issues**

* Review program terms
* Ensure compliance with regulations
* Update marketing materials
* Seek legal advice if needed

#### **Getting Help**

* **Discord:** Join [Polynomial Discord](https://discord.gg/polynomial) for affiliate discussions
* **Support:** Contact affiliate support team
* **Community:** Connect with other affiliates
* **Resources:** Use available marketing resources

## Related Topics

* [**Understanding Funding Velocity**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/funding-velocity.md) - Deep dive into funding mechanics
* [**Cross-Margin Trading**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/cross-margin.md) - Learn about cross-margin benefits
* [**Debt Mechanism**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/explanation/debt-mechanism.md) - Understand risk management
* [**API Documentation**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/reference/trading-api.md) - Access trading APIs for automation
* [**Contract Addresses**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/reference/contract-addresses.md) - Get contract addresses

***

*This comprehensive advanced guide covers sophisticated strategies and tools for experienced users. Master the fundamentals before attempting these advanced techniques.*


# Trading API

> **⚠️ Important Notice**
>
> The information on this page has been replaced with a redirect to the official developer documentation. For accurate and up-to-date API documentation, please refer to the official source.

## Official Developer Documentation

For comprehensive and accurate Trading API documentation, please visit our official developer documentation:

[**📖 Polynomial Developer Documentation - API**](https://docs.polynomial.fi/developer-documentation/api/introduction)

This official documentation includes:

* Complete API endpoint reference
* Authentication methods
* Rate limits and best practices
* SDK examples and integration guides
* Real-time WebSocket documentation
* Error handling and troubleshooting

## API Key Access

To access the Trading API, you'll need an API key. To request an API key:

1. **Join our Discord community**
2. **Create a support ticket** requesting API access
3. **Provide details** about your intended use case
4. **Our team will review** and provide you with an API key and access to the complete developer documentation

## Support

* **Discord:** [Polynomial Discord](https://discord.gg/polynomial) - Create a support ticket for API access
* **Official Docs:** [Developer Documentation](https://docs.polynomial.fi/developer-documentation/api/introduction)
* **Example Repository:** Available in the official documentation

***

*For the most accurate and up-to-date information, always refer to the official developer documentation.*


# Contract Addresses

This page contains the official contract addresses for Polynomial Chain and related services.

## Polynomial Chain Mainnet

**Chain ID:** 8008\
**Explorer:** <https://polynomialscan.io>\
**RPC:** `https://rpc.polynomial.fi`

### Core Contracts

| Contract                        | Address                                                                                                                    | Description                                 |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| **Perps Market Proxy**          | [0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688](https://polynomialscan.io/address/0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688) | Main perpetual futures contract             |
| **Perps Automation**            | [0xd8088A6133a35bfD4990328E5078c3F6BE8CA30B](https://polynomialscan.io/address/0xd8088A6133a35bfD4990328E5078c3F6BE8CA30B) | Order settlement and liquidation automation |
| **Pyth ERC7412 Wrapper**        | [0x4a2755b2F675218b55364E1f5928A59ea9c4616d](https://polynomialscan.io/address/0x4a2755b2F675218b55364E1f5928A59ea9c4616d) | Oracle price feed wrapper                   |
| **Trusted Multicall Forwarder** | [0xE2C5658cC5C448B48141168f3e475dF8f65A1e3e](https://polynomialscan.io/address/0xE2C5658cC5C448B48141168f3e475dF8f65A1e3e) | Batch transaction execution                 |

### Liquidity Layer Contracts

| Contract             | Address | Description                  |
| -------------------- | ------- | ---------------------------- |
| **Liquidity Pool**   | \[TBD]  | Main liquidity pool contract |
| **Staking Contract** | \[TBD]  | Staking and rewards contract |
| **Bridge Contract**  | \[TBD]  | Cross-chain bridge contract  |

### Account Abstraction Contracts

| Contract            | Address | Description                        |
| ------------------- | ------- | ---------------------------------- |
| **Account Factory** | \[TBD]  | Polynomial wallet factory contract |
| **Entry Point**     | \[TBD]  | ERC-4337 entry point               |
| **Paymaster**       | \[TBD]  | Gas sponsorship contract           |

## Polynomial Chain Testnet (Sepolia)

**Chain ID:** 80008\
**Explorer:** <https://sepolia.polynomialscan.io>\
**RPC:** `https://rpc.sepolia.polynomial.fi`

### Core Contracts

| Contract                        | Address                                                                                                                            | Description                        |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **Perps Market Proxy**          | [0x52Fdc981472485232587E334c5Ca27F241CbA9AA](https://sepolia.polynomialscan.io/address/0x52Fdc981472485232587E334c5Ca27F241CbA9AA) | Testnet perpetual futures contract |
| **Pyth ERC7412 Wrapper**        | \[TBD]                                                                                                                             | Testnet oracle wrapper             |
| **Trusted Multicall Forwarder** | \[TBD]                                                                                                                             | Testnet multicall forwarder        |

## Supported Assets

### Mainnet Assets

| Asset     | Contract Address | Description  |
| --------- | ---------------- | ------------ |
| **USDC**  | \[TBD]           | USD Coin     |
| **sDAI**  | \[TBD]           | Savings DAI  |
| **sUSDe** | \[TBD]           | Savings USDe |
| **ETH**   | \[TBD]           | Ethereum     |

### Testnet Assets

| Asset    | Contract Address | Description      |
| -------- | ---------------- | ---------------- |
| **USDC** | \[TBD]           | Testnet USD Coin |
| **ETH**  | \[TBD]           | Testnet Ethereum |

## Oracle Price Feeds

### Pyth Network Price IDs

| Asset        | Price ID                                                             | Description          |
| ------------ | -------------------------------------------------------------------- | -------------------- |
| **BTC/USD**  | `0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | Bitcoin price feed   |
| **ETH/USD**  | `0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | Ethereum price feed  |
| **SOL/USD**  | `0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d` | Solana price feed    |
| **AVAX/USD** | `0x93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7` | Avalanche price feed |

## Bridge Contracts

### Source Chain Contracts

| Chain        | Contract Address                                                                                                      | Description              |
| ------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| **Ethereum** | [0x034cbb620d1e0e4C2E29845229bEAc57083b04eC](https://etherscan.io/address/0x034cbb620d1e0e4C2E29845229bEAc57083b04eC) | Ethereum bridge contract |
| **Arbitrum** | \[TBD]                                                                                                                | Arbitrum bridge contract |
| **Optimism** | \[TBD]                                                                                                                | Optimism bridge contract |
| **Base**     | \[TBD]                                                                                                                | Base bridge contract     |

## Important Notes

### Security Considerations

* **Verify Addresses:** Always verify contract addresses before interacting
* **Official Sources:** Only use addresses from official sources
* **Double Check:** Double-check addresses when copying
* **Bookmark:** Bookmark this page for easy reference

### Address Updates

* **Regular Updates:** Contract addresses may be updated
* **Version Control:** Check version numbers for contract updates
* **Migration Notices:** Watch for migration notices
* **Official Announcements:** Follow official announcements

## Getting Help

### Verification

* **Explorer Links:** Use explorer links to verify contracts
* **Source Code:** Check source code on explorers
* **Community:** Ask community for verification
* **Support:** Contact support for clarification

### Updates

* **Discord:** Join [Polynomial Discord](https://discord.gg/polynomial) for updates
* **Twitter:** Follow [@PolynomialFi](https://x.com/PolynomialFi) for announcements
* **Documentation:** Check documentation for updates
* **GitHub:** Monitor GitHub for contract updates

## Related Resources

* [**Contract ABIs**](https://github.com/Polynomial-Protocol/gitbook/blob/master/reference/abis.md) - Contract Application Binary Interfaces
* [**Deployment Information**](https://github.com/Polynomial-Protocol/gitbook/blob/master/reference/deployment-info.md) - Contract deployment details
* [**Technical Specifications**](https://github.com/Polynomial-Protocol/gitbook/blob/master/reference/technical/network-config.md) - Network configuration
* [**API Documentation**](https://github.com/Polynomial-Protocol/gitbook/blob/master/reference/api/trading-api.md) - API endpoints and usage

***

*Always verify contract addresses before interacting with them. This page is updated regularly, but contract addresses may change during upgrades or migrations.*


# Trading Fees

## Fee Types

* **Trading Fees:** Fees for opening and closing positions
* **Funding Fees:** Fees for holding positions (based on funding velocity)
* **Liquidation Fees:** Fees for liquidated positions
* **Rollover Fees(Non crypto pairs)** : For carrying positions in non-crypto pairs

## Trading Fees

### Maker/Taker Model

* **Maker Fees:** Fees for providing liquidity (limit orders)
* **Taker Fees:** Fees for taking liquidity (market orders)

Trading fees are **the same for both crypto and non-crypto pairs**.\
**BTC and ETH pairs currently have zero trading fees** on Polynomial.

### Skew-Based Pricing

Trading prices include a premium/discount based on market skew to manage risk and create rebalancing incentives:

* **Premium for Long Skew:** When long positions exceed short positions, prices include a premium
* **Discount for Short Skew:** When short positions exceed long positions, prices include a discount
* **Linear Pricing Function:** premium = skew / skewScale
* **Execution Price:** Average price along the premium/discount curve
* **Risk Management:** Creates soft limits on maximum exposure without restrictive open interest limits

### Fee Schedule

| VIP Tier     | Maker Fee | Taker Fee | Requirements          |
| ------------ | --------- | --------- | --------------------- |
| **Standard** | 0.04%     | 0.06%     | Default tier          |
| **VIP 1**    | 0.025%    | 0.0525%   | $1M+ trading volume   |
| **VIP 2**    | 0.0225%   | 0.05%     | $2.5M+ trading volume |
| **VIP 3**    | 0.02%     | 0.045%    | $5.0M+ trading volume |
| **VIP 4**    | 0.0175%   | 0.04%     | $10M+ trading volume  |
| **VIP 5**    | 0.015%    | 0.035%    | $25M+ trading volume  |
| **VIP 6**    | 0.0125%   | 0.03%     | $50M+ trading volume  |
| **VIP 7**    | 0.01%     | 0.025%    | $100M+ trading volume |
| **VIP 8**    | 0.005%    | 0.02%     | $250M+ trading volume |
| **VIP 9**    | 0.00%     | 0.015%    | $500M+ trading volume |

## Funding Rate

Funding fees use a velocity-based model that creates smooth, predictable funding rate trajectories while maintaining zero-sum properties.

### Funding Rate Velocity Model

Instead of instantaneous funding rates proportional to skew, the system uses funding rate velocity where:

* **dr/dt = c × skew** (rate of change in funding rates)
* Funding rates continuously drift higher/lower with uncorrected position imbalances
* Creates natural price discovery for funding rates
* Smooths funding rate trajectories for better UX

### Key Factors

* **Market Skew:** Imbalance between long and short positions
* **Funding Velocity:** Rate of change in funding rates (not instantaneous rates)
* **Skew Scale:** Configurable parameter that modulates market liquidity
* **Max Funding Velocity:** Maximum funding rate velocity when skew = skewScale

### How It Works

1. **Unbalanced Positions:** When long/short positions are imbalanced, funding rate velocity increases
2. **Continuous Drift:** Funding rates drift continuously until positions rebalance
3. **Zero-Sum:** LPs neither gain nor lose funding over time - funding flows through them
4. **Natural Rebalancing:** Creates incentives for market participants to balance positions

## Liquidation Fees

* **Base Fee:** 50$ fixed fee for liquidation
* **Market Impact:** Additional fee based on market impact
* **Gas Costs:** Gas costs for liquidation transaction

## **Rollover Fees (Non-Crypto Pairs)**

The **Rollover Fee** applies only to **non-crypto markets** such as **commodities, indices, metals, and forex**.\
It reflects the cost of carrying open positions over time and compensates **liquidity providers (LPs)** for providing liquidity when underlying markets are closed or volatile.

* **Applies to both long and short positions equally**
* **Non-zero-sum:** unlike funding fees (which flow between longs and shorts), this fee is paid by traders into the protocol and distributed to LPs
* **Accrues continuously** and is **realized when the position is closed**

You can view this directly in the **UI under “Interest Rate”**

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

#### **Example**

If the **annualized rollover rate** is **10% for GOLD**, a **$10,000 position** held for **one day** incurs approximately **$2.74**, which is automatically deducted from your PnL when the position is closed.

#### **Current Rollover Fee Rates**

| Market  | Annual Rate |
| ------- | ----------- |
| XAU     | 10%         |
| XAG     | 10%         |
| WTI     | 10%         |
| NVDA    | 10%         |
| TSLA    | 10%         |
| HOOD    | 10%         |
| PLTR    | 10%         |
| GOOG    | 10%         |
| COIN    | 10%         |
| SPY     | 5%          |
| DIA     | 5%          |
| QQQ     | 5%          |
| USD/JPY | 5%          |
| EUR/USD | 5%          |

## Bridge Fees

Bridge fees vary by destination chain and current network conditions.

## VIP Program

VIP tiers are based on 30-day trading volume and provide:

* **Reduced Fees:** Lower trading fees
* **Priority Support:** Priority customer support
* **Exclusive Events:** Invitation to exclusive events

### **VIP Requirements**

* **Trading Volume:** Based on 30-day trading volume
* **Account Balance:** Minimum account balance requirements
* **Activity Level:** Regular trading activity
* **Compliance:** Compliance with platform terms

### **VIP Tier Progression**

```typescript
// VIP tier calculation
function calculateVIPTier(tradingVolume: number) {
  if (tradingVolume >= 1000000) return 'VIP 5';
  if (tradingVolume >= 500000) return 'VIP 4';
  if (tradingVolume >= 100000) return 'VIP 3';
  if (tradingVolume >= 50000) return 'VIP 2';
  if (tradingVolume >= 10000) return 'VIP 1';
  return 'Standard';
}
```

## Fee Optimization

### **Reducing Trading Fees**

* **Use Limit Orders:** Use limit orders to get maker fees
* **VIP Program:** Participate in VIP program
* **Volume Trading:** Increase trading volume for better rates
* **Batch Orders:** Batch multiple orders together

### **Reducing Funding Fees**

* **Market Timing:** Time entries to minimize funding costs
* **Position Management:** Manage position sizes and timing
* **Funding Rate Monitoring:** Monitor funding rate trends
* **Arbitrage Opportunities:** Use funding rate arbitrage

### **Reducing Withdrawal Fees**

* **Choose Optimal Chains:** Choose chains with lower fees
* **Batch Withdrawals:** Batch multiple withdrawals
* **Timing:** Withdraw during low gas periods
* **Alternative Methods:** Use alternative withdrawal methods

## Fee Transparency

### **Fee Display**

* **Pre-trade:** Fees displayed before trade execution
* **Post-trade:** Fees shown in trade confirmation
* **Account History:** All fees tracked in account history
* **Real-time Updates:** Fees update in real-time

### **Fee Breakdown**

* **Trading Fees:** Clearly separated from other fees
* **Funding Fees:** Shown separately from trading fees
* **Total Costs:** Total cost breakdown provided
* **Fee History:** Historical fee data available

## Fee Comparison

### **Competitive Analysis**

| Exchange       | Maker Fee | Taker Fee | Funding Fee |
| -------------- | --------- | --------- | ----------- |
| **Polynomial** | 0.02%     | 0.05%     | Variable    |
| **Binance**    | 0.02%     | 0.04%     | 0.01%       |
| **Bybit**      | 0.01%     | 0.06%     | 0.01%       |
| **dYdX**       | 0.00%     | 0.05%     | 0.00%       |

### **Value Proposition**

* **Competitive Rates:** Competitive with major exchanges
* **Transparent Pricing:** Clear and transparent fee structure
* **VIP Benefits:** Additional benefits through VIP program
* **No Hidden Fees:** No hidden or surprise fees

> > > > > > > f98d57c (Update documentation based on Discord feedback)

## Fee Payment

* **Automatic Deduction:** Fees automatically deducted from account balance
* **USDC Payment:** All fees paid in USDC
* **Real-time Processing:** Fees processed immediately upon trade execution

## Price Feeds

Polynomial uses Pyth Network for price feeds, providing:

* **High-Frequency Updates:** Real-time price updates for accurate execution
* **Decentralized Oracle Network:** Multiple data sources for reliability
* **Low Latency:** Fast price updates to minimize slippage
* **On-Chain Verification:** Price updates verified on-chain for security

## Important Notes

* Fees are subject to change based on market conditions
* VIP benefits may be updated over time
* Always check current fee rates before trading
* All fees are displayed before trade execution for transparency
* Skew-based pricing and funding velocity parameters are configurable via governancentinuebort


# Audit Reports

Polynomial has undergone comprehensive security audits across all system components to ensure the highest level of security and reliability.

## Rollup and Chain Security

### OP Stack Implementation

Polynomial Chain utilizes a managed version of the OP Stack, implemented by Conduit:

* **Rigorous auditing**: Implementation has undergone comprehensive security reviews
* **Ethereum-level security**: Benefits from Ethereum's data availability layer
* **Optimism Security Council**: Critical operational keys under professional stewardship
* **Superchain ecosystem**: Member of the broader Optimism ecosystem

For detailed audit information, refer to the [Conduit documentation](https://docs.conduit.xyz/rollups/stacks/op-stack#are-there-any-public-audits).

## Liquidity Layer

### Synthetix v3 Foundation

The Liquidity Layer is built upon the Synthetix v3 codebase:

* **Thoroughly audited**: Synthetix v3 has undergone extensive security reviews
* **No stablecoin issuance**: Maintains risk parameters aligned with base deployment
* **Shared attack surface**: Minimizes potential vulnerabilities
* **Proven track record**: Successfully deployed and tested

**Audit Reports:**

* [Synthetix v3 Audits](https://docs.synthetix.io/v/v3/for-developers/smart-contract-audits)
* [Polynomial Liquidity Layer](https://0xmacro.com/library/audits/polynomial-1.html)

## Polynomial Protocol Audits

### 0xMacro Security Audits

Polynomial Protocol underwent two comprehensive security audits by 0xMacro:

#### Audit 1

* **Scope**: Core protocol functionality
* **Status**: Completed with findings resolved
* **Report**: [Polynomial Audit 1](https://0xmacro.com/library/audits/polynomial-4.html)

#### Audit 2

* **Scope**: Advanced features and integrations
* **Status**: Completed with findings resolved
* **Report**: [Polynomial Audit 2](https://0xmacro.com/library/audits/polynomial-5.html)

## Abstraction Layer

### Account Abstraction (ZeroDev)

Account abstraction capabilities provided through ZeroDev:

* **Extensive audits**: ZeroDev has undergone comprehensive security reviews
* **High safety standards**: Ensures secure user interactions
* **Proven reliability**: Widely adopted in the ecosystem

**Audit Reports**: [ZeroDev GitHub Audits](https://github.com/zerodevapp/kernel/tree/dev/audits)

### Chain Abstraction (Socket)

Socket provides chain abstraction functionality:

* **Wide adoption**: Used by various rollups in the ecosystem
* **Proven reliability**: Demonstrated effectiveness across multiple deployments
* **Comprehensive audits**: Full security review documentation available

**Audit Reports**:

* [Socket GitHub Audits](https://github.com/SocketDotTech/audits/tree/main/Socket-DL)
* [Polynomial Abstraction Layer](https://0xmacro.com/library/audits/polynomial-3)

## Security Best Practices

### Continuous Monitoring

* **Regular updates**: All components receive ongoing security updates
* **Community oversight**: Open source components benefit from community review
* **Professional management**: Critical infrastructure managed by experienced teams

### Transparency

* **Public audits**: All audit reports are publicly available
* **Open source**: Core components are open source for community review
* **Regular updates**: Security improvements are communicated transparently

## Audit Summary

| Component           | Auditor | Status     | Report                                                                               |
| ------------------- | ------- | ---------- | ------------------------------------------------------------------------------------ |
| OP Stack            | Conduit | ✅ Complete | [Link](https://docs.conduit.xyz/rollups/stacks/op-stack#are-there-any-public-audits) |
| Liquidity Layer     | 0xMacro | ✅ Complete | [Link](https://0xmacro.com/library/audits/polynomial-1.html)                         |
| Protocol Core       | 0xMacro | ✅ Complete | [Link](https://0xmacro.com/library/audits/polynomial-4.html)                         |
| Protocol Advanced   | 0xMacro | ✅ Complete | [Link](https://0xmacro.com/library/audits/polynomial-5.html)                         |
| Account Abstraction | ZeroDev | ✅ Complete | [Link](https://github.com/zerodevapp/kernel/tree/dev/audits)                         |
| Chain Abstraction   | Socket  | ✅ Complete | [Link](https://github.com/SocketDotTech/audits/tree/main/Socket-DL)                  |
| Abstraction Layer   | 0xMacro | ✅ Complete | [Link](https://0xmacro.com/library/audits/polynomial-3)                              |

All audits have been completed with findings resolved, ensuring the highest level of security for all Polynomial users.


# Network Configuration

This page contains technical specifications and configuration details for Polynomial Chain.

## Network Specifications

### Polynomial Chain Mainnet

| Parameter         | Value                       |
| ----------------- | --------------------------- |
| **Chain ID**      | 8008                        |
| **Chain Name**    | Polynomial Chain            |
| **RPC URL**       | `https://rpc.polynomial.fi` |
| **WebSocket URL** | `wss://rpc.polynomial.fi`   |
| **Explorer**      | <https://polynomialscan.io> |
| **Block Time**    | \~2 seconds                 |
| **Gas Token**     | ETH                         |
| **Consensus**     | Proof of Stake              |

### Polynomial Chain Testnet (Sepolia)

| Parameter         | Value                               |
| ----------------- | ----------------------------------- |
| **Chain ID**      | 80008                               |
| **Chain Name**    | Polynomial Chain Sepolia            |
| **RPC URL**       | `https://rpc.sepolia.polynomial.fi` |
| **WebSocket URL** | `wss://rpc.sepolia.polynomial.fi`   |
| **Explorer**      | <https://sepolia.polynomialscan.io> |
| **Block Time**    | \~2 seconds                         |
| **Gas Token**     | ETH                                 |
| **Consensus**     | Proof of Stake                      |

## Wallet Configuration

### MetaMask Configuration

#### Mainnet

```json
{
  "chainId": "0x1F48",
  "chainName": "Polynomial Chain",
  "rpcUrls": ["https://rpc.polynomial.fi"],
  "blockExplorerUrls": ["https://polynomialscan.io"],
  "nativeCurrency": {
    "name": "Ethereum",
    "symbol": "ETH",
    "decimals": 18
  }
}
```

#### Testnet

```json
{
  "chainId": "0x13880",
  "chainName": "Polynomial Chain Sepolia",
  "rpcUrls": ["https://rpc.sepolia.polynomial.fi"],
  "blockExplorerUrls": ["https://sepolia.polynomialscan.io"],
  "nativeCurrency": {
    "name": "Ethereum",
    "symbol": "ETH",
    "decimals": 18
  }
}
```

### WalletConnect Configuration

```typescript
const walletConnectConfig = {
  projectId: 'your-project-id',
  chains: [8008], // Mainnet
  // chains: [80008], // Testnet
  metadata: {
    name: 'Polynomial Trade',
    description: 'Polynomial Trade Application',
    url: 'https://trade.polynomial.fi',
    icons: ['https://trade.polynomial.fi/icon.png']
  }
};
```

## Gas Configuration

### Gas Limits

| Operation                | Gas Limit | Description                  |
| ------------------------ | --------- | ---------------------------- |
| **Simple Transfer**      | 21,000    | Basic ETH transfer           |
| **Token Transfer**       | 65,000    | ERC-20 token transfer        |
| **Contract Interaction** | 100,000   | Basic contract call          |
| **Complex Contract**     | 500,000   | Complex contract interaction |
| **Order Placement**      | 200,000   | Place trading order          |
| **Order Settlement**     | 300,000   | Settle trading order         |
| **Liquidation**          | 400,000   | Liquidate position           |

### Gas Price Recommendations

| Network Condition  | Gas Price (Gwei) | Description          |
| ------------------ | ---------------- | -------------------- |
| **Low Traffic**    | 1-2              | Normal conditions    |
| **Medium Traffic** | 3-5              | Moderate congestion  |
| **High Traffic**   | 6-10             | High congestion      |
| **Critical**       | 11+              | Very high congestion |

## Bridge Configuration

### Supported Networks

| Network      | Chain ID | Bridge Contract                                                                                                       | Status         |
| ------------ | -------- | --------------------------------------------------------------------------------------------------------------------- | -------------- |
| **Ethereum** | 1        | [0x034cbb620d1e0e4C2E29845229bEAc57083b04eC](https://etherscan.io/address/0x034cbb620d1e0e4C2E29845229bEAc57083b04eC) | ✅ Active       |
| **Arbitrum** | 42161    | TBD                                                                                                                   | 🔄 Coming Soon |
| **Optimism** | 10       | TBD                                                                                                                   | 🔄 Coming Soon |
| **Base**     | 8453     | TBD                                                                                                                   | 🔄 Coming Soon |

### Bridge Fees

| Destination  | Bridge Fee | Gas Fee | Total Cost |
| ------------ | ---------- | ------- | ---------- |
| **Ethereum** | $5         | $10-50  | $15-55     |
| **Arbitrum** | $2         | $1-5    | $3-7       |
| **Optimism** | $2         | $1-5    | $3-7       |
| **Base**     | $2         | $1-5    | $3-7       |

## Oracle Configuration

### Pyth Network Integration

| Parameter               | Value                                                                                                                      |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Oracle Contract**     | [0x4a2755b2F675218b55364E1f5928A59ea9c4616d](https://polynomialscan.io/address/0x4a2755b2F675218b55364E1f5928A59ea9c4616d) |
| **Update Frequency**    | Continuous                                                                                                                 |
| **Staleness Tolerance** | 60 seconds                                                                                                                 |
| **Price Feed Count**    | 50+                                                                                                                        |
| **Update Cost**         | 1 wei per feed                                                                                                             |

### Supported Price Feeds

| Asset        | Price ID                                                             | Update Frequency |
| ------------ | -------------------------------------------------------------------- | ---------------- |
| **BTC/USD**  | `0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | Real-time        |
| **ETH/USD**  | `0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | Real-time        |
| **SOL/USD**  | `0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d` | Real-time        |
| **AVAX/USD** | `0x93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7` | Real-time        |

## Smart Contract Configuration

### Account Abstraction

| Parameter                | Value       |
| ------------------------ | ----------- |
| **Entry Point**          | ERC-4337    |
| **Account Factory**      | TBD         |
| **Paymaster**            | TBD         |
| **Gasless Transactions** | ✅ Supported |
| **Batch Transactions**   | ✅ Supported |

### Perpetual Futures

| Parameter            | Value                                                                                                                      |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Market Contract**  | [0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688](https://polynomialscan.io/address/0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688) |
| **Max Leverage**     | 50x                                                                                                                        |
| **Min Order Size**   | $10                                                                                                                        |
| **Max Order Size**   | $1,000,000                                                                                                                 |
| **Settlement Delay** | 1 block (2 seconds)                                                                                                        |

## Security Configuration

### Multi-Signature Wallets

| Contract      | Signatures Required | Total Signers |
| ------------- | ------------------- | ------------- |
| **Treasury**  | 3/5                 | 5             |
| **Emergency** | 2/3                 | 3             |
| **Upgrade**   | 4/5                 | 5             |

### Access Control

| Role         | Permissions        |
| ------------ | ------------------ |
| **Admin**    | Full system access |
| **Operator** | Trading operations |
| **Keeper**   | Order settlement   |
| **Oracle**   | Price updates      |

## Monitoring and Alerts

### Health Checks

| Endpoint            | Frequency | Timeout |
| ------------------- | --------- | ------- |
| **RPC Health**      | 30s       | 5s      |
| **Oracle Health**   | 60s       | 10s     |
| **Bridge Health**   | 120s      | 30s     |
| **Contract Health** | 60s       | 15s     |

### Alert Thresholds

| Metric               | Warning  | Critical |
| -------------------- | -------- | -------- |
| **Block Time**       | >3s      | >5s      |
| **Gas Price**        | >10 Gwei | >20 Gwei |
| **Oracle Staleness** | >30s     | >60s     |
| **Bridge Delay**     | >5min    | >15min   |

## Development Tools

### Hardhat Configuration

```javascript
module.exports = {
  networks: {
    polynomial: {
      url: "https://rpc.polynomial.fi",
      chainId: 8008,
      accounts: [process.env.PRIVATE_KEY]
    },
    polynomialSepolia: {
      url: "https://rpc.sepolia.polynomial.fi",
      chainId: 80008,
      accounts: [process.env.PRIVATE_KEY]
    }
  }
};
```

### Foundry Configuration

```toml
[rpc_endpoints]
polynomial = "https://rpc.polynomial.fi"
polynomialSepolia = "https://rpc.sepolia.polynomial.fi"

[etherscan]
polynomial = { key = "YOUR_API_KEY", url = "https://polynomialscan.io/api" }
polynomialSepolia = { key = "YOUR_API_KEY", url = "https://sepolia.polynomialscan.io/api" }
```

## Troubleshooting

### Common Issues

#### Connection Issues

* **RPC Timeout:** Increase timeout settings
* **Rate Limiting:** Implement request queuing
* **Network Congestion:** Use higher gas prices

#### Transaction Issues

* **Gas Estimation:** Use proper gas estimation
* **Nonce Management:** Handle nonce conflicts
* **Transaction Replacement:** Implement RBF (Replace By Fee)

### Debug Tools

```typescript
// Enable debug logging
const provider = new ethers.providers.JsonRpcProvider('https://rpc.polynomial.fi', {
  name: 'polynomial',
  chainId: 8008
});

// Add debug event listeners
provider.on('debug', (info) => {
  console.log('Debug:', info);
});
```

## Best Practices

1. **Connection Management:** Use connection pooling
2. **Error Handling:** Implement comprehensive error handling
3. **Retry Logic:** Implement exponential backoff
4. **Monitoring:** Monitor network health
5. **Security:** Use secure RPC endpoints
6. **Performance:** Optimize for low latency

## Support

* **Discord:** [Polynomial Discord](https://discord.gg/polynomial)
* **Documentation:** [Technical Docs](https://docs.polynomial.fi)
* **Support:** [Support Team](mailto:support@polynomial.fi)

***

*Network configuration is subject to change. Always check for updates and monitor official announcements.*


# Market Hours

Polynomial offers perps markets across **crypto**, **indices**, **metals**, **commodities**, and **forex**.\
All market hours are determined based on **Pyth price feeds** and follow the **standard trading hours of traditional markets**.

### **Trading Hours**

<table><thead><tr><th width="189">Category</th><th width="249.8671875">Trading Hours (ET)</th><th>Exceptions</th></tr></thead><tbody><tr><td>Crypto</td><td><strong>24/7</strong></td><td>No market close</td></tr><tr><td><strong>US Equities (Indices)</strong></td><td>Every weekday from <strong>9:30 AM – 4:00 PM ET</strong></td><td>Markets are closed on weekends, and follow <a href="https://www.nyse.com/markets/hours-calendars">NYSE Holidays &#x26; Trading Hours</a></td></tr><tr><td><strong>Metals</strong></td><td>From <strong>Sunday 6:00 PM ET to Friday 5:00 PM ET</strong></td><td>Daily maintenance window applies from 5PM ET to 6PM ET, Monday to Thursday. Spot gold and silver trading also follow <a href="https://www.cmegroup.com/tools-information/holiday-calendar.html">CME holiday closures</a></td></tr><tr><td><strong>Commodities</strong></td><td>WTI: From Sunday 6PM ET to Friday 5PM ET</td><td>Daily maintenance window applies from 5PM ET to 6PM ET and follow <a href="https://www.cmegroup.com/tools-information/holiday-calendar.html">CME Holidays</a></td></tr><tr><td><strong>Forex</strong></td><td>From Sunday 5PM ET to Friday 5PM ET</td><td>Trading continues during most US holidays</td></tr></tbody></table>

#### **Notes (For Non-Crypto Pairs)**

* You cannot increase or open a new position within 30 minutes prior to market close, but you can reduce or fully close your position during this period.
* **High-leverage positions (10x or above)** are **automatically closed 30 minutes before market close** to prevent overnight exposure during off-market hours.
* During market closed hours, no trading activity is allowed - you cannot open, modify, or close positions. Unrealized PnL continues to update, but trading resumes only when the market reopens.


# What is Polynomial Chain?

This page explains the technical architecture and design principles behind Polynomial Chain.

## Overview

Polynomial Chain is a purpose-built blockchain designed specifically for decentralized perpetual futures trading. It combines the benefits of a dedicated trading infrastructure with the security and decentralization of blockchain technology.

### **Key Design Principles**

* **Trading-First:** Optimized specifically for perpetual futures trading
* **High Performance:** Sub-2-second block times for fast execution
* **Cost Efficient:** Low transaction costs for frequent trading
* **Secure:** Robust security with battle-tested components
* **Scalable:** Designed to handle high trading volumes

## Architecture Components

### **1. Consensus Layer**

* **Proof of Stake:** Energy-efficient consensus mechanism
* **Validator Network:** Decentralized validator network
* **Finality:** Fast finality for trading operations
* **Security:** Economic security through staking

### **2. Execution Layer**

* **EVM Compatibility:** Full Ethereum Virtual Machine compatibility
* **Smart Contracts:** Native support for complex trading logic
* **Gas Optimization:** Optimized gas costs for trading operations
* **Account Abstraction:** Native support for smart wallets

### **3. Data Layer**

* **State Management:** Efficient state management for trading data
* **Storage:** Optimized storage for position and order data
* **Indexing:** Fast indexing for trading queries
* **Archival:** Long-term data archival and retrieval

### **4. Networking Layer**

* **P2P Network:** Peer-to-peer networking for decentralization
* **RPC Interface:** Standard RPC interface for client connections
* **WebSocket Support:** Real-time data streaming
* **API Gateway:** RESTful API for trading operations

## Native Liquidity Layer

### **Unified Liquidity System**

Polynomial Chain features a native liquidity layer that provides:

* **Cross-Margin Trading:** Shared collateral across all positions
* **Unified Pools:** Single liquidity pool for all markets
* **Efficient Capital:** Maximum capital efficiency
* **Risk Management:** Portfolio-wide risk management

### **How It Works**

1. **Deposit Assets:** Users deposit assets into the unified pool
2. **Shared Collateral:** All assets serve as collateral for all positions
3. **Cross-Margin:** Positions share margin requirements
4. **Portfolio Management:** Unified portfolio management and risk

### **Benefits**

* **Capital Efficiency:** Use all assets as collateral
* **Risk Management:** Portfolio-wide liquidation protection
* **Simplified Management:** Single account for all trading
* **Lower Costs:** Reduced margin requirements

## Hybrid Orderbook System (Fusion)

### **Combined Architecture**

Polynomial Chain uses a hybrid orderbook system that combines:

* **Central Limit Order Book (CLOB):** Traditional order matching
* **Automated Market Maker (AMM):** Liquidity provision
* **Dynamic Switching:** Automatic switching between modes
* **Optimal Execution:** Best execution for all order types

### **CLOB Mode**

* **Order Matching:** Traditional order matching engine
* **Price Discovery:** Efficient price discovery
* **Liquidity:** Requires active market makers
* **Execution:** Immediate execution when matched

### **AMM Mode**

* **Liquidity Provision:** Automated liquidity provision
* **Price Formula:** Mathematical price formula
* **Always Available:** Liquidity always available
* **Slippage:** Predictable slippage based on size

### **Dynamic Switching**

* **Market Conditions:** Switches based on market conditions
* **Liquidity Levels:** Switches based on liquidity levels
* **Order Types:** Different modes for different order types
* **Optimization:** Optimizes for best execution

## Account Abstraction

### **Smart Wallet Integration**

Polynomial Chain natively supports account abstraction:

* **Smart Wallets:** Programmable wallet contracts
* **Gasless Transactions:** Sponsored transaction fees
* **Batch Operations:** Multiple operations in one transaction
* **Advanced Orders:** Complex order types and conditions

### **Benefits**

* **User Experience:** Simplified user experience
* **Gas Management:** Automatic gas management
* **Security:** Enhanced security features
* **Flexibility:** Programmable wallet logic

### **Implementation**

* **ERC-4337:** Standard account abstraction
* **Entry Point:** Centralized entry point for transactions
* **Paymaster:** Gas sponsorship system
* **Account Factory:** Smart wallet creation

## Oracle Integration

### **Pyth Network Integration**

Polynomial Chain integrates with Pyth Network for price feeds:

* **Real-time Prices:** Sub-second price updates
* **High Accuracy:** Institutional-grade price data
* **Multiple Sources:** Aggregated from multiple sources
* **Low Latency:** Minimal latency for trading

### **Price Feed Architecture**

* **On-chain Storage:** Price data stored on-chain
* **Update Mechanism:** Continuous price updates
* **Validation:** Price validation and verification
* **Fallback:** Fallback mechanisms for reliability

### **Benefits**

* **Accuracy:** High accuracy price data
* **Speed:** Fast price updates
* **Reliability:** Reliable price feeds
* **Transparency:** Transparent price sources

## Security Architecture

### **Multi-Layer Security**

Polynomial Chain implements multiple security layers:

* **Consensus Security:** Proof of stake consensus
* **Smart Contract Security:** Audited smart contracts
* **Oracle Security:** Secure oracle integration
* **Network Security:** Secure networking protocols

### **Risk Management**

* **Liquidation System:** Automated liquidation system
* **Margin Requirements:** Dynamic margin requirements
* **Position Limits:** Position size limits
* **Circuit Breakers:** Emergency circuit breakers

### **Audit and Verification**

* **Smart Contract Audits:** Regular security audits
* **Code Review:** Continuous code review
* **Penetration Testing:** Regular penetration testing
* **Bug Bounty:** Active bug bounty program

## Performance Optimization

### **Blockchain Optimization**

* **Block Time:** 2-second block times
* **Gas Optimization:** Optimized gas costs
* **State Management:** Efficient state management
* **Transaction Throughput:** High transaction throughput

### **Trading Optimization**

* **Order Matching:** Fast order matching
* **Price Updates:** Real-time price updates
* **Position Management:** Efficient position management
* **Risk Calculation:** Fast risk calculations
* **Execution Speed:** 2-4 second market order execution (3-5x faster than traditional AMMs)

### **Execution Speed**

Polynomial Chain delivers 2-4 second market order execution - 3-5x faster than traditional AMMs (7-11 seconds).

### **Network Optimization**

* **Latency:** Low network latency
* **Bandwidth:** Optimized bandwidth usage
* **Caching:** Intelligent caching strategies
* **CDN:** Content delivery network integration

## Scalability

### **Horizontal Scaling**

* **Validator Scaling:** Additional validators
* **Sharding:** Future sharding implementation
* **Sidechains:** Sidechain integration
* **Layer 2:** Layer 2 solutions

### **Vertical Scaling**

* **Hardware Optimization:** Optimized hardware
* **Software Optimization:** Optimized software
* **Algorithm Optimization:** Optimized algorithms
* **Resource Management:** Efficient resource management

## Interoperability

### **Cross-Chain Integration**

* **Bridge Protocols:** Secure bridge protocols
* **Asset Transfers:** Cross-chain asset transfers
* **Message Passing:** Cross-chain message passing
* **Unified Experience:** Unified user experience

### **Standard Compliance**

* **EVM Compatibility:** Full EVM compatibility
* **ERC Standards:** ERC token standards
* **Web3 Standards:** Web3 protocol standards
* **API Standards:** Standard API interfaces

## Development and Deployment

### **Development Tools**

* **SDKs:** Software development kits
* **APIs:** RESTful and WebSocket APIs
* **Documentation:** Comprehensive documentation
* **Testing:** Testing frameworks and tools

### **Deployment Process**

* **Smart Contract Deployment:** Automated deployment
* **Configuration Management:** Configuration management
* **Monitoring:** Comprehensive monitoring
* **Maintenance:** Regular maintenance procedures

## Future Roadmap

### **Short-term Improvements**

* **Performance:** Further performance optimizations
* **Features:** Additional trading features
* **Integration:** More exchange integrations
* **Tools:** Enhanced development tools

### **Long-term Vision**

* **Global Scale:** Global trading infrastructure
* **Advanced Features:** Advanced trading features
* **Ecosystem:** Rich ecosystem of applications
* **Innovation:** Continuous innovation and improvement

## Technical Specifications

### **Network Parameters**

* **Block Time:** 2 seconds
* **Block Size:** 2MB
* **Gas Limit:** 30M gas per block
* **Validator Count:** 100+ validators

### **Performance Metrics**

* **TPS:** 1000+ transactions per second
* **Latency:** <100ms average latency
* **Finality:** 2-second finality
* **Uptime:** 99.9% uptime target

## Getting Started

### **For Developers**

1. [**Network Configuration**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/reference/network-config.md) - Set up development environment
2. [**API Documentation**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/reference/trading-api.md) - Access trading APIs
3. [**Contract Addresses**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/reference/contract-addresses.md) - Get contract addresses
4. [**SDK Integration**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/reference/sdk/integration-guides.md) - Use official SDKs

### **For Traders**

1. [**Wallet Setup Guide**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/wallet-setup.md) - Set up your wallet
2. [**Complete Trading Guide**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/trading.md) - Trading guides
3. [**Complete Staking Guide**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/staking.md) - Staking guides
4. [**Support**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/support/faq.md) - FAQ and support

## Related Resources

* [**Liquidity Layer**](/explanations/liquidity-layer) - Understanding the liquidity system
* [**Cross-Margin Trading**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/trading/cross-margin.md) - Cross-margin explanation
* [**Smart Wallets**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/getting-started/smart-wallets.md) - Smart wallet guide
* [**Network Configuration**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/reference/network-config.md) - Technical setup

***

*Polynomial Chain represents the next generation of decentralized trading infrastructure, combining the best of traditional finance with the innovation of blockchain technology.*


# How Liquidity Layer Works

Polynomial Chain's native liquidity layer provides a unified solution that enhances capital efficiency, user experience, and security for the entire ecosystem.

## What is the Liquidity Layer?

The liquidity layer is a unified pool of liquidity that serves as the foundation for all financial products built on Polynomial Chain. Instead of fragmented liquidity across different protocols, all applications share the same liquidity pool.

### Core Features

* **Unified Pool:** Single liquidity pool for all products
* **Shared Capital:** Liquidity providers' capital used across multiple protocols
* **Dynamic Allocation:** Capital automatically allocated based on demand
* **Ecosystem Integration:** All dApps built on Polynomial Chain can access the same liquidity

## How the Liquidity Layer Works

### Unified Liquidity Pool

* **Single Source:** One pool serves all financial products
* **Dynamic Distribution:** Capital flows to where it's needed most
* **Efficient Allocation:** No capital sitting idle in unused pools
* **Scalable Infrastructure:** Supports high-volume trading and complex instruments

### Asset Integration

* **Supported Assets:** USDC, sDAI, sUSDe, and more
* **Future Expansion:** Plans to add fluid USD and other assets
* **Cross-Asset Support:** Multiple asset types in the same pool
* **Liquidity Depth:** Deep liquidity for all supported assets

### Delta-Neutral Strategy

* **Risk Management:** Delta-neutral approach to minimize risk
* **Proven Success:** Successfully used on Optimism with over $2.2 million in fees
* **Stable Returns:** Consistent returns for liquidity providers
* **Market Making:** Provides liquidity to traders

### Yield Markets

To further improve capital efficiency, a portion of the liquidity layer may be allocated to external yield markets when capital is not actively required for trading or other on-chain activities.

These allocations are **fully managed by Polynomial at the protocol level**. Users do not need to take any action beyond depositing funds into the liquidity layer - **Polynomial handles all capital allocation, rebalancing, and risk management in the backend**.

Currently, these allocations are deployed into **Fluid lending markets**, with the flexibility to integrate additional venues over time. These allocations generate additional  yield while preserving liquidity availability

For the first yield market integration, Polynomial partnered with **Fluid**, a leading onchain lending protocol with a strong track record in security and capital efficiency.

**Why Fluid**

* **$5B+ in total value locked**, supporting large-scale liquidity needs
* **8+ years of experience** building DeFi infrastructure, with **no historical loss of user funds**
* **Multiple independent security audits** across core contracts
* **Proven scale**, powering billions of dollars in lending volume

Fluid’s focus on conservative risk management and robust infrastructure aligns closely with Polynomial’s approach to capital safety and liquidity preservation.

**How Yield Markets Work**

* **Partial Allocation:** **Partial Allocation:** A configurable portion of liquidity (typically ranging from **10% to 30%**) may be allocated to **Fluid lending markets**
* **Dynamic Allocation:** Allocation levels adjust based on system demand and risk parameters
* **Non-Disruptive:** Allocations do **not affect withdrawals, margin availability, or trading performance**
* **Passive Yield:** Generates additional yield (approximately **\~3%**) on otherwise idle capital

**Design Principles**

* **Capital Safety First:** Allocations prioritize conservative, established lending markets
* **Liquidity Preservation:** Core liquidity remains immediately available for protocol usage
* **Unified Returns:** Yield flows back into the liquidity layer, benefiting liquidity providers system-wide

## Benefits

### Capital Efficiency

* **Dynamic Usage:** Capital used across various protocols and dApps
* **No Fragmentation:** Prevents liquidity fragmentation across individual pools
* **Maximum Utilization:** All capital actively deployed
* **Higher Returns:** Better returns through efficient capital use

### Seamless User Experience

* **Unified Interface:** Single interface for all financial products
* **No Asset Movement:** No need to move assets between separate pools
* **Reduced Complexity:** Simplified user experience
* **Lower Costs:** Reduced transaction times and costs

### Enhanced Security and Trust

* **Native Integration:** Built into the chain for maximum security
* **Audited Contracts:** All contracts are audited and secure
* **Transparent Operations:** All operations are transparent and verifiable
* **Trustless System:** No need to trust third parties

## Use Cases

### Trading

* **Perpetual Futures:** High-volume perpetual trading
* **Spot Trading:** Traditional spot trading
* **Options Trading:** Complex options strategies
* **Cross-Margin:** Unified margin across all positions

### Lending and Borrowing

* **Lending Pools:** Provide liquidity for lending
* **Borrowing Markets:** Access to borrowed funds
* **Interest Rate Optimization:** Dynamic interest rates
* **Collateral Management:** Efficient collateral usage

## Liquidity Provider Benefits

### Revenue Generation

* **Trading Fees:** Earn from trading activity
* **Lending Fees:** Earn from lending activities
* **Protocol Fees:** Earn from protocol usage
* **Yield Markets:** Earn additional yield from capital allocated to external lending markets.
* **Incentive Programs:** Additional rewards for participation

### Risk Management

* **Diversification:** Diversified exposure across multiple protocols
* **Delta Neutral:** Minimized directional risk
* **Professional Management:** Professional risk management
* **Transparent Operations:** Full transparency in operations

## Next Steps

* [**How to Provide Liquidity**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/staking.md) - Start providing liquidity
* [**Understanding Rewards**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/staking-points.md) - Learn about rewards
* [**Risk Management**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/debt-mechanism.md) - Protect your capital
* [**Ecosystem Overview**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/polynomial-chain.md) - Learn about the broader ecosystem


# Cross Margin vs Isolated Margin

Cross-margin uses your entire account balance as collateral for all positions, maximizing capital efficiency.

## How It Works

Your total account balance serves as collateral for all open positions, allowing you to:

* Share margin across all positions
* Maximize capital efficiency
* Offset losses with profits from other positions

## Benefits

**Capital Efficiency:** Use your entire account balance for trading **Risk Management:** Profits in one position can offset losses in others **Flexibility:** Easy to manage multiple positions with shared margin **Lower Requirements:** Reduced total margin needed across portfolio

## Cross-Margin vs Isolated Margin

| Feature                | Cross-Margin                | Isolated Margin            |
| ---------------------- | --------------------------- | -------------------------- |
| **Collateral**         | Shared across all positions | Separate for each position |
| **Risk**               | Portfolio-wide              | Individual position        |
| **Liquidation**        | All positions at risk       | Only specific position     |
| **Capital Efficiency** | High                        | Lower                      |

## Risk Management

**Monitor Portfolio Risk:** Track overall account exposure and position correlations **Position Sizing:** Limit individual position risk and avoid over-concentration **Stop Losses:** Use stop-losses for individual positions **Diversification:** Spread risk across different markets

## Best Practices

* Set maximum position sizes
* Monitor portfolio risk regularly
* Diversify across uncorrelated markets
* Use proper position sizing methods
* Monitor total account equity

## Next Steps

* [**How to Use Cross-Margin**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/trading.md) - Practical implementation
* [**Risk Management Guide**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/debt-mechanism.md) - Protect your capital
* [**Multi-Collateral Trading**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/multi-collateral.md) - Asset diversification


# Multi-Collateral Trading

This page explains how multi-collateral trading works on Polynomial and its benefits.

## Overview

Multi-collateral trading allows you to use multiple different assets as collateral for your trading positions. Instead of being limited to a single asset, you can deposit various supported tokens and use them collectively to support your trading activities.

### **Key Benefits**

* **Diversification:** Use multiple assets as collateral
* **Capital Efficiency:** Maximize use of available assets
* **Flexibility:** Choose from various supported assets
* **Risk Management:** Diversify collateral risk

## Supported Collateral Assets

### **Primary Assets**

* **USDC:** USD Coin - Most liquid and stable
* **sDAI:** Savings DAI - Yield-bearing DAI
* **sUSDe:** Savings USDe - Yield-bearing USDe
* **ETH:** Ethereum - Native gas token

### **Asset Characteristics**

| Asset     | Type          | Yield    | Stability | Liquidity |
| --------- | ------------- | -------- | --------- | --------- |
| **USDC**  | Stablecoin    | None     | High      | Very High |
| **sDAI**  | Yield-bearing | \~5% APY | High      | High      |
| **sUSDe** | Yield-bearing | \~8% APY | High      | High      |
| **ETH**   | Volatile      | None     | Medium    | High      |

## How Multi-Collateral Works

### **Unified Collateral Pool**

1. **Deposit Assets:** Deposit multiple assets into your account
2. **Unified Pool:** All assets become part of a unified collateral pool
3. **Shared Margin:** All assets contribute to margin requirements
4. **Cross-Margin:** Use any asset to support any position

### **Collateral Calculation**

```typescript
// Total collateral value calculation
function calculateTotalCollateral(assets: Asset[]) {
  let totalValue = 0;
  
  for (const asset of assets) {
    const value = asset.balance * asset.price * asset.collateralFactor;
    totalValue += value;
  }
  
  return totalValue;
}

// Example calculation
const assets = [
  { balance: 1000, price: 1.00, collateralFactor: 1.0 }, // USDC
  { balance: 500, price: 1.05, collateralFactor: 0.95 },  // sDAI
  { balance: 0.5, price: 3000, collateralFactor: 0.9 }    // ETH
];

const totalCollateral = calculateTotalCollateral(assets);
// Result: $1000 + $498.75 + $1350 = $2848.75
```

## Collateral Factors

### **Risk-Based Factors**

Each asset has a collateral factor that determines how much of its value can be used as collateral:

| Asset     | Collateral Factor | Risk Level  |
| --------- | ----------------- | ----------- |
| **USDC**  | 1.0 (100%)        | Low Risk    |
| **sDAI**  | 0.95 (95%)        | Low Risk    |
| **sUSDe** | 0.9 (90%)         | Medium Risk |
| **ETH**   | 0.9 (90%)         | High Risk   |

### **Dynamic Adjustment**

Collateral factors can be adjusted based on:

* **Market Conditions:** Volatility and liquidity
* **Asset Performance:** Historical performance
* **Risk Assessment:** Ongoing risk assessment
* **Protocol Updates:** Protocol improvements

## Position Management

### **Cross-Margin Positions**

With multi-collateral, all positions share the same collateral pool:

```typescript
// Position margin calculation
function calculatePositionMargin(position: Position, totalCollateral: number) {
  const requiredMargin = position.size * position.leverage / 100;
  const availableMargin = totalCollateral - usedMargin;
  
  return {
    required: requiredMargin,
    available: availableMargin,
    utilization: requiredMargin / totalCollateral
  };
}
```

### **Portfolio Management**

* **Unified View:** See all positions and collateral in one view
* **Risk Monitoring:** Monitor portfolio-wide risk
* **Liquidation Protection:** Portfolio-wide liquidation protection
* **Optimization:** Optimize collateral allocation

## Yield Generation

### **Yield-Bearing Assets**

Some collateral assets generate yield while being used as collateral:

* **sDAI:** Earns \~5% APY from DAI savings
* **sUSDe:** Earns \~8% APY from USDe savings
* **Automatic Compounding:** Yield automatically compounds
* **Real-time Updates:** Yield updates in real-time

### **Yield Calculation**

```typescript
// Yield calculation for yield-bearing assets
function calculateYield(asset: Asset, timeElapsed: number) {
  if (!asset.yieldRate) return 0;
  
  const annualYield = asset.balance * asset.yieldRate;
  const timeFraction = timeElapsed / (365 * 24 * 60 * 60); // Convert to years
  
  return annualYield * timeFraction;
}
```

## Risk Management

### **Collateral Risk**

Different assets carry different risks:

* **Stablecoin Risk:** Risk of depegging
* **Volatility Risk:** Price volatility risk
* **Liquidity Risk:** Liquidity availability risk
* **Smart Contract Risk:** Smart contract risk

### **Risk Mitigation**

* **Diversification:** Diversify across multiple assets
* **Monitoring:** Monitor asset performance
* **Rebalancing:** Rebalance collateral allocation
* **Emergency Procedures:** Emergency liquidation procedures

## Liquidation Mechanics

### **Portfolio Liquidation**

Liquidation considers the entire portfolio:

1. **Total Value:** Calculate total portfolio value
2. **Required Margin:** Calculate total required margin
3. **Liquidation Threshold:** Check against liquidation threshold
4. **Liquidation Process:** Liquidate positions if needed

### **Liquidation Priority**

1. **High-Risk Positions:** Liquidate high-risk positions first
2. **Asset Priority:** Liquidate based on asset priority
3. **Size Priority:** Liquidate larger positions first
4. **Time Priority:** Liquidate older positions first

## Best Practices

### **Collateral Allocation**

* **Diversification:** Diversify across multiple assets
* **Stability:** Use stable assets for core collateral
* **Yield Optimization:** Use yield-bearing assets when appropriate
* **Risk Management:** Monitor and manage risk

### **Position Management**

* **Size Control:** Control position sizes relative to collateral
* **Leverage Management:** Use appropriate leverage levels
* **Monitoring:** Continuously monitor positions
* **Rebalancing:** Rebalance when needed

### **Risk Management**

* **Stop Losses:** Use stop losses for risk management
* **Position Limits:** Set position size limits
* **Collateral Monitoring:** Monitor collateral values
* **Emergency Plans:** Have emergency plans ready

## Advanced Strategies

### **Yield Farming**

* **Deposit Yield Assets:** Deposit yield-bearing assets
* **Earn Yield:** Earn yield while trading
* **Compound Returns:** Compound trading and yield returns
* **Risk Management:** Manage both trading and yield risk

### **Arbitrage Opportunities**

* **Cross-Asset Arbitrage:** Arbitrage between different assets
* **Yield Arbitrage:** Arbitrage yield rates
* **Liquidity Arbitrage:** Arbitrage liquidity differences
* **Risk Arbitrage:** Arbitrage risk premiums

### **Portfolio Optimization**

* **Asset Allocation:** Optimize asset allocation
* **Risk-Return:** Balance risk and return
* **Correlation:** Consider asset correlations
* **Rebalancing:** Regular rebalancing

## Monitoring and Analytics

### **Portfolio Metrics**

* **Total Value:** Total portfolio value
* **Collateral Utilization:** Collateral utilization rate
* **Yield Earned:** Total yield earned
* **Risk Metrics:** Various risk metrics

### **Asset Performance**

* **Individual Performance:** Performance of individual assets
* **Correlation Analysis:** Asset correlation analysis
* **Yield Tracking:** Yield tracking and analysis
* **Risk Analysis:** Risk analysis and monitoring

## Troubleshooting

### **Common Issues**

#### **Insufficient Collateral**

* **Add More Assets:** Deposit additional assets
* **Reduce Positions:** Reduce position sizes
* **Optimize Allocation:** Optimize collateral allocation
* **Monitor Values:** Monitor asset values

#### **High Risk**

* **Diversify:** Diversify across more assets
* **Reduce Leverage:** Reduce leverage levels
* **Add Stable Assets:** Add more stable assets
* **Monitor Closely:** Monitor positions closely

### **Getting Help**

* **FAQ:** Check [FAQ](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/support/faq.md) for common questions
* **Support:** Contact support for assistance
* **Community:** Ask community for advice
* **Documentation:** Review documentation

## Next Steps

After understanding multi-collateral trading:

1. [**How to Use Cross Margin**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/trading/cross-margin.md) - Learn to use cross-margin
2. [**Debt Mechanism**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/debt-mechanism.md) - Learn risk management
3. [**Portfolio Management**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/trading/portfolio-management.md) - Manage your portfolio
4. [**Advanced Strategies**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/advanced.md) - Advanced trading strategies

## Important Reminders

* **Diversify:** Always diversify your collateral
* **Monitor Risk:** Continuously monitor risk
* **Manage Leverage:** Use appropriate leverage levels
* **Stay Informed:** Keep up with asset updates

***

*Multi-collateral trading provides flexibility and efficiency, but requires careful risk management. Always understand the risks and monitor your positions closely.*


# Hybrid Orderbook System

Polynomial Trade features the world's first hybrid orderbook + AMM system, combining the best of both execution models.

## System Overview

### Dual Execution Paths

* **Orderbook (CLOB)**: 200ms latency, built in Rust, fully audited
* **AMM**: Oracle-based for guaranteed liquidity and zero slippage on large trades
* **Intelligent routing**: System automatically chooses the best execution path

### Execution Logic

* **Limit orders** → Orderbook (for precision and price control)
* **Market orders** → AMM (for guaranteed liquidity)
* **Large trades** → AMM (zero slippage on big positions)

## Technical Specifications

### Central Limit Order Book (CLOB)

* **Latency**: 200ms (faster than a blink)
* **Technology**: Built in Rust for maximum performance
* **Security**: Fully audited by Macro Security and Octane Security
* **Capacity**: Handles high-frequency trading like a pro

### AMM Integration

* **Oracle-based**: Uses Pyth Network for price feeds
* **Guaranteed liquidity**: Always available for market orders
* **Zero slippage**: Large trades execute without price impact
* **Dynamic pricing**: Adjusts based on market conditions

## Pyth Lazer Integration

### Performance Improvements

* **1ms price updates** (vs. 400ms+ elsewhere)
* **\~70ms end-to-end latency** vs Binance
* **Negative latency possible** at times

### Benefits

* **Eliminates toxic flow**: No more arbitrageurs exploiting stale prices
* **Tight spreads**: AMMs can run with minimal spreads
* **Low fees**: Reduced fees due to better price accuracy
* **CEX-quality execution**: DeFi transparency with centralized exchange performance

## Market Evolution

### Early Markets

* **AMM dominates**: Provides liquidity bootstrapping
* **Higher spreads**: Necessary for initial liquidity provision

### Mature Markets

* **Orderbook dominates**: More efficient price discovery
* **Tighter spreads**: Better execution for all users

### Adaptive System

* **Real-time optimization**: System adapts to market conditions
* **Automatic routing**: No user intervention required
* **Best execution**: Always delivers optimal fills

## Fast Execution Architecture

### The Speed Problem in Traditional AMMs

Traditional AMM trades are notoriously slow, taking 7-11 seconds to execute a single trade:

* **User confirms order on-chain**: \~500ms-7s
* **Chain confirmation**: 2-3s
* **Keeper execution**: 2-3s
* **Total**: Up to 11 seconds per trade

In volatile markets, this delay is an eternity for traders trying to close positions quickly.

### Polynomial's Solution: Optimized Order Flow

Polynomial's architecture cuts execution time down to 2-4 seconds - a 3-5x improvement over traditional AMMs.

#### **How It Works**

Instead of sending orders on-chain first, our optimized flow works differently:

1. **Direct Keeper Routing**: Orders go straight to the keeper
2. **Price Fetching**: Keeper fetches current market price
3. **On-chain Execution**: Keeper executes the trade on-chain
4. **Instant Confirmation**: User receives immediate confirmation

#### **Key Benefits**

* **Lightning-fast executions**: 2-4 second execution times
* **Better user experience**: No more waiting for slow confirmations
* **Reduced slippage**: Faster execution means less price movement
* **More competitive with CEXs**: Closing the gap with centralized exchanges
* **Higher capital efficiency**: Faster position management
* **Lower risk during volatile markets**: Quick exits when needed

### Future Optimizations

With upcoming optimizations like flash blocks, Polynomial could potentially reduce execution times to under 200ms - faster than some centralized exchanges.

This represents a key moment in DeFi's evolution, where fast execution - traditionally CEX's killer advantage over DEXs - is becoming a reality in decentralized trading.

## Future Enhancements

### Dynamic Routing (Coming Soon)

Market orders will intelligently split between orderbook and AMM based on:

* **Current liquidity depth**: Real-time assessment of available liquidity
* **Trade size**: Optimal routing based on position size
* **Spread analysis**: Real-time spread comparison
* **Market conditions**: Adaptive routing based on volatility

### Benefits

* **Maximum efficiency**: Optimal execution for every trade
* **Zero thinking required**: System handles all optimization
* **Better fills**: Improved execution quality across all market conditions


# Understanding Funding Velocity

Polynomial uses a unique "Funding Rate Velocity" model that provides more stable and predictable funding mechanisms.

## What is Funding Velocity?

Funding Rate Velocity continuously changes funding rates on a block-by-block basis, based on position imbalances. This approach smooths out funding rate trajectories.

### Key Features

* **Dynamic Rates:** Funding rates change continuously, not at fixed intervals
* **Position-Based:** Rates based on actual position imbalances
* **Smooth Trajectories:** Gradual changes instead of sudden jumps
* **Zero-Sum:** LPs neither gain nor lose funding over time

### Mathematical Model

```
dr/dt = c × skew
```

Where:

* `dr/dt` is the funding rate velocity
* `c` is the velocity coefficient
* `skew = (long_positions - short_positions) / skew_scale`

## How Funding Velocity Works

### Rate Calculation

* **Skew Analysis:** Analyzes imbalance between long and short positions
* **Velocity Calculation:** Calculates rate of change using dr/dt = c × skew
* **Continuous Updates:** Updates every block based on current conditions
* **Smooth Transitions:** Gradual rate changes over time

### Position Imbalance Response

* **Long Skew:** More long positions → funding rate velocity increases (rates drift higher)
* **Short Skew:** More short positions → funding rate velocity increases (rates drift lower)
* **Neutral Skew:** Balanced positions → funding rate velocity is zero (rates remain stable)

## Benefits

### Stability

* **Smooth Transitions:** No sudden jumps in funding rates
* **Predictable Changes:** Gradual rate adjustments
* **Reduced Volatility:** Less volatile funding rate environment

### Fairness

* **Position-Based:** Rates reflect actual market conditions
* **Real-Time Updates:** Immediate response to market changes
* **Transparent Calculation:** Clear and understandable rate calculation

### Efficiency

* **Continuous Updates:** Real-time rate adjustments
* **Optimal Pricing:** Rates reflect true market conditions
* **Reduced Arbitrage:** Fewer arbitrage opportunities

## Comparison with Traditional Funding

| Feature                     | Traditional Funding       | Funding Velocity    |
| --------------------------- | ------------------------- | ------------------- |
| **Update Frequency**        | Fixed intervals (8 hours) | Every block         |
| **Rate Changes**            | Sudden jumps              | Gradual adjustments |
| **Volatility**              | High                      | Low                 |
| **Arbitrage Opportunities** | Many                      | Fewer               |

## Practical Implications

### For Traders

* **Predictable Costs:** More predictable funding costs
* **Better Planning:** Easier to plan funding expenses
* **Fair Pricing:** More transparent pricing

### For Liquidity Providers

* **Stable Returns:** More stable returns from funding
* **Risk Management:** Better risk management through stable rates
* **Predictable Income:** More predictable income streams

## Next Steps

* [**How to Use Funding Rates**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/trading.md) - Practical implementation
* [**Advanced Trading Strategies**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/advanced.md) - Advanced strategies
* [**Risk Management**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/debt-mechanism.md) - Protect your capital


# Staking Points System

The Staking Points system rewards users for contributing to the Polynomial Chain ecosystem. The more you participate by staking your assets, the more points you'll earn.

## How It Works

### Earning Points

You automatically earn Staking Points every second based on:

* **Amount staked** (bigger stake = more points)
* **Duration of stake** (longer stake = more points)
* **Early participation** (higher boost for early believers)

### Points Formula

```
Points = Score × Boost
```

![Staking Points Formula](https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2F7JxmDgMUmviI2vFZwRZJ%2FScreenshot%202024-06-20%20at%201.24.58%E2%80%AFPM.png?alt=media\&token=7a8d87d7-98f6-4e9c-ac34-84b323db1d8a)

## Score System

The score is the core of the Staking Points system. It increases by the amount of deposited collateral every hour.

**Example:** If Alice stakes 1000 USDC into Polynomial, she will earn 1 score per hour.

## Boost System

Boost is a multiplier that increases your Staking Points, serving as a bonus for staking over longer periods.

### Early Staker Boost

* **Duration:** 14-day Liquidity Generation Window
* **Range:** 1.5x on day 1, decreasing to 1x by day 14
* **Benefit:** The earlier you deposit, the higher the boost

### Season Boost

* **Activation:** After the 14-day ILE period ends
* **Duration:** Increases linearly over 1 month
* **Starting:** 0.5x boost
* **Maximum:** 2x total boost (combined with Early Staker Boost)

### Maximum Boost Cap

The maximum boost is capped at **2x**. When you unstake, your boost decreases proportionally to the amount unstaked (not withdrawn), but you keep accumulated scores.

![Boost System](https://1885489934-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsoBeMs8iG5iHQZLySQ4O%2Fuploads%2FDG6X9Vxwi3a2EwepFwyW%2FScreenshot%202024-06-20%20at%202.18.31%E2%80%AFPM.png?alt=media\&token=c1933526-2733-4cfb-aa27-0b4683c0acb6)

## Example Calculation

Alice deposits 1000 USDC within the first few minutes of the deposit window:

1. **Early Staker Boost:** 1.5x
2. **After 1 month:** Season Boost reaches 2x total
3. **Final Points:** `score × 2 (boost)`

## Withdrawal Impact

Withdrawing from the Polynomial Pool during the 14-day ILE period will:

* Decrease your boost proportionally to the amount unstaked
* Preserve accumulated scores
* Forfeit future boost benefits for the withdrawn amount

## Fair Reward System

The Staking Points program is designed to be fair and rewarding:

* **Reward valuable contributions:** Users who help the network grow organically are rewarded most
* **Balance contribution size:** Both large and small stakers are rewarded appropriately
* **Encourage long-term commitment:** Longer staking periods earn more rewards
* **Adaptable incentives:** The program can adjust rewards during crucial network growth phases

## Advanced Features

### Restaking During Unstaking Window

You can stake back into the pool at any time, even during the 24-hour unstaking window. This allows you to:

* Maintain your boost multiplier
* Continue earning points
* Avoid losing accumulated benefits

### Mission Integration

Staking points work in conjunction with the [Missions System](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/missions.md):

* Complete staking missions for bonus points
* Earn additional rewards through social missions
* Maximize your total point accumulation

### Referral Benefits

When you refer others to stake:

* Earn 10% of their staking points
* Earn 5% of their referrals' points
* Build a sustainable point-earning network

## Related Topics

* [**How to Stake**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/staking.md) - Start earning staking points
* [**Missions System**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/missions-system.md) - Earn bonus points through missions
* [**Trading Points**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/trading-points.md) - Learn about trading rewards
* [**Debt Mechanism**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/debt-mechanism.md) - Understand debt implications


# Trading Points System

The **Season 1 Points Program** ended on **October 31 at 2:00 PM UTC**, and **Season 2** began on **November 1 at 0:00 AM UTC**.

Season 2 is designed to **primarily reward real, organic trading activity** on Polynomial. Points are earned based on meaningful platform usage, including factors such as **open interest, trading volume, pairs traded, and consistency of activity**.

#### Trading Points

**Total Points Distributed Weekly:** **850,000 Points**\
**Distribution Time:** **Every Thursday at 2:00 PM UTC**

These points are exclusively awarded for trading and are calculated based on organic trading activity across all Polynomial markets. Point allocation considers factors such as open interest, trading volume, pairs traded, consistency of activity, and genuine platform usage, with strict exclusions for wash trading.

#### Creator Points

In addition to trading points, **up to 50,000 Points per week** are allocated separately for creators.

These are bonus points , awarded to users who help grow awareness of Polynomial through content creation and engagement. Eligible content includes educational threads, market or trade analysis, strategy breakdowns, videos, tutorials or walkthroughs, memes or infographics, and discussions or insights shared across any platform such as X, Discord, or blogs.

**How to Qualify**

* Share your content in the **Polynomial Discord**
* Include your **unique trading referral link**

A maximum of **50,000 bonus points** is distributed weekly among all eligible creators.

Polynomial reserves the right to modify, update, or adjust the points distribution logic, allocation criteria, eligibility requirements, or program structure at any time, at its sole discretion.

## Mystery Cards System

To make the process fair and engaging, we use a **Mystery Card claiming system**:

![Trading Card](https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FKf57JL2Kea2lGfl3SaBm%2Fimage.png?alt=media\&token=a71f7bb0-262b-4c2a-8ce5-217881568f43)

* **24-Hour Lock Period**\
  Cards remain locked for 24 hours before they can be revealed. This ensures fair claiming for all users.
* **7-Day Claim Window**\
  Once unlocked, cards can be claimed within a 7-day period to reveal the points earned.
* **7-Day Expiry Limit**\
  Cards not claimed within 7 days expire, and the unclaimed points return to the pool.

## Related Topics

* [**How to Trade**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/trading/open-close-positions.md) - Learn to trade and earn points
* [**Referral Program**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/how-to/staking/referrals.md) - Earn additional rewards through referrals
* [**Staking Points**](https://github.com/Polynomial-Protocol/gitbook/blob/master/explanation/explanation/staking-points.md) - Learn about staking rewards


# Missions System

The Polynomial Missions system allows users to earn additional points through staking activities, referrals, and social engagement.

## Staking Missions

Staking missions reward users for completing specific actions related to depositing and referring friends to Polynomial.

### How It Works

* **Time-bound**: Missions are temporary and may not last forever
* **Difficulty-based rewards**: Different missions offer different point values based on their complexity
* **Early believer bonus**: Extra boost for early adopters

### Mission Types

* **Deposit missions**: Earn points for depositing specific amounts
* **Referral missions**: Earn points for successfully referring new users
* **Retention missions**: Earn points for maintaining deposits over time

## Social Missions

Social missions reward users for creating content and engaging in social activities for Polynomial.

### How It Works

* **Content creation**: Earn points for creating educational or promotional content
* **Engagement-based**: Points awarded based on views and engagement received
* **Epoch-based rewards**: Points distributed in 2-week epochs
* **Performance metrics**: Rewards scale with content performance

### Content Types

* **Educational content**: Tutorials, guides, and explanations
* **Social media**: Twitter threads, Discord engagement, community building
* **Video content**: YouTube videos, live streams, tutorials
* **Written content**: Blog posts, articles, documentation

## Accessing Missions

Visit the [Missions page](https://www.stake.polynomial.fi/mainnet/earn/missions) to view available missions and track your progress.

## Tips for Success

1. **Complete missions early**: Time-bound missions may expire
2. **Focus on quality**: Better content receives more engagement and points
3. **Be consistent**: Regular participation builds momentum
4. **Engage authentically**: Genuine community building is rewarded


# USUAL Rewards

USUAL rewards are distributed to users who deposit USD0++ (USD0 plus) assets into the Polynomial liquidity pool.

## How USUAL Rewards Work

### Eligibility

* **USD0++ only**: Rewards are exclusively for users depositing USD0++ assets
* **Automatic distribution**: No additional action required beyond depositing

### Distribution Process

1. **Weekly claims**: Polynomial claims rewards from USUAL every 7 days
2. **Pro-rata distribution**: Total rewards distributed proportionally among eligible users
3. **No platform fee**: Polynomial doesn't take a cut - 100% goes to users

### Calculation Formula

User rewards are calculated based on:

```
User Share = Amount Staked × Seconds Staked
```

Where:

* **Amount Staked**: The USD value of your USD0++ deposit
* **Seconds Staked**: The duration you've held the deposit

### Key Features

* **Time-weighted**: Longer staking periods earn proportionally more rewards
* **Size-weighted**: Larger deposits earn proportionally more rewards
* **Fair distribution**: Rewards scale with both amount and time commitment
* **Transparent**: All calculations are based on verifiable on-chain data

## Maximizing USUAL Rewards

### Strategies

1. **Deposit early**: Start earning rewards as soon as possible
2. **Maintain deposits**: Keep funds staked to accumulate more seconds
3. **Compound rewards**: Reinvest earned rewards to increase your share
4. **Monitor performance**: Track your rewards and adjust strategy as needed

### Important Notes

* **USD0++ specific**: Only USD0++ deposits qualify for these rewards
* **Automatic**: No manual claiming required - rewards are distributed automatically
* **Weekly cycles**: New reward cycles begin every 7 days
* **Transparent**: All distributions are verifiable on-chain


# Debt Mechanism

The Polynomial liquidity layer acts as the counterparty for derivative applications, which can result in debt accumulation.

## How Debt Works

**Pool-Level Debt:** Debt is distributed across all liquidity providers according to their share of deposits **Shared Responsibility:** All stakers share in both profits and losses

## What Causes Debt

⚠️ **Warning**: Market skew or poor performance can cause debt to increase.

* **Market skew**: Imbalanced long/short positions
* **Trader performance**: Poor trading outcomes
* **Market conditions**: Volatile or unfavorable market movements

## Paying Back Debt

To withdraw liquidity from the pool, you must first pay off any outstanding debt:

1. **Bridge additional funds**: Debt must be bridged to Polynomial Chain
2. **Pay from new funds**: Debt won't reduce your staked amount
3. **Complete repayment**: Once debt is paid, you can unstake
4. **24-hour waiting period**: After unstaking, wait before withdrawal

### Important Notes

* **Additional funds required**: You need to bridge extra funds to settle debt
* **No reduction in stake**: Your staked amount remains unchanged
* **Timing matters**: New deposits reset the 24-hour withdrawal timer

## Risk Mitigation

**For Liquidity Providers:**

* Monitor debt levels before depositing
* Consider market conditions when staking
* Follow market trends and trading activity

**For the Ecosystem:**

* Higher caps encourage arbitrageurs to balance markets
* Open interest limits help manage risk during early phases


# TradingView Webhooks

Polynomial lets you automate trades by linking TradingView alerts through webhooks. Once authorized, your strategy alerts can trigger trades with defined sizes, keeping positions in sync with backtest

### Quick demo

{% embed url="<https://www.youtube.com/watch?v=FT7BZLSNkq8>" %}

### Stepwise guide:

1\. Create a Webhook

* Navigate to **Portfolio > Webhooks > New Webhook**.
* Provide a meaningful **name** and create the webhook.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FkTHaPLc40ND4YkxRaO97%2Fimage.png?alt=media&#x26;token=91540bb5-0d57-4b2c-8983-1382e0d175db" alt=""><figcaption></figcaption></figure>

2\. Authorize the Webhook

* Authorize the webhook to **open and close trades** on your account.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FBW6bapV0yFcXqEaZ9Oee%2Fimage.png?alt=media&#x26;token=05ea4268-41f5-4b59-b13a-86e62b4823c4" alt=""><figcaption></figcaption></figure>

3\. Copy the Webhook Body

* **Sign a message** to verify your identity and view the webhook body.
* **Copy and store** this content securely. Do **not** share it publicly.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FjHJokNaT1I0L7VYdKr6P%2Fimage.png?alt=media&#x26;token=e3683e22-05cd-44ff-a9fd-218856d024e2" alt=""><figcaption></figcaption></figure>

4\. Set Up a TradingView Strategy

* Choose a TradingView strategy that aligns with your trading style.
* **Verify** its performance through backtesting.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FJ9TJjgrs1wPqrorGnSDF%2Fimage.png?alt=media&#x26;token=8b0c9a36-37ed-4350-8008-de89a6a0a2e1" alt=""><figcaption></figcaption></figure>

5\. Configure Trade Size

* Choose settings > Properties
* **Note:** **1 TradingView quantity = 0.001 asset in polynomial**

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FD3A15ECeHkbAWwwGNxs3%2Fimage.png?alt=media&#x26;token=11be6b62-3fb9-4906-a75c-cdaccf2deb30" alt=""><figcaption></figcaption></figure>

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FHNeqvEVcNIl4CULrD9g9%2Fimage.png?alt=media&#x26;token=cf6bef5a-6fc5-4f3b-a911-8695cfc5485c" alt=""><figcaption></figcaption></figure>

6\. Create Alerts in TradingView

* Create an alert linked to your strategy.
* Copy and paste the **webhook URL and body** when setting up the alert.

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FLi239FUA6t5sEOKDkFlv%2Fimage.png?alt=media&#x26;token=15dae548-4cd8-4031-aeb4-eead14b590b3" alt=""><figcaption></figcaption></figure>

<figure><img src="https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FUHaq7dzEFRil1HgMhHll%2Fimage.png?alt=media&#x26;token=fc4c1b15-a8ae-4fb5-b978-15370aa2833e" alt=""><figcaption></figcaption></figure>

![](https://529851788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fas1ul3t7dYhXS2QfN6d4%2Fuploads%2FqqoiucYqh89AnscKwUaE%2Fimage.png?alt=media\&token=44bc0ed1-a9a8-4e7e-ae5a-b9d90a2a1ead)\
7\. Sync Open Positions

* When backtesting, TradingView may already assume an open position.
* To stay in sync, **open the same position size in Polynomial** before the webhook triggers.

### FAQ

**1. How should I align open positions in Polynomial with my strategy?**\
You must manually establish the same position size in Polynomial that your backtest assumes. This ensures that alerts correctly reverse or modify positions rather than opening duplicate trades.

**2. Is there a sizing requirement for contracts?**\
Yes. In Polynomial, **1 TradingView Contract = 0.001 asset**. Ensure that you configure your trade size in TradingView accordingly.

**3. Are there any security steps I should follow?**\
Yes. You are required to sign a message to verify your identity before accessing the webhook body. The webhook body should be copied, stored securely, and never shared publicly, as it is protected to prevent unauthorized access.

**4. Can I use multiple strategies with different webhooks?**\
Yes. Polynomial supports multiple webhooks, each of which can be linked to a different TradingView strategy. Alternatively, you may also use the same webhook to manage trades from multiple strategies if desired.\
\
&#x35;**. Why is my trade size incorrect?**\
The most common reason is that after an alert is created, changes to the strategy settings do not automatically update the alert. To correct this, you must delete the existing alert, update the strategy settings, and then create a new alert.


# Builder Kit

A toolkit for building on Polynomial's infrastructure while earning from the activity you drive.

## What It Is

Build trading bots, dashboards, and tools on top of Polynomial. Earn 10% of AMM fees and 20% of trading points from users you refer.

## Key Benefits

* **Programmatic access** to ultra-fast trading APIs
* **Permissionless** - no approvals needed
* **Direct earnings** from user activity
* **Built-in affiliate system**

## What You Can Build

### Trading Bots

* Low latency execution via Nitro Mode
* High-frequency trading support
* Gas abstraction and session key signing

### Dashboards & Analytics

* PnL tracking and risk analytics
* Vault APRs and leaderboards
* Custom UX with referral integration

### Social Tools

* Telegram/Discord bots
* Copy trading functionality
* Live stats and notifications

### Frontends

* Regional trading interfaces
* Embedded widgets
* White-label solutions

## Affiliate System

### Earnings

* 10% of AMM fees from referred users
* 20% of trading points (including OP rewards)

### How It Works

1. Build your application
2. Add your referral code
3. Onboard users
4. Earn from their trading activity

## Technical Features

### Nitro Mode

* Millisecond trade finalization
* High-frequency order flow
* Gas abstraction
* Session key signing

### API Access

* Ultra-fast trading APIs
* Real-time data feeds
* Webhook support
* Complete documentation

## Getting Started

### For Developers

1. [Developer Documentation](https://docs.polynomial.fi/developer-documentation)
2. [Starter Kit Repository](https://github.com/Polynomial-Protocol/polynomial-starter-kit/tree/master)
3. [API Wallet Authorization](https://polynomial.fi/en/mainnet/portfolio/api)
4. Build and integrate your referral code

### For Non-Developers

Have a community but no dev team? Join our Discord and open a ticket. We'll help build the frontend for you.

## Use Cases

* **DeFi Automation**: Trading bots, portfolio management, arbitrage strategies
* **Analytics**: Dashboards, risk tools, performance tracking
* **Community Tools**: Branded interfaces, social trading, audience monetization
* **Token Utility**: Add trading to existing tokens, LRT integrations

## Resources

* [Developer Documentation](https://docs.polynomial.fi/developer-documentation)
* [Starter Kit Repository](https://github.com/Polynomial-Protocol/polynomial-starter-kit/tree/master)
* [API Authorization](https://polynomial.fi/en/mainnet/portfolio/api)
* [Community Discord](https://discord.gg/polynomial) for support


# What is Uptober Fest?

Uptober Fest: zero trading fees on ETH and BTC perps, with current trading points program ending October 31.

## Key highlights

* **Zero fees on ETH/BTC perps**: 0% maker and taker fees across web, mobile, webhooks, and API
* **Same execution quality**: Same deep liquidity and speed; this is not “low fees, high slippage”
* **Other markets unchanged**: All other markets retain existing fees (for now)
* **Duration**: One‑month, ending **October 31**

## How do LPs earn without trading fees?

![Interest Rate Module chart showing utilization-based interest](/files/thZjf9Myf3XOYr1tKS9P)

Interest Rate Module: utilization-based interest replaces trading fees when OI is high

* **New Interest Rate Module**: When open interest utilization gets high, traders pay a small interest rate instead of trading fees
* **LP earnings mix**: Liquidity providers earn from spreads, funding rates, and the new utilization‑based interest mechanism
* **Goal**: Sustainable yield for LPs while delivering zero fees to traders on eligible markets

## What happens after the fest?

If the fest is successful and volume meaningfully increases, we plan to expand zero‑fee trading to more markets beyond ETH and BTC.

## Get started

* **Trade now**: [polynomial.fi/trade](https://polynomial.fi/trade)
* **API & webhooks**: Zero fees also apply when trading via API and TradingView webhooks

## FAQ

* **Which markets are zero‑fee?** ETH and BTC perpetuals during the fest window.
* **How long does it last?** Through October 31.
* **Do I still earn points?** Yes. Trading points continue to accrue until October 31.
* **Will more markets get zero fees?** If performance is strong, we’ll expand to additional markets.

## TL;DR

Same speed. Same deep liquidity. Zero trading fees on ETH and BTC perps during Uptober Fest. Trade while earning points before October 31.


# FAQ

Find answers to the most common questions about Polynomial Trade and Staking.

## General Questions

### **What is Polynomial?**

Polynomial is a next-generation decentralized trading platform built on Polynomial Chain. It offers gasless trading with a hybrid orderbook system, combining the best of centralized and decentralized exchanges.

### **What makes Polynomial different?**

* **Gasless Trading:** No gas fees on Polynomial Chain
* **Hybrid Orderbook:** Combines CLOB and AMM for optimal execution
* **Cross-Margin:** Native cross-margin capabilities
* **Polynomial Wallets:** Enhanced security and functionality
* **Pyth Lazer:** Millisecond-latency price feeds

### **Is Polynomial safe?**

Yes, Polynomial uses audited smart contracts and follows industry best practices. However, all DeFi activities carry inherent risks, so only invest what you can afford to lose.

## Trading Questions

### **What is the minimum margin requirement?**

You need at least **$25 in margin** to open a position. If your margin is below this level, deposit more USDC to meet the requirement.

### **Which assets can I use as collateral?**

Polynomial supports multiple margin collaterals:

* **Stablecoins:** USDC, USDT
* **ETH variants:** ETH, wstETH, weETH, rsETH
* **BTC variants:** cbBTC, solvBTC

### **What chains can I deposit from?**

You can deposit from:

* Ethereum Mainnet
* Arbitrum
* Optimism
* Base

### **Why did my order expire?**

Orders can expire for several reasons:

* **High volatility:** Price moved too quickly for optimal execution
* **Limit orders:** Price didn't reach your specified range within the expiry period
* **Market conditions:** Unfavorable execution conditions

### **What should I do if my order expires?**

You have several options:

* **Cancel** the expired order
* **Retry** instantly at market price
* **Create a new order** (cancels the expired one automatically)

### **Why did my funding reset to $0?**

Funding is settled into your margin whenever you:

* Deposit funds
* Withdraw funds
* Open a new trade

If funding was positive, it increases your margin; if negative, it reduces it. After settlement, the displayed funding resets to $0.

### **What is the maximum number of open positions?**

The maximum number of open positions in trading is limited to **7 positions**. This limit ensures optimal performance and risk management across your portfolio.

## Staking Questions

### **What is the minimum deposit for staking?**

The minimum deposit is **$100** for staking in Polynomial liquidity pools.

### **Which assets can I stake?**

You can stake:

* **USDC:** Most stable option
* **sDAI:** Higher yield potential
* **sUSDe:** Highest yield potential

### **How do I earn rewards from staking?**

Stakers earn:

* **Trading fee rewards:** 50% of all trading fees generated
* **Points:** Accumulated for potential future token rewards
* **Retroactive points:** Bonus for early participation

### **What is the 24-hour lock period?**

When you unstake or claim rewards, there's a 24-hour waiting period before funds become available. This prevents rapid in/out trading and ensures system stability.

### **Can I restake during the 24-hour period?**

Yes, you can restake during the 24-hour period, which will reset the timer.

## Points and Rewards

### **How do I earn trading points?**

Polynomial distributes **1,000,000 points daily**. Your share depends on your trading volume compared to other users.

### **How do I earn staking points?**

Staking points are earned based on:

* Amount staked
* Duration of stake
* Asset type
* Participation in missions

### **What if I don't claim my points?**

Points must be claimed within **7 days**. Any unclaimed points automatically expire.

### **How do referral points work?**

You earn points by referring others to:

* **Staking:** Refer others to stake for bonus points
* **Trading:** Refer traders for additional rewards
* **Recursive rewards:** Earn from your referrals' activity

## Technical Questions

### **What is a polynomial wallet?**

A polynomial wallet is a programmable wallet that provides:

* Gasless transactions
* Advanced order types
* Enhanced security features
* Cross-chain functionality

### **How does the hybrid orderbook work?**

The hybrid system combines:

* **CLOB (Central Limit Order Book):** 200ms latency, precision trading
* **AMM:** Oracle-based, guaranteed liquidity
* **Best execution:** Always optimal fill

### **What is Pyth Lazer?**

Pyth Lazer provides millisecond-latency price feeds, ensuring:

* No stale prices
* Lightning-fast execution
* Accurate market data
* High-frequency updates
* Decentralized oracle network
* On-chain verification

### **How fast are market order executions?**

Polynomial's market orders execute in just 2-4 seconds - 3-5x faster than traditional AMMs.

### **How does cross-margin work?**

Cross-margin allows you to:

* Use shared collateral across multiple positions
* Maximize capital efficiency
* Go long or short on different markets simultaneously

## Troubleshooting

### **My transaction is stuck**

* Wait up to 30 seconds for bridge completion
* Check network congestion
* Verify you have sufficient gas
* Contact support if over 1 hour

### **I can't connect my wallet**

* Clear browser cache and cookies
* Update your wallet software
* Check if you're on the correct network
* Try a different browser

### **My deposit isn't showing**

* Wait for bridge completion (10-15 seconds)
* Check transaction status on source chain
* Verify you're on the correct network
* Contact support if still not visible after 1 hour

### **I'm getting an error message**

* Check if you have sufficient balance
* Verify network connection
* Ensure you're using the official website
* Contact support with the exact error message

## Security Questions

### **Is my wallet safe?**

Yes, but follow these security practices:

* Never share your private keys
* Always use the official Polynomial website
* Use hardware wallets for large amounts
* Keep your recovery information secure

### **What if I lose access to my wallet?**

* Use your seed phrase to recover
* Contact support if you need assistance
* Consider using polynomial wallet recovery features
* Never share your recovery information

### **How do I verify I'm on the official site?**

* Always check the URL: <https://trade.polynomial.fi>
* Look for the official Polynomial branding
* Be wary of phishing attempts
* Bookmark the official site

## Advanced Questions

### **How do I start staking to Polynomial Chain?**

1. **Connect your wallet:** Connect your EVM wallet on Polynomial
2. **Streamlined onboarding:** Terms of Service signing prompt appears immediately after wallet connection
3. **Bridge & Deposit:** Deposit USDC, sDAI, or sUSDe from Ethereum Mainnet, Arbitrum, Optimism, or Base
4. **Start earning points:** Secure retroactive points, onboarding points, and initial boost

### **How do I refer someone to Polynomial?**

1. Visit the 'Invites' page to find your referral codes
2. Share codes with friends to invite them to stake
3. Earn **10% of their points** and **5% of their friends' points** when they complete onboarding and deposit

### **How do I withdraw from Polynomial Chain?**

Withdrawing is a two-step process:

1. **Unstake your assets** (clear any debt first)
2. **Withdraw funds** and bridge them to your desired chain

⚠️ **Important:** Withdrawing resets your boost to 1x, but you keep accumulated scores.

### **What are the trading fees?**

* **Taker fees:** 0.06% of notional (Standard tier)
* **Maker fees:** 0.04% of notional (Standard tier)
* **Funding fees:** Based on funding rate velocity model (varies with market skew)
* **Liquidation fees:** $50 base fee + market impact
* **Bridge fees:** Vary by destination chain
* **VIP tiers:** Lower fees available based on trading volume

### **How do funding fees work?**

Polynomial uses a unique funding rate velocity model:

* **Continuous funding:** Rates adjust continuously, not at fixed intervals
* **Velocity-based:** dr/dt = c × skew (rate of change in funding rates)
* **Skew-dependent:** Rates based on imbalance between long/short positions
* **Zero-sum:** LPs neither gain nor lose funding over time
* **Smooth trajectories:** Gradual rate changes for better UX

### **What is the maximum leverage?**

* **Maximum leverage:** 50x
* **Adjustment:** Use the slider bar to set leverage
* **Warning:** High leverage increases liquidation risk

### **How does the 24-hour withdrawal lock work?**

* **Unstaking:** 24-hour waiting period before withdrawal
* **Yield claiming:** Same 24-hour lock applies
* **New deposits:** Reset the timer
* **Restaking:** Can stake back during the waiting period

## Getting Help

### **Where can I get support?**

* **FAQ:** Check this page for common questions
* **Community:** Join our [Discord](/support/community) for peer support
* **Support:** [Contact us](/support/contact) for direct assistance
* **Documentation:** Browse our comprehensive guides

### **How do I report a bug?**

* Join our [Discord](/support/community) and use the bug report channel
* [Contact support](/support/contact) with detailed information
* Include screenshots and transaction details
* Describe steps to reproduce the issue

### **How do I suggest a feature?**

* Join our [Discord](/support/community) and use the feedback channel
* [Contact support](/support/contact) with your suggestion
* Participate in community discussions
* Vote on proposed features

***

*Can't find the answer you're looking for? Join our* [*Discord community*](/support/community) *or* [*contact support*](/support/contact) *for personalized help.*


# Troubleshooting

Common issues and solutions for Polynomial Trade and Staking.

## Connection Issues

### **Wallet Won't Connect**

#### **Symptoms**

* Wallet connection button not working
* Connection fails repeatedly
* Wallet not recognized

#### **Solutions**

1. **Clear browser cache and cookies**
2. **Update your wallet software**
3. **Check if you're on the correct network**
4. **Try a different browser**
5. **Restart your browser**
6. **Check wallet permissions**

#### **Prevention**

* Keep wallet software updated
* Use supported browsers
* Clear cache regularly

### **Network Connection Problems**

#### **Symptoms**

* Slow loading times
* Transaction failures
* Intermittent connectivity

#### **Solutions**

1. **Check your internet connection**
2. **Try a different network**
3. **Use a VPN if needed**
4. **Clear browser cache**
5. **Restart your router**

#### **Prevention**

* Use stable internet connection
* Keep browser updated
* Monitor network status

## Trading Issues

### **Orders Not Executing**

#### **Symptoms**

* Orders stuck in pending
* Orders expire without execution
* Market orders not filling

#### **Solutions**

1. **Check if you have sufficient margin**
2. **Verify order parameters**
3. **Check market conditions**
4. **Try during lower volatility**
5. **Use different order type**

#### **Prevention**

* Monitor market conditions
* Set realistic order parameters
* Maintain sufficient margin

### **Position Not Opening**

#### **Symptoms**

* Position creation fails
* Error messages during opening
* Funds not being used

#### **Solutions**

1. **Ensure minimum margin ($25)**
2. **Check wallet balance**
3. **Verify network connection**
4. **Try smaller position size**
5. **Check for pending transactions**

#### **Prevention**

* Maintain adequate balance
* Start with small positions
* Monitor account status

### **Unexpected Liquidations**

#### **Symptoms**

* Position closed unexpectedly
* Loss of margin
* Liquidation notifications

#### **Solutions**

1. **Review liquidation price**
2. **Check margin requirements**
3. **Understand liquidation process**
4. **Learn from the experience**

#### **Prevention**

* Monitor liquidation price
* Maintain adequate margin
* Use stop-loss orders
* Don't over-leverage

## Staking Issues

### **Deposit Not Showing**

#### **Symptoms**

* Funds not appearing in account
* Bridge transaction pending
* Balance not updating

#### **Solutions**

1. **Wait for bridge completion (10-15 seconds)**
2. **Check transaction status on source chain**
3. **Verify you're on the correct network**
4. **Refresh the page**
5. **Check wallet balance**

#### **Prevention**

* Be patient with bridge process
* Monitor transaction status
* Use supported chains only

### **Withdrawal Problems**

#### **Symptoms**

* Cannot withdraw funds
* 24-hour timer not counting down
* Withdrawal button not working

#### **Solutions**

1. **Check if 24-hour period has passed**
2. **Verify unstaking was completed**
3. **Check for pending transactions**
4. **Try refreshing the page**
5. **Contact support if persistent**

#### **Prevention**

* Plan withdrawals in advance
* Complete unstaking process
* Monitor withdrawal status

### **Rewards Not Claiming**

#### **Symptoms**

* Cannot claim rewards
* Claim button not working
* Rewards not showing

#### **Solutions**

1. **Check if 24-hour lock period has passed**
2. **Verify you have staked assets**
3. **Check for pending transactions**
4. **Try refreshing the page**
5. **Contact support if needed**

#### **Prevention**

* Monitor reward accumulation
* Claim rewards regularly
* Understand lock periods

## Technical Issues

### **Transaction Failures**

#### **Symptoms**

* Transactions not confirming
* Error messages during transactions
* Gas estimation failures

#### **Solutions**

1. **Check wallet balance for gas**
2. **Increase gas limit**
3. **Try during lower network congestion**
4. **Check network status**
5. **Retry the transaction**

#### **Prevention**

* Maintain adequate gas balance
* Monitor network conditions
* Use appropriate gas settings

### **Polynomial Wallet Issues**

#### **Symptoms**

* Polynomial wallet not created
* Polynomial wallet not functioning
* Permission errors

#### **Solutions**

1. **Complete initial deposit process**
2. **Check wallet permissions**
3. **Verify network connection**
4. **Try reconnecting wallet**
5. **Contact support if persistent**

#### **Prevention**

* Follow setup process completely
* Keep wallet updated
* Monitor wallet status

### **Bridge Delays**

#### **Symptoms**

* Bridge taking longer than expected
* Funds stuck in bridge
* No confirmation received

#### **Solutions**

1. **Wait up to 30 seconds** (normal bridge time is 10-15 seconds)
2. **Check source chain transaction status**
3. **Verify destination chain**
4. **Check network congestion**
5. **Contact support if over 1 hour**

#### **Prevention**

* Plan for bridge delays
* Use less congested chains
* Monitor network status

### **Failed Margin Deposit After Bridge**

#### **Symptoms**

* Bridge completed successfully
* Margin deposit failed
* Assets not showing in trading account

#### **Solutions**

1. **Check Polynomial Balance:** Your assets are likely already on Polynomial Chain
2. **Direct Deposit:** You can deposit directly from your Polynomial Chain balance
3. **Balance Verification:** Check your balance in the staking interface or trading interface
4. **No Re-bridge Needed:** Assets are already on Polynomial Chain, no need to bridge again

#### **Prevention**

* Monitor both bridge and deposit status
* Check Polynomial Chain balance after bridge completion
* Be prepared to deposit directly if needed

## Account Issues

### **Balance Discrepancies**

#### **Symptoms**

* Balance not matching expectations
* Funds missing
* Incorrect calculations

#### **Solutions**

1. **Check transaction history**
2. **Verify all transactions**
3. **Check for pending transactions**
4. **Refresh the page**
5. **Contact support with details**

#### **Prevention**

* Keep transaction records
* Monitor account regularly
* Verify all transactions

### **Login Problems**

#### **Symptoms**

* Cannot access account
* Wallet not recognized
* Session expired

#### **Solutions**

1. **Reconnect your wallet**
2. **Clear browser cache**
3. **Try different browser**
4. **Check wallet connection**
5. **Contact support if persistent**

#### **Prevention**

* Keep wallet software updated
* Use stable internet connection
* Monitor account access

## Performance Issues

### **Slow Loading**

#### **Symptoms**

* Pages loading slowly
* Interface lagging
* Timeout errors

#### **Solutions**

1. **Check internet connection**
2. **Clear browser cache**
3. **Close unnecessary tabs**
4. **Try different browser**
5. **Restart browser**

#### **Prevention**

* Use stable internet
* Keep browser updated
* Close unused tabs

### **Interface Problems**

#### **Symptoms**

* Buttons not working
* Display issues
* Navigation problems

#### **Solutions**

1. **Refresh the page**
2. **Clear browser cache**
3. **Check browser compatibility**
4. **Try different browser**
5. **Disable browser extensions**

#### **Prevention**

* Use supported browsers
* Keep browser updated
* Avoid problematic extensions

## Getting Additional Help

### **When to Contact Support**

* **Persistent issues:** Problems that don't resolve
* **Account problems:** Issues with your account
* **Technical failures:** System-wide problems
* **Security concerns:** Suspected security issues

### **Information to Provide**

* **Detailed description:** What's happening?
* **Steps taken:** What have you tried?
* **Screenshots:** Visual evidence
* **Transaction details:** Relevant transaction hashes
* **Browser/device info:** Technical specifications

### **Support Channels**

* **Discord:** <https://discord.gg/polynomial>
* **Email:** <support@polynomial.fi>
* **Community:** Peer support and discussions

***

*Most issues can be resolved with these troubleshooting steps. If problems persist, don't hesitate to contact our support team for personalized assistance.*


# Community

Join the Polynomial community to connect with other users, get support, and stay updated on the latest developments.

## Official Channels

### Discord

* **Primary Community:** <https://discord.gg/polynomial>
* **Real-time Support:** Get help from community members and moderators
* **Announcements:** Stay updated on new features and updates
* **Trading Discussions:** Share strategies and market insights
* **Bug Reports:** Report issues and get technical support

### Twitter

* **Official Account:** <https://x.com/PolynomialFi>
* **Latest News:** Follow for platform updates and announcements
* **Market Insights:** Get trading tips and market analysis
* **Community Highlights:** See what other users are doing
* **Partnership Updates:** Learn about new integrations

## Community Guidelines

### Be Respectful

* Treat all community members with respect
* Use appropriate language and tone
* Avoid personal attacks or harassment
* Be constructive in your feedback

### Stay On Topic

* Keep discussions relevant to Polynomial
* Use appropriate channels for different topics
* Avoid spam or off-topic content
* Help maintain organized discussions

### Share Knowledge

* Help newcomers learn the platform
* Share useful tips and strategies
* Answer questions when you can
* Contribute to the community's growth

### Follow Rules

* Read and follow Discord server rules
* Respect moderator decisions
* Don't share inappropriate content
* Report violations to moderators

## Getting Help

### Discord Support

* **#general:** General questions and discussions
* **#trading:** Trading-specific questions and strategies
* **#staking:** Staking questions and rewards
* **#technical:** Technical issues and bug reports
* **#announcements:** Official updates and news

### Best Practices for Getting Help

* **Be Specific:** Provide detailed information about your issue
* **Include Screenshots:** Visual aids help explain problems
* **Share Transaction Details:** Include relevant transaction hashes
* **Be Patient:** Community members are volunteers

## Community Events

### Trading Competitions

* **Regular Contests:** Participate in trading competitions
* **Prize Pools:** Win rewards for top performance
* **Leaderboards:** Compete with other traders
* **Special Events:** Limited-time competitions

### Educational Sessions

* **Trading Workshops:** Learn advanced trading strategies
* **Platform Tutorials:** Master Polynomial features
* **Market Analysis:** Understand market dynamics
* **Risk Management:** Learn to protect your capital

### Community Challenges

* **Missions:** Complete community challenges
* **Referral Programs:** Earn rewards for bringing new users
* **Content Creation:** Share your Polynomial experience
* **Feedback Sessions:** Help improve the platform

## Contributing to the Community

### Share Your Experience

* **Trading Strategies:** Share successful strategies
* **Educational Content:** Create helpful guides
* **Market Analysis:** Provide market insights
* **Platform Feedback:** Help improve the platform

### Help Others

* **Answer Questions:** Help newcomers learn
* **Share Resources:** Provide useful links and tools
* **Mentor New Users:** Guide beginners
* **Moderate Discussions:** Help maintain community standards

## Community Resources

### Documentation

* **Official Docs:** Comprehensive platform documentation
* **User Guides:** Step-by-step tutorials
* **FAQ:** Frequently asked questions
* **Video Tutorials:** Visual learning resources

### External Resources

* **Trading Tools:** Third-party tools and resources
* **Market Data:** Price feeds and market information
* **Educational Content:** Trading and DeFi education
* **Community Tools:** Discord bots and utilities

## Contact Information

### Discord

* **Server:** <https://discord.gg/polynomial>
* **Support Channel:** #technical-support
* **General Chat:** #general
* **Trading Discussion:** #trading

### Twitter

* **Official Account:** <https://x.com/PolynomialFi>
* **Direct Messages:** Available for urgent issues
* **Mentions:** Tag us for public questions
* **Retweets:** Share community content

### Other Channels

* **Email:** [Contact support](/support/contact) for formal inquiries
* **GitHub:** For technical issues and feature requests
* **Medium:** For detailed articles and updates


# Contact Support

Get direct help from the Polynomial team for technical issues, account problems, or general inquiries.

## Support Channels

### Discord (Recommended)

* **Server:** <https://discord.gg/polynomial>
* **Support Channel:** #technical-support
* **Response Time:** Usually within hours
* **Best For:** Technical issues, quick questions, community support

### Email Support

* **General Inquiries:** <support@polynomial.fi>
* **Technical Issues:** <tech@polynomial.fi>
* **Business Inquiries:** <business@polynomial.fi>
* **Response Time:** 24-48 hours
* **Best For:** Formal inquiries, detailed issues, business matters

### Twitter

* **Account:** [@PolynomialFi](https://x.com/PolynomialFi)
* **Direct Messages:** Available for urgent issues
* **Public Mentions:** For general questions
* **Response Time:** Varies
* **Best For:** Quick questions, public inquiries

## What to Include in Your Support Request

### For Technical Issues

* **Detailed Description:** Explain the problem clearly
* **Steps to Reproduce:** How did the issue occur?
* **Screenshots:** Visual evidence of the problem
* **Transaction Details:** Include transaction hashes if applicable
* **Wallet Information:** Which wallet you're using
* **Browser/Device:** Technical specifications

### For Account Issues

* **Account Details:** Your wallet address (public key only)
* **Issue Description:** What's not working?
* **Timeline:** When did the issue start?
* **Previous Actions:** What have you tried?
* **Expected vs. Actual:** What should happen vs. what's happening

## Common Support Topics

### Trading Issues

* Order execution problems
* Position management issues
* Fee calculation questions
* Liquidation concerns
* Cross-margin questions

### Staking Issues

* Deposit/withdrawal problems
* Reward calculation questions
* Points system inquiries
* Bridge timing issues
* Unstaking problems

### Technical Issues

* Wallet connection problems
* Transaction failures
* Bridge delays
* Polynomial wallet issues
* Network connectivity

## Response Times

### Discord Support

* **General Questions:** 1-4 hours
* **Technical Issues:** 2-8 hours
* **Urgent Issues:** 1-2 hours
* **Business Hours:** Faster response during business hours

### Email Support

* **General Inquiries:** 24-48 hours
* **Technical Issues:** 24-72 hours
* **Business Inquiries:** 48-72 hours
* **Weekend/Holidays:** Longer response times

## Before Contacting Support

### Check These Resources First

* [**FAQ**](/support/faq)**:** Common questions and answers
* [**Documentation**](/)**:** Comprehensive guides
* [**Community**](/support/community)**:** Peer support and discussions
* [**How-to Guides**](https://github.com/Polynomial-Protocol/gitbook/blob/master/how-to/README.md)**:** Step-by-step guides

### Try These Solutions

* **Refresh the page:** Simple but often effective
* **Clear browser cache:** Resolves many display issues
* **Check network connection:** Ensure stable internet
* **Verify wallet connection:** Make sure wallet is properly connected
* **Wait for transactions:** Some operations take time

## Privacy and Security

### Information We Need

* **Public wallet addresses:** For account verification
* **Transaction hashes:** For transaction issues
* **Error messages:** For technical problems
* **Screenshots:** For visual issues

### Information We Don't Need

* **Private keys:** Never share these
* **Seed phrases:** Keep these secure
* **Passwords:** We don't need these
* **Personal information:** Beyond what's necessary

## Emergency Contacts

### Security Issues

* **Email:** <security@polynomial.fi>
* **Discord:** #security channel
* **Immediate response:** For security concerns
* **Confidential handling:** Sensitive information protected

### Critical Issues

* **Discord:** @moderators for urgent issues
* **Email:** <urgent@polynomial.fi>
* **24/7 monitoring:** For critical platform issues
* **Rapid response:** For system-wide problems


# Developer Documentation

If you're looking to build **integrations or bots** on Polynomial, start with the API documentation:\
[View API Docs](/developer-documentation/api/introduction)

To gain a deeper understanding of **Polynomial's trade core concepts**, refer to the detailed docs here:\
[Learn More](https://docs.polynomial.fi/trade/trade/perp)

For support, questions, or feature requests, feel free to **raise a ticket on our Discord**.\
[Raise ticket](https://discord.com/channels/843170059006640179/986580658015076353)


# Introduction

This documentation covers the basics required to build integrations with the platform.

### API wallets

API wallets are developer-owned or frontend-generated wallets authorized by the main trading account to sign trade transactions.&#x20;

* Always pass the **original account-holding wallet address** in the relevant info API—not the API wallet address.
* An API wallet is required to execute all trade transactions. You can generate one [here](https://polynomial.fi/en/mainnet/portfolio/api).

### Backend API key

All backend endpoints are publicly accessible. However, to prevent hitting rate limits quickly, requests **must** include the `x-api-key` header.\
You can request an API key by creating a [support ticket ](https://discord.com/channels/843170059006640179/986580658015076353)on our Discord.

### Example repo

All integration examples are implemented in TypeScript and maintained in this [example repository](https://github.com/Polynomial-Protocol/polynomial-starter-kit).


# Create Order

The fastest way to implement market order functionality is by using the Nitro Mode API.

### Create Market Order (nitro mode)

`POST`  `https://orderbook-mainnet.polynomial.finance/api/market_order/<market_id>`

#### Query&#x20;

| Name       | Description                                                                                                                 |
| ---------- | --------------------------------------------------------------------------------------------------------------------------- |
| market\_id | You can find market id from markets api response. [Markets](/developer-documentation/api/markets#retrieve-all-markets-info) |

#### Headers&#x20;

| Name         | Description                                                                         |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

#### Request body

> **Note:** All fields are **required**, even if not currently used. Fields like `allowAggregation`, `allowPartialMatching`, and `expiration` are required for schema compliance but are not used functionally.

| Name                 | Type    | Description                                                                                                                                                                                                                                          |
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| acceptablePrice      | string  | Execution price with expected slippage [example](https://github.com/Polynomial-Protocol/polynomial-starter-kit/blob/5dbaf415ac79d41352d6330e0cfcba9e7977cfa2/lib/order.ts#L17) . More details [here](/developer-documentation/api/price#fill-price). |
| accountId            | string  | Perp Account Id. Returned by [accounts api ](/developer-documentation/api/account#retrieve-account-info)                                                                                                                                             |
| allowAggregation     | boolean | true **(Required but unused)**                                                                                                                                                                                                                       |
| allowPartialMatching | boolean | true **(Required but unused)**                                                                                                                                                                                                                       |
| chainId              | number  | 8008 (mainnet)                                                                                                                                                                                                                                       |
| expiration           | string  | Order expirate time, in ms. **(Required but unused)**                                                                                                                                                                                                |
| id                   | string  | <p>Market order signature signed by API wallet key. More details <br><a data-mention href="#signature-generation">#signature-generation</a></p>                                                                                                      |
| marketId             | string  | From `markets` api response. [Markets](/developer-documentation/api/markets#retrieve-all-markets-info)                                                                                                                                               |
| nonce                | string  | Use a function generating increasing value. [Example](https://github.com/Polynomial-Protocol/polynomial-starter-kit/blob/5dbaf415ac79d41352d6330e0cfcba9e7977cfa2/lib/nitromode.ts#L154)                                                             |
| referrerOrRelayer    | string  | `0x4D387f5c0Ec87e47b9Df9b8C97B89D2977431b27`                                                                                                                                                                                                         |
| settlementStrategyId | string  | `0`                                                                                                                                                                                                                                                  |
| sizeDelta            | string  | With 18 decimals precision. Ex `-1000000000000000000` for shorting -1 size                                                                                                                                                                           |
| trackingCode         | string  | `0x0000000000000000000000000000000000000000000000000000000000000000`                                                                                                                                                                                 |
| reduceOnly           | boolean | If `true`, ensures the order only reduces an existing position.                                                                                                                                                                                      |
|                      |         |                                                                                                                                                                                                                                                      |

#### Signature Generation&#x20;

The **Nitro Mode Market Order API** requires **signed data** for transaction execution.

```typescript
export interface OffchainOrder {
  marketId: string;
  accountId: string;
  sizeDelta: string;
  chainId: number;
  settlementStrategyId: string;
  referrerOrRelayer: `0x${string}`;
  allowAggregation: boolean;
  allowPartialMatching: boolean;
  reduceOnly: boolean;
  acceptablePrice: string;
  trackingCode: `0x${string}`;
  expiration: string;
  nonce: string;
}

export async function signOffchainOrder(
  privateKey: `0x${string}`,
  order: OffchainOrder,
  isMainnet: boolean = false,
) {

  const rpcUrl = isMainnet ? "https://rpc.sepolia.polynomial.fi/" : "https://rpc.sepolia.polynomial.fi/";
  const types = {
    OffchainOrder: [
      { name: 'marketId', type: 'uint128' },
      { name: 'accountId', type: 'uint128' },
      { name: 'sizeDelta', type: 'int128' },
      { name: 'settlementStrategyId', type: 'uint128' },
      { name: 'referrerOrRelayer', type: 'address' },
      { name: 'allowAggregation', type: 'bool' },
      { name: 'allowPartialMatching', type: 'bool' },
      { name: 'reduceOnly', type: 'bool' },
      { name: 'acceptablePrice', type: 'uint256' },
      { name: 'trackingCode', type: 'bytes32' },
      { name: 'expiration', type: 'uint256' },
      { name: 'nonce', type: 'uint256' },
    ],
  };

  const walletClient = createWalletClient({
    transport: http(rpcUrl),
    account: privateKeyToAccount(privateKey),
  });

  const mainnetDomain = {
    name: 'PolynomialPerpetualFutures',
    version: '1',
    chainId: 8008,
    verifyingContract: "0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688" as `0x${string}`,
  };
  const testnetDomain = {
    name: 'PolynomialPerpetualFutures',
    version: '1',
    chainId: 80008,
    verifyingContract: "0x52Fdc981472485232587E334c5Ca27F241CbA9AA" as `0x${string}`,
  };
  

  return await walletClient.signTypedData({
    account: privateKeyToAccount(privateKey),
    domain: isMainnet ? mainnetDomain : testnetDomain,
    types,
    primaryType: 'OffchainOrder',
    message: order as any,
  });
}
```

You can find a working TypeScript example [here](https://github.com/Polynomial-Protocol/polynomial-starter-kit/blob/5dbaf415ac79d41352d6330e0cfcba9e7977cfa2/lib/nitromode.ts#L17).

### On-Chain Order via Contract Call

API wallets are permitted to create market orders directly through a **smart contract call**.\
Note: Since this method does **not use a relayer**, there may be a slight delay in order settlement.

For more details, refer to the [documentation](/developer-documentation/perps-core/connector-contracts)


# Price

Learn how to retrieve the Index Price, Market Price, and Fill Price for trades using the available APIs.

### Index Price

The **Index Price** represents the asset price as reported directly by the [Pyth oracle](https://pyth.network/) feed. You can retrieve it from the `price` field in the response of either the [Markets API](/developer-documentation/api/markets#retrieve-all-markets-info) or the [Individual Market API.](/developer-documentation/api/markets#retrieve-single-market-info)

**Example Response:**

```json
{
  "marketId": "100",
  "symbol": "ETH",
  "skew": "-816032563610058179",
  "price": 2751.21510528,
  "currentOI": "171613599036410749027",
  ...
}
```

### Market Price

The **Mark Price** is a dynamic price adjusted based on open interest skew. You can calculate it using the following formula:

```ts
const indexMultiplier = BigNumber(1e18)
  .plus(
    BigNumber(marketData.skew.toString())
      .dividedBy(marketData.skewScale as string)
      .multipliedBy(1e18)
  );

const markPrice = BigNumber(marketData.price)
  .multipliedBy(indexMultiplier.toString())
  .dividedBy(1e18)
  .toFixed(0);
```

Here, `marketData` is from the response from the [Markets API](/developer-documentation/api/markets#retrieve-all-markets-info) or the [Individual Market API](/developer-documentation/api/markets#retrieve-single-market-info).&#x20;

### Fill price

The **Fill Price** is the most accurate estimate of the execution price for a trade. It accounts for **slippage**, **skew**, and other adjustments, giving you a realistic expectation of what the trade will fill at for a given size.&#x20;

You can fetch this value using the [Post-Trade Details AP](/developer-documentation/api/orders#fetch-post-order-details)I:

```json
{
  "totalFees": "113173321557870967",
  "fillPrice": "2735468306793171306346",
  ...
}
```

> **Note:** When submitting a trade order, it’s recommended to pass a slightly more aggressive price than the one returned by the Post-Trade Details API. This is because the market can shift between the time you fetch the details and the moment the trade is executed. You can find an example implementation [here](https://github.com/Polynomial-Protocol/polynomial-starter-kit/blob/54aefb1375fdc37ac355d5c1c831de952473ad4c/lib/order.ts#L17).


# Markets

### Retrieve All Markets Info

Use this endpoint to fetch information about all available markets, including trading pairs, status, and configuration details.

`GET`  `https://perps-api-mainnet.polynomial.finance/markets`

#### Headers&#x20;

| Name         | Value                                                                               |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

#### Response

```json
[
  {
    "chainId": 8008,
    "markets": [
      {
        "marketId": "100",
        "symbol": "ETH",
        "skew": "-816032563610058179",
        "price": 2751.21510528,
        "currentOI": "171613599036410749027",
        "currentFundingRate": "398350812914667",
        "currentFundingVelocity": "-73442930724900",
        "makerFeeRatio": "200000000000000",
        "takerFeeRatio": "500000000000000",
        "skewScale": "100000000000000000000000",
        "maxMarketSize": "890600000000000000000",
        "maxMarketValue": "2440000000000000000000000",
        "tradesCount24h": 179,
        "tradesVolume24h": 1424621.5226680883,
        "price24HrAgo": 2762.8500625,
        "longOI": "85398783236400345424.00",
        "shortOI": "86214815800010403603.00",
        "currentSkew": "-816032563610058179",
        "positiveSkew": "49.76",
        "negativeSkew": "50.24",
        "availableLiquidityLong": "2205049577587482924536081",
        "availableLiquidityShort": "2202804496472078570026277",
        "currentFundingRate1HInPercentage": "1659795053811113",
        "currentFundingRate8HInPercentage": "13278360430488900",
        "currentFundingRate1YInPercentage": "14539804671385345500",
        "currentInterestRate1HInPercentage": "0",
        "currentInterestRate8HInPercentage": "0",
        "currentInterestRate1YInPercentage": "0",
        "netLongFundingRate1HInPercentage": "-1659795053811113",
        "netLongFundingRate8HInPercentage": "-13278360430488900",
        "netLongFundingRate1YInPercentage": "-14539804671385345500",
        "netShortFundingRate1HInPercentage": "1659795053811113",
        "netShortFundingRate8HInPercentage": "13278360430488900",
        "netShortFundingRate1YInPercentage": "14539804671385345500"
      }
      ...
    ]
  }
]

```

### Retrieve Single Market Info

Use this endpoint to fetch information about a particular market.

`GET`  `https://perps-api-mainnet.polynomial.finance/markets/<market_id>?chainId=<chain_id>`

#### Headers&#x20;

| Name         | Value                                                                                                                       |
| ------------ | --------------------------------------------------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                                                            |
| Accept       | application/json                                                                                                            |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional)                                         |
| market\_id   | You can find market id from markets api response. [Markets](/developer-documentation/api/markets#retrieve-all-markets-info) |
| chain\_id    | 8008 (mainnet) [Addresses](/developer-documentation/api/addresses)                                                          |

#### Response

```json
{
  "marketId": "100",
  "symbol": "ETH",
  "skew": "45546282374751452350",
  "price": 2424.36710185,
  "currentOI": "71301371035630763614",
  "currentFundingRate": "-62676311217304",
  "currentFundingVelocity": "4099165413727626",
  "makerFeeRatio": "200000000000000",
  "takerFeeRatio": "500000000000000",
  "skewScale": "100000000000000000000000",
  "maxMarketSize": "998240000000000000000",
  "maxMarketValue": "2440000000000000000000000",
  "tradesCount24h": 199,
  "tradesVolume24h": 1488494.92316207,
  "price24HrAgo": 2418.4,
  "longOI": "58423826705191107982.00",
  "shortOI": "12877544330439655632.00",
  "currentSkew": "45546282374751452350",
  "positiveSkew": "81.94",
  "negativeSkew": "18.06",
  "availableLiquidityLong": "2278459412322493199191288",
  "availableLiquidityShort": "2388880320923411113339136",
  "currentFundingRate1HInPercentage": "-261151296738767",
  "currentFundingRate8HInPercentage": "-2089210373910133",
  "currentFundingRate1YInPercentage": "-2287685359431596000",
  "currentInterestRate1HInPercentage": "0",
  "currentInterestRate8HInPercentage": "0",
  "currentInterestRate1YInPercentage": "0",
  "netLongFundingRate1HInPercentage": "261151296738767",
  "netLongFundingRate8HInPercentage": "2089210373910133",
  "netLongFundingRate1YInPercentage": "2287685359431596000",
  "netShortFundingRate1HInPercentage": "-261151296738767",
  "netShortFundingRate8HInPercentage": "-2089210373910133",
  "netShortFundingRate1YInPercentage": "-2287685359431596000"
}
```

### Response Fields

| Variable                            | Description                                                                                                                   |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `marketId`                          | Unique identifier for the market                                                                                              |
| `symbol`                            | Trading symbol of the asset                                                                                                   |
| `skew`                              | Current market skew (imbalance between long and short open interest). *18 decimals*                                           |
| `price`                             | Current [Index price](/developer-documentation/api/price#index-price) of the asset                                            |
| `currentOI`                         | Total current Open Interest. *18 decimals*                                                                                    |
| `currentFundingRate`                | Current funding rate. [Details](https://docs.polynomial.fi/trade/trade/perp/funding-rate/funding-on-polynomial)               |
| `currentFundingVelocity`            | Rate of change of the funding rate. [Details](https://docs.polynomial.fi/trade/trade/perp/funding-rate/funding-on-polynomial) |
| `makerFeeRatio`                     | Fee ratio applied to makers                                                                                                   |
| `takerFeeRatio`                     | Fee ratio applied to takers                                                                                                   |
| `skewScale`                         | Scale used to normalize market skew. Usage [example](/developer-documentation/api/price#market-price)                         |
| `maxMarketSize`                     | Maximum allowed open interest for this market.  *18 decimals*                                                                 |
| `maxMarketValue`                    | Maximum notional value allowed in the market                                                                                  |
| `tradesCount24h`                    | Number of trades in the last 24 hours                                                                                         |
| `tradesVolume24h`                   | Trading volume in the last 24 hours                                                                                           |
| `price24HrAgo`                      | Price of the asset 24 hours ago                                                                                               |
| `longOI`                            | Open interest held by long positions.  *18 decimals*                                                                          |
| `shortOI`                           | Open interest held by short positions.  *18 decimals*                                                                         |
| `currentSkew`                       | Skew between long and short open interest                                                                                     |
| `positiveSkew`                      | Percentage of long positions                                                                                                  |
| `negativeSkew`                      | Percentage of short positions                                                                                                 |
| `availableLiquidityLong`            | Available liquidity for opening long positions                                                                                |
| `availableLiquidityShort`           | Available liquidity for opening short positions                                                                               |
| `currentFundingRate1HInPercentage`  | Funding rate over the last 1 hour.  *18 decimals*                                                                             |
| `currentFundingRate8HInPercentage`  | Funding rate over the last 8 hours.  *18 decimals*                                                                            |
| `currentFundingRate1YInPercentage`  | Funding rate over the last year.  *18 decimals*                                                                               |
| `currentInterestRate1HInPercentage` | 0                                                                                                                             |
| `currentInterestRate8HInPercentage` | 0                                                                                                                             |
| `currentInterestRate1YInPercentage` | 0                                                                                                                             |
| `netLongFundingRate1HInPercentage`  | Net funding rate paid by longs over 1 hour.  *18 decimals*                                                                    |
| `netLongFundingRate8HInPercentage`  | Net funding rate paid by longs over 8 hours.  *18 decimals*                                                                   |
| `netLongFundingRate1YInPercentage`  | Net funding rate paid by longs over 1 year.  *18 decimals*                                                                    |
| `netShortFundingRate1HInPercentage` | Net funding rate received by shorts over 1 hour.  *18 decimals*                                                               |
| `netShortFundingRate8HInPercentage` | Net funding rate received by shorts over 8 hours.  *18 decimals*                                                              |
| `netShortFundingRate1YInPercentage` | Net funding rate received by shorts over 1 year.  *18 decimals*                                                               |


# Account

### Retrieve Account Info

`GET`  `https://perps-api-mainnet.polynomial.finance/accounts?owner=<wallet_addr>&ownershipType=SuperOwner&chainIds=<chain_id>`

#### Query&#x20;

| Name         | Value                                                              |
| ------------ | ------------------------------------------------------------------ |
| wallet\_addr | Main account wallet address                                        |
| chain\_id    | 8008 (mainnet) [Addresses](/developer-documentation/api/addresses) |

#### Headers&#x20;

| Name         | Value                                                                               |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

####

#### Response

```json
[
  {
    "owner": "0xcAAAAAEE5FA8d10eEe31Cf06ba5B2E6f0487436",
    "superOwner": "0x3AAAAA1daCFD0d259fadC5124a7C14f4F544F2DC",
    "accountId": "100000083460469231731687303715884105732",
    "chainId": 8008,
    "debt": "959440974158424928"
  }
]

```

> As you can notice, the primary account wallet is named as superOwner. Owner field is your Account abstracted smart contract wallet. For more details \<ADD\_LINK>


# Positions

### Retrieve All Positions&#x20;

Use this endpoint to fetch all **open  positions** associated with the specified trading account.

`GET`  `https://perps-api-mainnet.polynomial.finance/positions/v2?&owner=<wallet_addr>&ownershipType=SuperOwner`

#### Query&#x20;

| Name         | Value                       |
| ------------ | --------------------------- |
| wallet\_addr | Main account wallet address |

#### Headers&#x20;

| Name         | Value                                                                               |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

#### Response

```json
{
  "owner": "0x0000001daCFD0d259fadC5124a7C14f4F544F2DC",
  "positions": [
    {
      "orderType": "DelayedOffchain",
      "accountId": "100000083460469231731687303715884105732",
      "chainId": 8008,
      "marketId": "100",
      "size": "-300000000000000",
      "totalRealisedFundingUsd": "17378263562273",
      "totalRealisedPnlUsd": "-1515497861293361",
      "unrealisedFundingUsd": "1271335875762409",
      "totalVolumeUsd": "2465240343741734068",
      "avgEntryPrice": "2737472050978267451314",
      "latestInteractionPrice": "2742523710515911989046",
      "liquidationPrice": "320168214434283200000000",
      "entryTimestamp": 1749567323,
      "breakEvenPriceIncludingClosingFee": "289223961992217044461",
      "breakEvenPriceExcludingClosingFee": "785277215309474270249",
      "totalRealisedInterestUsd": "0",
      "unrealisedInterestUsd": "0",
      "tpsl": null
    }
    ...
  ],
  "totalCount": 1
}

```


# Orders

### Fetch Post Order Details

Use this endpoint to preview the outcome of a potential order. It provides critical information such as:

* Estimated liquidation price (post-order)
* AMM fees
* Expected fill price
* Margin impact, price impact and other execution metrics

`POST`  `https://perps-api-mainnet.polynomial.finance/post-trade-details?chainId=<chain_id>`

#### Query&#x20;

| Name      | Value                                                              |
| --------- | ------------------------------------------------------------------ |
| chain\_id | 8008 (mainnet) [Addresses](/developer-documentation/api/addresses) |

#### Headers&#x20;

| Name         | Value                                                                               |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

#### Request body

| Name      | Type   | Description                                                                                    |
| --------- | ------ | ---------------------------------------------------------------------------------------------- |
| accountId | string | Perp Account Id. Returned by accounts api \<ADD\_LINK>                                         |
| marketId  | string | From `markets` [api](/developer-documentation/api/markets#retrieve-all-markets-info) response. |
| sizeDelta | string | With 18 decimals precision. Ex `-1000000000000000000` for shorting -1 size                     |

#### Response

```json
{
    "totalFees": "113173321557870967",
    "fillPrice": "2735468306793171306346",
    "newHealthFactor": 2.6465412772448293,
    "settlementReward": "112673318234506925",
    "ammFees": "500003323364042",
    "nonVipAmmFees": "500003323364042",
    "priceImpact": "669242470939254",
    "newMarginUsage": 37.78516543830542,
    "feasible": true,
    "isPriceImpactProfitable": false,
    "liquidationPrice": "0",
    "errorMsg": null
}
```

### Retrieve All Orders

Use this endpoint to fetch the full list of orders associated with the account.

`GET`  `https://perps-api-mainnet.polynomial.finance/orders/v2?owner=<wallet_addr>&ownershipType=SuperOwner&statuses=<status>`<br>

#### Query

| Name         | Value                                                                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| wallet\_addr | 8008 (mainnet) [Addresses](/developer-documentation/api/addresses)                                                                    |
| statuses     | <p>Support : \[<code>Created,Committed,Expired,LimitSubmitted,LimitExecuted]</code><br>Eg: <code>statuses=Commited,Expired</code></p> |

#### Headers&#x20;

| Name         | Value                                                                               |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

#### Response

```json
{
  "owner": "0x3000001daCFD0d259fadC5124a7C14f4F544F2DC",
  "orders": [
    {
      "orderType": "Limit",
      "user": "0xc000007EE5FA8d10eEe31Cf06ba5B2E6f0487436",
      "accountId": "100000183460469231731687303715884105732",
      "marketId": "100",
      "chainId": 8008,
      "size": "401328244675427",
      "signature": null,
      "expiry": 1780774691910,
      "priceRange": {
        "priceA": "1",
        "priceB": "4000000000000000000",
        "acceptablePrice": "4200000000000000000",
        "priceANum": 1e-18,
        "priceBNum": 4,
        "acceptablePriceNum": 4.2
      },
      "tpPriceRange": {
        "priceA": "0",
        "priceB": "0",
        "acceptablePrice": "0",
        "priceANum": 0,
        "priceBNum": 0,
        "acceptablePriceNum": 0
      },
      "slPriceRange": {
        "priceA": "0",
        "priceB": "0",
        "acceptablePrice": "0",
        "priceANum": 0,
        "priceBNum": 0,
        "acceptablePriceNum": 0
      },
      "status": "LimitSubmitted",
      "orderId": 28180,
      "onchain": true,
      "hasLimitOrder": true,
      "hasTpSlOrder": false,
      "tpSlExecutionType": null,
      "limitOrderExecutionDetails": null,
      "tpslOrderExecutionDetails": null,
      "submissionTxDetails": {
        "chainId": 8008,
        "blockNumber": 15600261,
        "blockHash": "0xdf081b8f06c62f8e8ed56c6778e433fb50980a306efe199ac5863db40a053409",
        "txHash": "0x319168e6578bbf4c54f71996146978012d762cf0f0d1a2686880dbf435d45916",
        "logIndex": 1,
        "timestamp": 1749238697
      },
      "updateTxDetails": null,
      "timestamp": 1749238698182
    }
    ...
  ],
  "totalCount": 3
}

```


# Trade Referral

Developers can build custom integrations to onboard users using a referral code and earn a share of their trading fees. Integration users will be required to sign a predefined message to redeem your referral code.

**Related links:**

* [Generate a referral code](https://polynomial.fi/en/mainnet/portfolio/referrals)
* [Referral fee structure](https://docs.polynomial.fi/trade/trade/referral-program)

### Redeem a referral code

Use this endpoint to redeem a referral code.&#x20;

`POST`  `https://trading-rewards-mainnet.polynomial.finance/referrals/accept`

#### Headers&#x20;

| Name         | Value                                                                               |
| ------------ | ----------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                    |
| Accept       | application/json                                                                    |
| x-api-key    | [Introduction](/developer-documentation/api/introduction#backend-api-key)(optional) |

#### Request body

| Name          | Type   | Description                                                               |
| ------------- | ------ | ------------------------------------------------------------------------- |
| wallet        | string | Integration Users wallet Address                                          |
| referralCode  | string | Developer's accounts referral code                                        |
| signedMessage | string | User Signed Message, content  - `Accepting referral for Polynomial Perps` |

#### Success Response - `HTTP 201`


# Links

* **Example Repository**\
  TypeScript integration examples\
  [View Repo ](https://github.com/Polynomial-Protocol/polynomial-starter-kit/tree/master)
* **Generate / Authorize API Wallet**\
  Create or link an API wallet to your main trading account\
  [Get Started ](https://polynomial.fi/en/mainnet/portfolio/api-wallet)
* **Support & Queries**\
  Reach out for help or open a support ticket\
  [Contact Support](https://discord.com/channels/843170059006640179/986580658015076353)
* **General Trade Platform Docs**\
  [View Docs](https://docs.polynomial.fi/trade)
* **Trade Platform**\
  [Launch App](https://polynomial.fi/en/mainnet/trade/ETH-USD)
* **Stake Platform**\
  [Launch App](https://polynomial.fi/mainnet/earn)


# Rate limits

All backend endpoints are publicly accessible. However, to prevent hitting rate limits quickly, requests **must** include the `x-api-key` header.

API requests are rate-limited per **API key** and **IP address**, covering most standard integration needs. If the request limit is exceeded, the server will respond with an `HTTP`` `**`429 – Too Many Requests`** status code.

If your bot is receiving this error despite staying within the fair limits, or if you wish to request a higher rate limit, please create a [support ticket](https://discord.com/channels/843170059006640179/986580658015076353)


# Addresses

### Polynomial - mainnet <a href="#polynomial-mainnet" id="polynomial-mainnet"></a>

**Chain explorer**: <https://polynomialscan.io/>

ChainId : 8008

RPC: `https://rpc.polynomial.fi` , `https://rpc-proxy.polynomial.fi`

| Contract                  | Address                                                                                                                                       |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Perps Proxy Address       | [0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688](https://polynomialscan.io/address/0xD052Fa8b2af8Ed81C764D5d81cCf2725B2148688/contract/8008/code) |
| Perps Automation Contract | 0xd8088A6133a35bfD4990328E5078c3F6BE8CA30B \<UPDATE>                                                                                          |

### Polynomial Sepolia - testnet <a href="#polynomial-sepolia-testnet" id="polynomial-sepolia-testnet"></a>

**Chain explorer**: <https://sepolia.polynomialscan.io/>

ChainId : 80008

RPC:


# Change log

Keep track of recent updates and improvements to the platform

**2025-06-13** – *Release of docs*

* Initial version of documentation is live
* Basic info APIs required to conduct a trade
* Market order flow using **Nitro Mode**

**2025-06-26** – *Docs Update*

* New Prices [page](/developer-documentation/api/price)
* Single [Market API](/developer-documentation/api/markets#retrieve-single-market-info)

**2025-06-27** – *Docs Update*

* Trade referrals [page](/developer-documentation/api/trade-referral)


# Smart Contract Wallet - Zerodev

Polynomial core contracts supports  Account Abstracted (AA) Wallets based on[ ERC 4337](https://www.erc4337.io/).  Currently we uses Zerodev as our primary AA provider and this docs will be containing configurations and examples of using zerodev Smart contract wallets for trade in Polynomial perps.

*It is not mandatory to use AA wallets to trade on polynomial. But txs from AA wallet will be sponsored.  You can save gas fees by using AA wallets rather than directly interacting with your EOA.*&#x20;

### Bundler and Paymaster config

```typescript

bundlerAPI: 'https://polynomial-mainnet.g.alchemy.com/v2/nUkjX-R-WfZwctQu_TLm0xQ7KI8TVXaD',
paymasterAPI: 'https://polynomial-mainnet.g.alchemy.com/v2/nUkjX-R-WfZwctQu_TLm0xQ7KI8TVXaD',
policy: '14119bab-6c62-4fed-8fe7-27ad5fcc5754'

```

### Sample Code Snippets

#### AA client Setup (Typescript)

* Uses Wagmi , Viem and zerodev sdk

```typescript
import { getWalletClient } from '@wagmi/core';
import { signerToEcdsaValidator, getKernelAddressFromECDSA } from '@zerodev/ecdsa-validator';
import {createPublicClient} from 'viem';
import {
	addressToEmptyAccount,
	createKernelAccount,
	createKernelAccountClient
} from '@zerodev/sdk';

const client = await getWalletClient(wagmiConfig);

const publicClient = createPublicClient({
	transport: http(getZeroDevBundlerRPC(chain.id, true, ZERODEV_PROVIDER)),
	chain: chain
});

const ecdsaValidator = await signerToEcdsaValidator(publicClient, {
	signer: client,
	entryPoint,
	kernelVersion: KERNEL_V3_1
});

const account = await createKernelAccount(publicClient, {
	plugins: {
		sudo: ecdsaValidator
	},
	entryPoint,
	index: 8008n,
	kernelVersion: "0.3.1"

});

const aaClient = createKernelAccountClient({
	account,
	chain,
	pollingInterval: 500,
	bundlerTransport: http(getZeroDevBundlerRPC(chain.id, false, ZERODEV_PROVIDER)),
	paymaster: {
		getPaymasterData(userOperation) {
			return sponsorUserOperationPolynomial({
				userOperation,
				entryPoint,
				chain
			});
		}
	},
	userOperation: {
		estimateFeesPerGas() {
			return {
				maxFeePerGas: 0n,
				maxPriorityFeePerGas: 0n
			};
		}
	}
});

```

#### SponsorUserOperation function

```typescript
const sponsorUserOperationPolynomial = async (params: {
	userOperation: any;
	entryPoint: entryPointType;
	chain: Chain;
}) => {
	const { userOperation, entryPoint, chain } = params;
	if (chain.id !== polynomialSepolia.id && chain.id != polynomialChain.id) {
		throw new Error('Invalid chain id');
	}

	const policyId = config[chain.id].erc4337.policy;
	const bundlerAPI = config[chain.id].erc4337.bundlerAPI;
	const options = {
		method: 'POST',
		headers: {
			accept: 'application/json',
			'content-type': 'application/json'
		},
		body: JSON.stringify({
			id: 1,
			jsonrpc: '2.0',
			method: 'alchemy_requestGasAndPaymasterAndData',
			params: [
				{
					policyId: policyId,
					entryPoint: entryPoint.address,
					dummySignature: userOperation.signature,
					userOperation: {
						sender: userOperation.sender,
						nonce: `0x${userOperation.nonce.toString(16)}`,
						factory: userOperation.factory,
						factoryData: userOperation.factoryData,
						callData: userOperation.callData
					}
				}
			]
		})
	};

	const response = await (await fetch(bundlerAPI, options)).json();
	const data = response;

	const result: any = {
		...userOperation,
		paymaster: data.result.paymaster,
		paymasterData: data.result.paymasterData,
		preVerificationGas: BigInt(data.result.preVerificationGas),
		verificationGasLimit: BigInt(data.result.verificationGasLimit),
		callGasLimit: BigInt(data.result.callGasLimit),
		paymasterVerificationGasLimit: BigInt(data.result.paymasterVerificationGasLimit),
		paymasterPostOpGasLimit: BigInt(data.result.paymasterPostOpGasLimit),
		maxFeePerGas: BigInt(data.result.maxFeePerGas),
		maxPriorityFeePerGas: BigInt(data.result.maxPriorityFeePerGas)
	};
	return result;
};
```

#### Transaction Execution through Zerodev

```typescript
export const executeTransactionThroughZerodev = async (
	_smartContractWalletAddress: address,
	_target: address[],
	_callData: Hex[],
	value: bigint[],
	callType: string = CALL_TYPE.DELEGATE_CALL,
	retry = false
) => {

	const kernelClient = get(aaWalletClient); // Checkout setup code

	const encodedCallData = await kernelClient.account.encodeCalls(
		_target.map((target, index) => ({
			to: target,
			data: _callData[index],
			value: value[index],
		})),
		callType
	);

	const entryPoint = kernelClient.account.entryPoint;
	const userOp = await kernelClient.signUserOperation({
		callData: encodedCallData,
		preVerificationGas: ZERODEV_GAS_LIMITS.PRE_VERIFICATION_GAS,
		callGasLimit: ZERODEV_GAS_LIMITS.CALL_GAS_LIMIT,
		verificationGasLimit: ZERODEV_GAS_LIMITS.VERIFICATION_GAS_LIMIT,
		maxFeePerGas: retry ? 1n : 0n,
		maxPriorityFeePerGas: retry ? 1n : 0n
	});

	const userOpHash = await kernelClient.sendUserOperation({

		entryPoint,
		...userOp
	});

	return {
		executedType: EXECUTED_TYPE.ZERO_DEV,
		txData: userOpHash
	};
};

```


# Connector Contracts

You can find the contract address [here](/developer-documentation/api/addresses) . If you are using AA wallets according to previous guide, calling these contract functions will be the quickest way to integrate with Perps trading.&#x20;

* **unit128 accountId**
* **bool weiToSend**
* **bytes memory updateOracle**

### Create Account

```solidity
function createAccountAddCollateral(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 spotSynthMarketId,
        uint128 perpSynthMarketId,
        uint256 collateralAmount
    ) public payable
```

* **updateOracle:  Oracle data to be updated. For more details pyth-oracle \<TODO>**
* **spotSynthMarketId**
  * &#x20;USDC  1n
* **perpSynthMarketId**
  * **USDC** 0n
* **collaeralAmount**
  * Amount to be send as collateral

### Add collateral to trade

```solidity
function addCollateralFromSCW(
        uint128 accountId,
        uint128 spotSynthMarketId,
        uint128 perpSynthMarketId,
        uint256 collateralAmount,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData
    ) public payable
```

### Remove collateral from trade

```solidity
function removeCollateralToSCW(
        uint128 accountId,
        uint128 spotSynthMarketId,
        uint128 perpSynthMarketId,
        uint256 collateralAmount,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData
    ) public payable
```

### Long Market Order

```solidity
function long(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        uint256 size,
        uint256 acceptablePrice,
        bytes calldata vipUpgradeData
    ) public payable
```

* **size**
  * Market order size
* vipUpgradeData
  * 0x

### Short Market Order

```solidity
function short(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        uint256 size,
        uint256 acceptablePrice,
        bytes calldata vipUpgradeData
    ) public payable
```

### Reduce Position Size

```solidity
  function reduceSize(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        int128 sizeDelta,
        uint256 acceptablePrice,
        bytes calldata vipUpgradeData
    ) public
```

* acceptablePrice
  * You can pass any minimum required price for closing the position on market price. For the order to always pass through, you can pass worst case prices. For example&#x20;

    ```typescript
    position.long ? 1n : 10000000000000000000000000000000000000n
    ```
* **sizeDelta**
  * Use any size less than or equal to the position size

### Close a Position&#x20;

```solidity
    function close(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        uint256 acceptablePrice,
        uint256 limitOrderId,
        bytes calldata vipUpgradeData
    ) public
```

* **limitOrderId**
  * Pass in the full position TP/SL order Id

### Reverse Trade Position

```solidity
function reversePosition(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        uint256 acceptablePrice,
        uint256 limitOrderId,
        bytes calldata vipUpgradeData
    ) public
```

### Manuall Settle Trade

```solidity
function settleTrade(uint128 accountId, uint8 weiToSend, bytes memory oracleData) public
```

### Short with TPSL

```solidity
function shortAddTPSL(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        uint256 size,
        uint256 acceptablePrice,
        IFxAutomationsProxy.OrderRequest memory tpslOrder,
        bytes calldata vipUpgradeData
    ) public payable
```

* tpslOrder&#x20;
  * &#x20;ILimitOrder

```typescript
export interface IPriceRange {
	priceA: bigint;
	priceB: bigint;
	acceptablePrice: bigint;
}

export interface ILimitOrder {
	user: Address;
	price: IPriceRange;
	tpPrice: IPriceRange;
	slPrice: IPriceRange;
	accountId: bigint;
	marketId: bigint;
	size: bigint;
	expiry: bigint;
}
```

### Long with TPSL

```solidity
function longAddTPSL(
        uint128 accountId,
        bool updateOracle,
        uint8 weiToSend,
        bytes memory oracleData,
        uint128 marketId,
        uint256 size,
        uint256 acceptablePrice,
        IFxAutomationsProxy.OrderRequest memory tpslOrder,
        bytes calldata vipUpgradeData
    ) public payable
```

### Create Limit Order

```solidity
function placeLimitOrder(uint128 accountId, IFxAutomationsProxy.OrderRequest memory order) public
```

### Modify Limit Order

```

function modifyLimitOrder(uint128 accountId, uint256 oldOrderId, IFxAutomationsProxy.OrderRequest memory order)
        public
```

### Cancel Limit Order


