How It Works
Order Settlement
All orders are issued, stored, and settled via the automated marketmakers, Apeswap (on Binance Smart Chain and Polygon). The trading logic is entirely contained within solidity-based smart contracts, which means that there are no centralised or semi-centralised nodes. This also ensures that all trades are backed by a locked & verifiable balance (unlike the fractional reserve or hot wallet system used by banks and exchanges).
Because smart contracts themselves cannot ‘directly’ track price flucations and issue transactions based on that, liquidations on Apemex are designed to be triggered by anyone. This means that developers can write bots to call liquidatePosition on orders that can be liquidated, auto-opened (limit order) or auto-closed (stop-loss, take-profit). In return, they can earn a so-called “liquidation rewards” which is supplied by the trader when opening their position.
Automated market makers (AMMs)
In simplified terms, an automated market maker is a form of decentralised ‘exchange’ where tokens can be trustlessly swapped for an algorithmically determined price. The price is determined by the liquidity of the token pair stored within the AMM smart contract. Rather than provide its own liquidity for pairs, Apemex uses existing AMM, Apeswap, in its trading logic to swap tokens in a fully decentralised manner when opening and closing orders.
Last updated
Was this helpful?