With the EMDX platform.
EMDX is a fully decentralized derivative market, with an in-house spot venue.
We offer an application that acts as an interface between your trading bot and the perpetual smart contracts. Algorithmic traders can use our set of APIs to easily interact with EMDX smart contracts. This API connects to the Avalanche C-chain via an RPC provider, we recommend using a private RPC and not a public one. Public RPC providers generally perform poorly for this purpose. If you opt for the option of raising your own node, keep in mind that its synchronization takes approximately 2 weeks and if you choose to rent a node like QuikNode, the synchronization is immediate.
To begin the integration, go through the onboarding steps:
vAMM EMDX uses a constant product function, just like Uniswap, to create liquidity. As the “virtual” part of vAMM implies, there is no real asset pool (k) stored inside the vAMM itself. Instead, the real asset is stored in a smart contract vault that manages all of the collateral backing the vAMM.
There are 2 main contracts: The Collateral Vault and Price Discovery Contracts. In order to open a position on EMDX the trader sets the following parameters: 1. Collateral 2. Leverage 3. Side. While the collateral is sent to the Collateral Vault contract, this captures the relevant information which consists of the notional amount and the direction of the trade, forwarding this trading data over the Price discovery contract, that uses these inputs to calculate the new asset prices.