Godex.ai Docs
Offical SiteTwitter/XTelegram
  • πŸ‘‹Welcome to Godex
  • Getting Started
    • πŸ‘οΈOverview
    • πŸ‹Whales Vaults
      • How to Start Follow Whales?
      • Functionalities and Settings
      • Whale Types of Strategies
      • Statistics
      • How trades are performed
    • GoBank
      • Market Overview
      • Gobank Whitepaper
      • Liquidity Protocol
      • Supply or Saving
      • Borrow
      • Repay
      • Withdraw
      • Health Factor
      • Gobank’s Cashback Program
      • FAQ
    • πŸ’±C2C Trading
    • 🐳Copy Trading on DEX Exchange
      • Trader Explorer
      • HOW TO WORK
  • Godex Trading Engine
    • Godex Router Asset (GRA)
    • Smart Order Router
    • GoDex Referral Codes
    • Godex Wzap
  • Shared Liquidity Layer
    • Fees Structure
    • Affiliate Program
    • Partnership Program
  • User Guide
    • C2C Trading
      • How do I buy crypto on C2C trading?
      • What's the C2C Bussiness Program?
      • C2C Trading Legal Disclaimer
    • Use Guideline
      • Create/Import Web3 Wallet
      • How to Follow Whale
      • Bridge/Swap across chains?
      • How to Start/Stop Order with Smart Contract
    • Brand Kit
    • Ecosystem
    • Roadmap
    • πŸ›‘οΈWallet security
    • *️Risk Warning & Liability Disclaimer
  • AML Policy
    • Privacy policy
    • Terms of Use
Powered by GitBook
On this page
  • Overview
  • Register A Code
  • Setting Fees
  • Code Types
  1. Godex Trading Engine

GoDex Referral Codes

PreviousSmart Order RouterNextGodex Wzap

Last updated 1 year ago

Overview

Referral codes will also allow for platforms such as wallets or exchanges to monetize the swap volume from their user base by registering a partner fee connected to their referral code. The fee will then be charged by the GoDex router and deposited into the specified beneficiary address, allowing for a simple and easy monetization process.

Register A Code

Codes are registered on the router via the registerReferralCode function. You will need to register your code on each chain that you wish to use it on. We have created a frontend for transacting with this function and registering codes. Anyone integrating or using the GoDex API can use this frontend to register a referral code for inclusion in all API quote requests they make.

Info

Referral codes can only be registered once. If you need to change something, you will need to register a new code.

Setting Fees

When registering a referral code, there is an option to add an additional fee. This additional fee will be removed from the output amount of the swap by the router when the registered referral code is used. Of the removed fee, 20% will be retained by the router as protocol revenue while the other 80% will be sent to the specified beneficiary address at the time of the transaction. This mechanism provides an easy way for partners to monetize their swap volume without making, auditing, or, maintaining any of their own smart contracts.

Function
Owner Take
Referrer Take

Swap

Positive Slippage + 20% of fee

20% of fee

SwapMulti

0.01% + 20% of fee

20% of fee

CopyWhale

6% Profit + 20% of fee

Code Types

For the purposes of smart contract optimization, referral codes are split into two ranges/types. Codes with no additional fees (tracking/attribution only) are restricted to the range from 0 to 2147483648 (highest bit of uint32 is 0), while codes with an additional fee are restricted to the range from 2147483648 to 4294967296 (highest bit of uint32 is 1). This allows for the router contract to only make an additional storage read when the code used charges an additional fee.

Codes
Use

0 - AGD_18920f8

Tracking and Attribution

AGD_18920f9 - AGD_4294967296

Additional Fee

Register