{
  "axon_version": "1.0.0",
  "protocol": {
    "name": "Paraswap",
    "slug": "paraswap-ethereum",
    "version": "v6.2",
    "description": "DeFi middleware and DEX aggregator routing through the Augustus Swapper contract. Paraswap optimizes swap routes across 300+ liquidity sources, supports limit orders, and offers MEV protection via private transaction submission.",
    "category": "dex",
    "chain": {
      "id": 1,
      "name": "ethereum",
      "network": "mainnet"
    },
    "contracts": {
      "augustus_swapper": {
        "address": "0x6A000F20005980200259B80c5102003040001068",
        "label": "Augustus Swapper V6.2",
        "verified": true
      },
      "token_transfer_proxy": {
        "address": "0x216B4B4Ba9F3e719726886d34a177484278Bfcae",
        "label": "TokenTransferProxy",
        "verified": true
      },
      "augustus_rfq": {
        "address": "0xe92b586627ccA7a83dC919cc7127196d70f55a06",
        "label": "AugustusRFQ",
        "verified": true
      }
    },
    "links": {
      "website": "https://paraswap.io",
      "docs": "https://developers.paraswap.network",
      "github": "https://github.com/paraswap"
    },
    "off_chain_api": {
      "description": "Paraswap API provides off-chain route optimization across 300+ liquidity sources. Free to use with rate limits, no API key required for basic access.",
      "base_url": "https://api.paraswap.io",
      "authentication": {
        "type": "none",
        "description": "No API key required for basic access. Partner API keys available for higher rate limits."
      },
      "endpoints": {
        "prices": {
          "method": "GET",
          "path": "/prices",
          "description": "Get the best swap route and price across all supported liquidity sources",
          "parameters": {
            "srcToken": "Source token address",
            "destToken": "Destination token address",
            "amount": "Amount of source token in wei",
            "srcDecimals": "Decimals of source token",
            "destDecimals": "Decimals of destination token",
            "side": "SELL or BUY (swap direction)",
            "network": "Chain ID (1 for Ethereum)",
            "excludeDEXS": "(optional) Comma-separated DEXs to exclude",
            "includeDEXS": "(optional) Comma-separated DEXs to include exclusively",
            "maxImpact": "(optional) Maximum price impact percentage",
            "partner": "(optional) Partner name for fee sharing"
          }
        },
        "transactions": {
          "method": "POST",
          "path": "/transactions/1",
          "description": "Build transaction data for executing the swap on-chain",
          "parameters": {
            "srcToken": "Source token address",
            "destToken": "Destination token address",
            "srcAmount": "Amount of source token in wei",
            "destAmount": "Minimum destination amount (from price response)",
            "priceRoute": "Complete price route object from /prices response",
            "userAddress": "Address executing the swap",
            "partner": "(optional) Partner name",
            "slippage": "(optional) Slippage in basis points (default: 100 = 1%)",
            "deadline": "(optional) Transaction deadline timestamp"
          }
        }
      },
      "rate_limits": {
        "requests_per_second": 1,
        "requests_per_minute": 30
      }
    }
  },
  "actions": [
    {
      "id": "get_quote",
      "name": "Get Swap Quote",
      "description": "Fetches the optimal swap route and pricing from Paraswap's off-chain routing engine across 300+ liquidity sources. Returns a priceRoute object that must be passed to the /transactions endpoint for execution. Supports both SELL (exact input) and BUY (exact output) modes.",
      "type": "swap",
      "parameters": [
        {
          "name": "srcToken",
          "type": "address",
          "required": true,
          "description": "Contract address of the source token. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH."
        },
        {
          "name": "destToken",
          "type": "address",
          "required": true,
          "description": "Contract address of the destination token"
        },
        {
          "name": "amount",
          "type": "uint256",
          "required": true,
          "description": "Amount in wei — srcAmount if side=SELL, or destAmount if side=BUY"
        },
        {
          "name": "srcDecimals",
          "type": "uint256",
          "required": true,
          "description": "Decimal places of the source token (e.g. 18 for ETH, 6 for USDC)"
        },
        {
          "name": "destDecimals",
          "type": "uint256",
          "required": true,
          "description": "Decimal places of the destination token"
        },
        {
          "name": "side",
          "type": "string",
          "required": true,
          "description": "Swap direction: SELL (exact input) or BUY (exact output)",
          "constraints": {
            "enum": ["SELL", "BUY"]
          }
        },
        {
          "name": "excludeDEXS",
          "type": "string",
          "required": false,
          "description": "Comma-separated list of DEXs to exclude from routing"
        },
        {
          "name": "maxImpact",
          "type": "string",
          "required": false,
          "description": "Maximum price impact as a percentage (e.g. '10' for 10%)"
        },
        {
          "name": "partner",
          "type": "string",
          "required": false,
          "description": "Partner identifier for fee sharing and analytics"
        }
      ],
      "constraints": {
        "min_amount": "1",
        "max_slippage_bps": 5000,
        "deadline_required": false,
        "supported_tokens": "any_erc20_or_native"
      },
      "approvals": [],
      "transaction_flow": [
        {
          "step": 1,
          "action": "off_chain_quote",
          "description": "Call Paraswap Prices API to get optimal route and pricing. The response includes a priceRoute object needed for building the swap transaction.",
          "contract": "off_chain",
          "method": "GET /prices?srcToken={srcToken}&destToken={destToken}&amount={amount}&srcDecimals={srcDecimals}&destDecimals={destDecimals}&side={side}&network=1",
          "conditional": "always",
          "returns": ["priceRoute", "destAmount", "srcAmount", "bestRoute", "gasCost", "side"]
        }
      ],
      "risk_warnings": [
        "Price quotes have a limited validity window (~30 seconds) — fetch fresh quotes before execution",
        "The priceRoute object from the response must be passed unchanged to the /transactions endpoint",
        "Both srcDecimals and destDecimals are required and must match the actual token decimals",
        "Large swaps may show significant price impact — check the maxImpact field"
      ]
    },
    {
      "id": "swap",
      "name": "Execute Swap",
      "description": "Executes a token swap through the Paraswap Augustus Swapper. The flow is: (1) get a price quote, (2) approve the TokenTransferProxy, (3) build transaction via API, (4) submit on-chain. Token approvals are made to the TokenTransferProxy contract, NOT directly to Augustus.",
      "type": "swap",
      "parameters": [
        {
          "name": "srcToken",
          "type": "address",
          "required": true,
          "description": "Source token address. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH."
        },
        {
          "name": "destToken",
          "type": "address",
          "required": true,
          "description": "Destination token address"
        },
        {
          "name": "srcAmount",
          "type": "uint256",
          "required": true,
          "description": "Exact amount of source token to swap, in wei"
        },
        {
          "name": "destAmount",
          "type": "uint256",
          "required": true,
          "description": "Minimum acceptable destination amount (from price quote), in wei"
        },
        {
          "name": "priceRoute",
          "type": "string",
          "required": true,
          "description": "The complete priceRoute object from the get_quote response (JSON string)"
        },
        {
          "name": "userAddress",
          "type": "address",
          "required": true,
          "description": "Address of the wallet executing the swap"
        },
        {
          "name": "slippage",
          "type": "uint256",
          "required": false,
          "description": "Slippage tolerance in basis points (e.g. 100 = 1%)",
          "default": "100"
        },
        {
          "name": "deadline",
          "type": "uint256",
          "required": false,
          "description": "Unix timestamp deadline for the transaction"
        },
        {
          "name": "partner",
          "type": "string",
          "required": false,
          "description": "Partner identifier for fee sharing"
        }
      ],
      "constraints": {
        "min_amount": "1",
        "max_slippage_bps": 5000,
        "deadline_required": false,
        "supported_tokens": "any_erc20_or_native"
      },
      "approvals": [
        {
          "type": "erc20_approve",
          "token": "srcToken",
          "spender": "token_transfer_proxy",
          "amount": "exact_or_max"
        }
      ],
      "transaction_flow": [
        {
          "step": 1,
          "action": "check_allowance",
          "description": "Check if TokenTransferProxy has sufficient allowance for the source token. Important: approve the TokenTransferProxy, NOT Augustus directly.",
          "contract": "srcToken",
          "method": "allowance(address,address)",
          "conditional": "if_not_native_token"
        },
        {
          "step": 2,
          "action": "approve",
          "description": "Approve the TokenTransferProxy contract to spend source tokens",
          "contract": "srcToken",
          "method": "approve(address,uint256)",
          "conditional": "if_allowance_insufficient"
        },
        {
          "step": 3,
          "action": "off_chain_build_tx",
          "description": "POST to Paraswap Transactions API with the priceRoute to get optimized calldata",
          "contract": "off_chain",
          "method": "POST /transactions/1 {srcToken, destToken, srcAmount, destAmount, priceRoute, userAddress, slippage}",
          "conditional": "always",
          "returns": ["to", "data", "value", "gas", "chainId"]
        },
        {
          "step": 4,
          "action": "execute",
          "description": "Submit the swap transaction on-chain using the calldata from step 3. The Augustus Swapper routes through the optimal DEX path.",
          "contract": "augustus_swapper",
          "method": "multiSwap(bytes)",
          "returns": ["receivedAmount"]
        }
      ],
      "risk_warnings": [
        "Always approve the TokenTransferProxy (0x216B...), NOT the Augustus Swapper directly",
        "The priceRoute from step 1 (get_quote) must be passed unchanged to the build transaction step",
        "Quotes expire quickly — execute within 30 seconds of getting a price",
        "For large swaps, verify the price impact is acceptable before execution",
        "Paraswap uses a MEV protection system for Ethereum mainnet transactions"
      ]
    }
  ],
  "risk": {
    "audit_status": {
      "audited": true,
      "auditors": ["Pessimistic", "Iosiro", "MixBytes"],
      "last_audit_date": "2024-08-01",
      "audit_reports": [
        "https://developers.paraswap.network/smart-contracts/security-audits"
      ]
    },
    "tvl": {
      "current_usd": 0,
      "source": "defillama",
      "last_updated": "2026-03-07T00:00:00Z"
    },
    "incidents": [
      {
        "date": "2022-03-20",
        "severity": "high",
        "title": "Augustus V5 approval vulnerability",
        "description": "A critical vulnerability was found in Augustus v5 that could allow draining of approved tokens. Users were advised to revoke approvals. Patched in V6.",
        "resolved": true,
        "post_mortem": "https://paraswap.medium.com"
      }
    ],
    "risk_score": {
      "overall": "A",
      "smart_contract": "A",
      "centralization": "B+",
      "oracle_dependence": "A+",
      "liquidity": "A+"
    }
  },
  "fees": {
    "model": "per_trade",
    "tiers": [
      {
        "name": "protocol_fee",
        "fee_bps": 0,
        "description": "0% — Paraswap does not charge protocol fees to end users",
        "conditions": "Direct API usage without partner fee"
      },
      {
        "name": "positive_slippage_sharing",
        "fee_bps": null,
        "description": "Positive slippage (price improvement) is shared between the protocol and the user. Paraswap retains a portion of favorable price execution.",
        "conditions": "When execution price is better than quoted"
      },
      {
        "name": "partner_fee",
        "fee_bps": null,
        "description": "Optional partner revenue sharing fee, configured per partner agreement",
        "conditions": "When partner parameter is included"
      }
    ],
    "gas_estimates": {
      "swap_simple": "190000",
      "swap_complex_route": "400000",
      "approve": "46000"
    }
  }
}