Chain Agnostic Trading
Decentralized perpetual exchanges have only captured a tiny fraction of the crypto trading market, unlike the spot DEXs. This has been so because they suffer from a non-seamless trading experience caused by the inability to trade on any current decentralized exchange from any chain different from the chain on which it is built. Centralized exchanges became the first kind of bridge because they essentially told users, "interact with this smart contract on, e.g., Ethereum, and we would tell that to Solana," and moved funds around seamlessly and enabled the kind of trading experience users are used to today. But this has a significant downside. Users have to trust a third party. With the innovation in cross-chain messaging platforms, users could utilize our platform to trade without bridging over.
We discussed the base chain and the sublet chain on the last page. When users create a tradable margin account, they sign a message with their trading ID, which allows them to trade continuously without signing additional messages. When a user wants to open a trade, they deposit their margin(USDC, USDT, BUSD) from their sublet(chain) of convenience, which could be the Binance smart chain or the avalanche network, to our vault on that sublet, and using our messaging layer; we send a message to the base chain, which according to trading parameters set out on our business logic, opens up a trade.
After the off-chain matching engine matches orders, the respective signatures for each participating user in the trade are sent to the contracts alongside the trade data. The signature is verified before executing trades for the two parties.
Trading with leverage increases purchasing power to magnify profits and losses. Collateral or margin is used to collateralize open such a position. The collateral for trading on Tradable is gotten from stakers. The ratio of the initial open interest to the margin is called leverage. For example, a trader using 4x leverage can trade contracts valued at 400 USD with only a 100 USD margin. With borrowed money, the trader can buy/sell more contracts.
When trading with leverage, traders must be aware of two parameters;
- The maintenance margin ratio (MMR)
- The Borrow Fee
The Maintainance Margin defines the price at which a position is liquidated. On Tradable, the liquidation engine takes charge of liquidating positions that have been margin called.
The Borrow Fee serves two functions; it serves as interest paid out on stakers' loans, and serves as a deterrent for borrowers( leverage traders) taking a bad debt.
The Maximum Leverage on Launch would be 35X
Perpetual contracts rely on a scheduled payment between longs and shorts, known as funding payments. Funding payments are meant to converge the price between the derivate contract or perp and its underlying. As a result, they are scaled based on the difference between the marked price and the index price.
On Tradable, funding payments are reduced due to the effects of our liquidity model and maintenance margin.
Longs and shorts are paid with the exact funding rate formula. Realized and unrealized funding payments are updated every block directly on each position. Global funding calculations are recorded in a time-weighted fashion, where the funding rate is the difference between the mark TWAP and index TWAP divided by the number of funding payments per day:
In Tradable, these payments occur every hour.
If the funding rate is positive, the marked price exceeds the index price, and longs pay shorts. We automatically deduct the funding payment amount from the margin of the long positions.
Apart from the regular funding rate model, we, in line with removing the pain points for liquidity providers and traders, developed an additional type of funding known as Margin Maintainance.
Within every trading hour, there exists an unknown number of levers, mathematically hidden, which allow the back-end to trigger a funding event at unknown times randomly. This serves to punish price manipulators and protect traders, e.g., In an event where trader A causes a flash crash, manipulating the price on the tradable order book to edge out and liquidate traders B and C wrongly, the margin maintenance may fire up at that exact second, causing trader A to pay a fee.