<aside> 💡

Deprecated !!! Latest Document: PCSX Tech Integration Guide V3

</aside>

🔀 Integrating as a Distributor? (Wallets, DEX Aggregators) → LINK

📈 Integrating as a Market Maker? (RFQ, Executor Contract) → LINK

📖 Need general reference? (Contract addresses, token support, flow overview) → LINK

1. Overview & Common Reference

Simple flow of PCSX

  1. The Filler responds to RFQ requests from the PCSX Order Price API.
  2. The PCSX Order Price API replies the Swapper with the best order quote
  3. The Swapper approves Permit2 to move their funds
  4. The Swapper signs the order, including the Permit2 signature and submits to the PCSX Order Handler API
  5. The Filler receives the order over the RFQ interface, checks if the order is correct and profitable, and submits to the Filler contract (Executor)
  6. The Executor calls the Reactor executeWithCallback with the order info
  7. The Reactor checks the order info and the signature, and transfers the input token from the Swapper to the Executor. (PCSX does not accept native token as input)
  8. The Reactor then calls the Executor reactorCallback and performs the Executor swap logic
  9. The Executor should allow the Reactor to transfer the output token from the Executor to the Reactor (or transfer the native token to the Reactor at the end of the swap logic)
  10. The Reactor transfers the output tokens from Executor to its own, checks if the output amount is correct and transfers the output token to the corresponding recipients

Exclusivity

Order Time Person eligible to fill
User signs the order → decayStartTime Exclusive filler only (or filler willing to pay the exclusivityOverrideBps penalty)
decayStartTime → decayEndTime (decay starts) Anyone can fill
decayEndTime → deadline (decay stops) Anyone can fill

Native token support

PCSX only supports Wrapped native token as input. When a user swaps from native tokens to any tokens, our frontend will wrap the native token, get quote on the Wrap native token and send the token to the PCSX contracts. Therefore, in order to maximise the gain, we suggest all Market Makers to support both native token and Wrap native token pairs.

Contract addresses

Chain Version ExclusiveDutchOrderReactor Permit2
BSC Mainnet V1 0x45CBe66536519D2cc9BAF594b502118eFdb291d1 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
BSC Mainnet V3 0xb75bb4c7aaacfa400758bf024c2ffefe17c9cbe3 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
BSC Mainnet (Binance Router) V1 0x3e1edee0d8a8b74a59f7266ef2d3deb951bff582 0xb300000b72DEAEb607a12d5f54773D1C19c7028d
BSC Mainnet (Binance Router) V3 0x78A2cb3e5E0d55325BAD1AA40F20Ede78ECa9148 0xb300000b72DEAEb607a12d5f54773D1C19c7028d
BSC Testnet V1 0x45CBe66536519D2cc9BAF594b502118eFdb291d1 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
BSC Testnet V3 0xb75bb4c7aaacfa400758bf024c2ffefe17c9cbe3 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
Ethereum V1 0x35db01D1425685789dCc9228d47C7A5C049388d8 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
Arbitrum V1 0x35db01D1425685789dCc9228d47C7A5C049388d8 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
Sepolia V1 0xbfCC755375250C1EA9722EB1B8d97076f681627C 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
Base V1 0x6b9906d7106e5890852Bf98eF13ba5D8761712b9 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768
Base V3 0xb8c200921635a500c2fc1356aecbe56bd6c4e12d

Deprecated ~~0xb75bb4c7aaacfa400758bf024c2ffefe17c9cbe3~~ | 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768 | | Ethereum | V3 | 0xb75bb4c7aaacfa400758bf024c2ffefe17c9cbe3 | 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768 | | Robinhood | V3 | 0x56D7f29b2D7F5bfEb0f024e0e391A8E75F3cc2Dd | 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768 | | Robinhood | V1 | 0xE5EfA0a98D56EFb203EE03bbf6365eEb8db87D6c | 0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768 |