Smart Margin

Trade any market with a single account using Smart Margin

Kwenta's on-chain margin engine "Smart Margin" offers a comprehensive suite of tools for trading derivatives powered by Synthetix. Smart Margin (SM) accounts utilize a script-like trading language that defines ordered commands (or steps) to be batch executed by the trader in a single transaction.

The command structure supports unrestricted interactions with Synthetix (like modifying position margin and size across multiple markets) and other protocols integrated into the engine. Commands ranging from depositing margin from an EOA to the SM account and executing swaps via Uniswap's UniversalRouter can all be scripted in whatever order the trader desires.

Furthermore, given the upgradable nature of the SM system, future protocol integrations can happen seamlessly without disrupting the functionality already offered.

Additional details concerning protocol architecture and direct usage can be found in the README. A complete list of supported commands and related inputs can be found in our Smart Margin wiki. Finally, specific interaction flows have been tested natively in solidity here and offer a great starting place for anyone looking to integrate Kwenta's margin engine.

Last updated