---
# System prepended metadata

title: XDOGE-PERP

---

# xdoge perp 线上部署

## 准备
- gas:先准备 1 ether，用于部署和执行合约
- 准备参与多签的地址，等部署和配置完成

## 合约部分
#### Base Mainnet

##### Margin
| name             | symbol  | decimals | address                                                                                                                 |
|------------------|---------|----------|-------------------------------------------------------------------------------------------------------------------------|
| USD Coin         | USDC    | 6        | [0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913](https://basescan.org/address/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)   |
| USD Base Coin    | USDbC   | 6        | [0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA](https://basescan.org/address/0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA)   |
| Dai Stablecoin   | DAI     | 18       | [0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb](https://basescan.org/address/0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb)   |

#### Underlying
| name                | symbol  | decimals | address                                    |
|---------------------|---------|----------|--------------------------------------------|
| Base tBTC v2        | BTC/USD | 18       | 0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b |
| Wrapped Ether       | ETH/USD | 18       | 0x4200000000000000000000000000000000000006 |

#### Contract
| name                | address                                                                                                                            | comment   |     |
|---------------------|------------------------------------------------------------------------------------------------------------------------------------|-----------|-----|
| TradeX              | [0x43Fef6F66E9b9Be084d4a50EA2498eb71A287C50](https://louper.dev/diamond/0x43Fef6F66E9b9Be084d4a50EA2498eb71A287C50?network=base)   | eip-2535  |     |
| TradeX LP           | 0x3e9410c62232a7577a67cc82B631e3d4cf07243D                                                                                         | eip-1822  |     |

- 权限
#### Base Mainnet

##### Account
|                                            |               |                                                      |
|--------------------------------------------|---------------|------------------------------------------------------|
| **Address**                                | **Type**      | **Description**                                      |
| 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3 | Safe(4/6)     |                                                      |
| 0xD31A4647b8B9c259F8ABB9dE789b6e26a5FD0Df0 | EOA           | Halo                                                 |
| 0x18990d6dEbf460B6b100d706EFaEE180898A67b2 | EOA           | spockP                                               |
| 0x0744f3D556C528ae73835018443635c0318ba8c3 | EOA(Keystore) | keeper-01(js): LimitOrderFacet.executeLimitOrder     |
| 0x071BF4e0381536Cf916f935f656E975b10607Cc5 | EOA(Keystore) | keeper-02(js): LimitOrderFacet.executeLimitOrder     |
| 0xf51EbCF37158FEE03bF3c3ad12c751dA040b52c8 | EOA(Keystore) | keeper-01(js): TradingCloseFacet.executeTpSlOrLiq    |
| 0x547809aA1D2Af95D9fB6EcA44a707C3EAD7CA159 | EOA(Keystore) | keeper-02(js): TradingCloseFacet.executeTpSlOrLiq    |
| 0x5e4DBD49E040735221cBFF339f73fe2B183c76B2 | EOA(Keystore) | keeper-01(js): PriceFacadeFacet.requestPriceCallback |
| 0x3aeC3B3A970331456c2d5D5a41Db9E8D7b085991 | EOA(Keystore) | keeper-02(js): PriceFacadeFacet.requestPriceCallback |
|                                            |               |                                                      |

##### TradeXLP
| **Role**               | **Description**                                                                                    | **MemberCount** | **Member**                                 |
|------------------------|----------------------------------------------------------------------------------------------------|-----------------|--------------------------------------------|
| **DEFAULT_ADMIN_ROLE** | The admin role for all roles                                                                       | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3 |
| **ADMIN_ROLE**         | pause<br>unpause<br>addFromWhiteList<br>removeFromWhiteList<br>addToWhiteList<br>removeToWhiteList | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3 |
| **MINTER_ROLE**        | mint                                                                                               | 1               | 0x43Fef6F66E9b9Be084d4a50EA2498eb71A287C50 |
| **UPGRADER_ROLE**      | upgradeToAndCall                                                                                   | 0               |                                            |
|                        |                                                                                                    |                 |                                            |

##### TradeX
|                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                 |                                                                                                                                                                                      |
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Role**                        | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | **MemberCount** | **Member**                                                                                                                                                                           |
| **DEFAULT\_ADMIN\_ROLE**        | The admin role for all roles                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3                                                                                                                                           |
| **ADMIN\_ROLE**                 | BrokerManagerFacet<br> &nbsp;removeBroker<br> &nbsp;updateBrokerCommissionP<br> &nbsp;updateBrokerReceiver<br> &nbsp;updateBrokerName<br> &nbsp;updateBrokerUrl<br><br>FeeManagerFacet<br> &nbsp;setDaoRepurchase<br> &nbsp;setRevenueAddress<br> &nbsp;fixFeeDetail<br><br>LpManagerFacet<br> &nbsp;setCoolingDuration<br><br>PriceFacadeFacet<br> &nbsp;setLowAndHighPriceGapP<br> &nbsp;setTriggerLowAndHighPriceGapP<br> &nbsp;setMaxDelay<br><br>TimeLockFacet<br> &nbsp;queueTransaction<br> &nbsp;cancelTransaction<br> &nbsp;executeTransaction<br><br>TradingConfigFacet<br> &nbsp;setExecutionFeeUsd<br> &nbsp;setMinNotionalUsd<br> &nbsp;setMaxTakeProfitP<br> &nbsp;setMaxTpRatioForLeverage<br><br>VaultFacet<br> &nbsp;setSecurityMarginP | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3                                                                                                                                           |
| **DEPLOYER\_ROLE**              | BrokerManagerFacet<br> &nbsp;initBrokerManagerFacet<br><br>FeeManagerFacet<br> &nbsp;initFeeManagerFacet<br><br>LpManagerFacet<br> &nbsp;initLpManagerFacet<br><br>PriceFacadeFacet<br> &nbsp;initPriceFacadeFacet<br><br>StakeRewardFacet<br> &nbsp;initializeStakeRewardFacet<br><br>TimeLockFacet<br> &nbsp;queueTransaction<br><br>TokenRewardFacet<br> &nbsp;initializeTokenRewardFacet<br><br>TradingConfigFacet<br> &nbsp;initTradingConfigFacet<br><br>VaultFacet<br> &nbsp;initVaultFacet                                                                                                                                                                                                                                                       | 2               | 0xD31A4647b8B9c259F8ABB9dE789b6e26a5FD0Df0<br>0x18990d6dEbf460B6b100d706EFaEE180898A67b2                                                                                             |
| **TOKEN\_OPERATOR\_ROLE**       | VaultFacet<br> &nbsp;addToken<br> &nbsp;removeToken<br> &nbsp;updateToken<br> &nbsp;updateAsMargin<br> &nbsp;changeWeight                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3                                                                                                                                           |
| **STAKE\_OPERATOR\_ROLE**       | TokenRewardFacet<br> &nbsp;updateTokenPerBlock                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | 0               |                                                                                                                                                                                      |
| **PRICE\_FEED\_OPERATOR\_ROLE** | ChainlinkPriceFacet<br> &nbsp;addChainlinkPriceFeed<br> &nbsp;removeChainlinkPriceFeed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3                                                                                                                                           |
| **PAIR\_OPERATOR\_ROLE**        | FeeManagerFacet<br> &nbsp;addFeeConfig<br> &nbsp;removeFeeConfig<br> &nbsp;updateFeeConfig<br><br>PairsManagerFacet<br> &nbsp;addPair<br> &nbsp;updatePairHoldingFeeRate<br> &nbsp;removePair<br> &nbsp;updatePairSlippage<br> &nbsp;updatePairFee<br> &nbsp;updatePairLeverageMargin<br><br>SlippageManagerFacet<br> &nbsp;addSlippageConfig<br> &nbsp;removeSlippageConfig                                                                                                                                                                                                                                                                                                                                                                             | 1               | 0x82b0760032a50e50ECE320d56d3a5540b1c8Afd3                                                                                                                                           |
| **KEEPER\_ROLE**                | LimitOrderFacet<br> &nbsp;executeLimitOrder<br><br>TradingCloseFacet<br> &nbsp;executeTpSlOrLiq                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 4               | 0x071BF4e0381536Cf916f935f656E975b10607Cc5<br>0x547809aA1D2Af95D9fB6EcA44a707C3EAD7CA159<br>0x0744f3D556C528ae73835018443635c0318ba8c3<br>0xf51EbCF37158FEE03bF3c3ad12c751dA040b52c8 |
| **PRICE\_FEEDER\_ROLE**         | PriceFacadeFacet<br> &nbsp;requestPriceCallback                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 2               | 0x3aeC3B3A970331456c2d5D5a41Db9E8D7b085991<br>0x5e4DBD49E040735221cBFF339f73fe2B183c76B2                                                                                             |
| **MONITOR\_ROLE**               | BrokerManagerFacet<br> &nbsp;addBroker<br><br>PairsManagerFacet<br> &nbsp;updatePairMaxOi<br> &nbsp;batchUpdatePairMaxOi<br> &nbsp;updatePairFundingFeeConfig<br> &nbsp;updatePairStatus<br> &nbsp;batchUpdatePairStatus<br><br>PausableFacet<br> &nbsp;pause<br> &nbsp;unpause<br><br>SlippageManagerFacet<br> &nbsp;updateSlippageConfig<br><br>TradingConfigFacet<br> &nbsp;setTradingSwitches                                                                                                                                                                                                                                                                                                                                                        | 2               | 0xD31A4647b8B9c259F8ABB9dE789b6e26a5FD0Df0<br>0x18990d6dEbf460B6b100d706EFaEE180898A67b2                                                                                             |
|                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                 |                                                                                                                                                                                      |


## 后端部分
- keeper
    - gas
    - 数据库+缓存(已有)
    - 服务器(已有)
    - RPC(已有)

## 前端部分
- 等待合约部署
- todo：主网/测试网不同 pay token 配置
- todo：主网/测试网开仓 broker id 区分
- todo：主网 dai / usdc 精度不一致，观察是否有bug