For DevelopersAPIGIP-3 Deployer Actions

GIP-3 Deployer Actions

GIP-3 defines the administrative actions available to the deployer of a GIP-1 token or GIP-2 pair. These actions enable the deployer to manage token parameters and pair settings after initial deployment.

Overview

The address that deploys a GIP-1 token or GIP-2 pair retains deployer privileges for that asset. These privileges allow limited administrative control without requiring protocol governance approval.

Deployer Privileges

ActionScopeDescription
setTokenMetadataGIP-1 tokenUpdate token display metadata
setTokenIconGIP-1 tokenSet or update the token icon URL
setPairFeesGIP-2 pairAdjust maker/taker fees for the pair
pausePairGIP-2 pairTemporarily halt trading on the pair
unpausePairGIP-2 pairResume trading on a paused pair
transferDeployerGIP-1/GIP-2Transfer deployer privileges to a new address

Set Token Metadata

Update display information for a deployed token.

{
  "action": {
    "type": "deployerAction",
    "subType": "setTokenMetadata",
    "tokenIndex": 10042,
    "metadata": {
      "description": "My custom token for DeFi applications",
      "website": "https://mytoken.xyz",
      "twitter": "@mytoken"
    }
  },
  "nonce": 1700000000123,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
FieldTypeDescription
tokenIndexintThe deployed token’s index
metadata.descriptionstringToken description (max 256 characters)
metadata.websitestring?Project website URL
metadata.twitterstring?Twitter/X handle

Set Pair Fees

Adjust the fee structure for a deployed trading pair. Fees are capped at protocol maximums.

{
  "action": {
    "type": "deployerAction",
    "subType": "setPairFees",
    "pairIndex": 10042,
    "makerFee": "0.001",
    "takerFee": "0.003"
  },
  "nonce": 1700000000123,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
FieldTypeDescription
pairIndexintThe deployed pair’s index
makerFeestringMaker fee rate (e.g., "0.001" = 0.1%)
takerFeestringTaker fee rate (e.g., "0.003" = 0.3%)

Fee Constraints

ConstraintValue
Minimum maker fee0%
Maximum maker fee0.5%
Minimum taker fee0.01%
Maximum taker fee1.0%
Maker fee must be <= taker feeEnforced

Pause / Unpause Pair

Temporarily halt trading on a pair. Open orders are cancelled. Existing positions remain but cannot be modified.

Pause

{
  "action": {
    "type": "deployerAction",
    "subType": "pausePair",
    "pairIndex": 10042,
    "reason": "Security review"
  },
  "nonce": 1700000000123,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}

Unpause

{
  "action": {
    "type": "deployerAction",
    "subType": "unpausePair",
    "pairIndex": 10042
  },
  "nonce": 1700000000123,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}

Transfer Deployer Privileges

Transfer deployer ownership to a new address. This is irreversible — the original deployer loses all administrative privileges.

{
  "action": {
    "type": "deployerAction",
    "subType": "transferDeployer",
    "assetIndex": 10042,
    "newDeployer": "0xNewDeployerAddress..."
  },
  "nonce": 1700000000123,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
FieldTypeDescription
assetIndexintToken or pair index
newDeployeraddressAddress receiving deployer privileges

Warning: Deployer transfer is permanent. Double-check the destination address before submitting.

Code Examples

TypeScript

import { GxClient } from "@gx-exchange/sdk";
 
const client = new GxClient();
await client.connect("https://api.gx.exchange");
client.setWallet("0xDeployerPrivateKey...");
 
// Update pair fees
const result = await client.exchange({
  action: {
    type: "deployerAction",
    subType: "setPairFees",
    pairIndex: 10042,
    makerFee: "0.001",
    takerFee: "0.003",
  },
  nonce: Date.now(),
});
 
console.log("Fee update:", result.status);

Python

from gx_exchange.exchange import Exchange
import eth_account
 
account = eth_account.Account.from_key("0xDeployerPrivateKey...")
exchange = Exchange(account, "https://api.gx.exchange")
 
result = exchange.deployer_action(
    sub_type="setPairFees",
    pair_index=10042,
    maker_fee="0.001",
    taker_fee="0.003",
)
print(f"Result: {result}")

Error Responses

ErrorCause
Not the deployerThe signing address is not the deployer of this asset
Token not foundThe specified token index does not exist
Pair not foundThe specified pair index does not exist
Fee exceeds maximumThe requested fee rate exceeds protocol caps
Pair already pausedAttempting to pause an already-paused pair
Pair not pausedAttempting to unpause a pair that is not paused