Understanding the components that power Bayex's gasless, high-frequency trading experience.
User wallets on Bayex are not EOAs (Externally Owned Accounts). Instead, we deploy a Safe (formerly Gnosis Safe) for every user. This Smart Account acts as a proxy, allowing for:
Bayex utilizes a centralized (but strictly non-custodial) relayer service to submit transactions on behalf of users.
This ensures users never need MATIC (Polygon gas token) to interact with the protocol.
The core innovation. Polymarket uses the Conditional Tokens Framework (ERC-1155). To make these compatible with Uniswap V4 (which works best with ERC-20s), we use a Wrapper.
User sends ERC-1155 -> Wrapper locks it -> Mints ERC-20 (CTERC20)
User burns ERC-20 -> Wrapper unlocks ERC-1155 -> Sends to User
We use the singleton PoolManager contract to host all our prediction market pools.