Skip to content

tradao-xyz/TradaoOrderModule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

112 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tradao Order Module

A module to authorize owner to create orders on behalf of the user.

The module complies to Biconomy Abstract Account Version 2.0.0. Contracts consists of:

  • Gmxv2OrderModule: Restrict the operator to only a few operations, include deploy Smart Account, pay gas and create order on behalf of the user.
  • BiconomyModuleSetup: Return module address.
  • ProfitShare: Calculate follower profit share ratio with a discount.

Workflow

Alt text

Governance model

Alt text

Addresses

Arbitrum One

  • ERC1967Proxy: 0x6F9a3D73BCa55B63cd2570C236002fD1C5fC5056
  • Gmxv2OrderModule: 0xc54fD5965F8309368010510295641B1bfB721ED6 (proxied by the ERC1967Proxy)
  • ProfitShare: 0xBA6Eed0E234e65124BeA17c014CAc502B4441D64
  • Referrals: 0xdb3643FE2693Beb1a78704E937F7C568FdeEeDdf

  • TimelockController: 0xF66ba754cA6bF5f333DF02ba159963297a8e965A
  • BatchTokenTransfer: 0x717088c0d8Ddc9dDaD26fe8E3d2E0fb15d7aD0A9
  • RebatePlugin: 0x4b040f37FF540a0EDB1FDED8C11936fE0047Ef54 (prev: 0x6bfcB7DA12DE2Bfb874A4B1f12Ceb4EDF38470b2)

  • Operator: 0xad470962Ab06323C6C480bd94bEd4c23f8bA4D05, 0xAbc2E7AAD178C8f3DF2bdE0d1F2ae8a4DCdFcbD7
  • Owner of Gmxv2OrderModule: 0xF66ba754cA6bF5f333DF02ba159963297a8e965A (TimelockController, transaction)
  • Owner of BiconomyModuleSetup: 0xF66ba754cA6bF5f333DF02ba159963297a8e965A (TimelockController, transaction)
  • Owner of ProfitShare: 0x9a970aF3978198fe88eDdb3c8FCa1915e2CBb2d8 (multisig, transaction)
  • Proposer of TimelockController: 0x9a970aF3978198fe88eDdb3c8FCa1915e2CBb2d8 (multisig, transaction)
  • Executor of TimelockController: 0x0000000000000000000000000000000000000000 (any address, transaction)
  • Admin of TimelockController: Renounced (transaction)
  • Owner of RebatePlugin: 0xB12f2EFA06A7e7b4569E750Fb83aD9060eAf2F06 (transfer to multisig after test)

COMMON:

Arbitrum One, OP Mainnet, Polygon Mainnet, BNB Smart Chain Mainnet, BASE, Avalanch C-Chain, Ethereum Mainnet

  • BiconomyModuleSetup: 0x32b9b615a3D848FdEFC958f38a529677A0fc00dD
  • Deployer: 0xB12f2EFA06A7e7b4569E750Fb83aD9060eAf2F06

Ethereum Mainnet

  • PlaceholderModule: 0xb1B645011A893DACe075d2e153149574aD327AC0

Usage

Build

$ forge build

Deploy

$ forge create --rpc-url https://arb1.arbitrum.io/rpc \
    --private-key <key> \
    --etherscan-api-key <key> \
    --gas-limit <gasLimit> \
    --gas-price 0.1gwei \
    --legacy \
    --verify \
    src/Gmxv2OrderModule.sol:Gmxv2OrderModule \
    --constructor-args <operator>

Audit

https://github.com/peckshield/publications/tree/master/audit_reports/PeckShield-Audit-Report-Tradao-v1.0.pdf

About

An Abstract Account's module to authorize owner to create orders on behalf of the user

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors