Credit Margin Engine
Transforming DeFi from inventory-based to credit-based trading
Last updated
Transforming DeFi from inventory-based to credit-based trading
Last updated
Credit Margin Engine (CME) forms the backbone of Native's architecture. It is a smart contract that consists of four main components:
Liquidity pool: A pool where LPs deposit capital on each chain, functioning similar to a lending platform like Aave.
Credit component: A system that tracks each PMM's available credit based on their collateral, and records their long and short positions during live trading on each chain.
Settlement layer: A mechanism that ensures PMMs can pay off their long positions (assets pledged as collateral) as long as they return their short positions (assets borrowed for trades), along with any accrued credit financing fees.
Liquidation component: A process similar to Compound Finance, where PMM collateral and long positions are auctioned off to repay their short positions if they fail to meet their obligations.
Josh, a retail trader, requests to swap 1 ETH for USDC through a Native-powered aggregator/solver. PMM1, a trading house, has pledged 100 USDC as collateral, securing a $100 credit from Native.
T0: Josh submits a Request for Quote (RFQ) through the aggregator.
T1: Native receives the RFQ and prompts PMM1 to respond.
T2: PMM1 responds with quote of 2600 USDC, even though it doesn't hold any USDC in its wallet, leveraging its $100 credit.
T3: Josh approves the transaction to swap 1 ETH for 2600 USDC.
T4: Native Credit pays Josh 2600 USDC, receives 1 ETH, and records a long 1 ETH and short 2600 USDC position on PMM1's credit record — all in a single transaction. Transaction is complete.
Following this trade, as long as the price of ETH doesn't drop below $2500, PMM1's $100 credit will be sufficient to cover its position. If the price falls below that threshold, the 100 USDC collateral plus 1 ETH would be subject to liquidation.
Notice how in the example above, it doesn't matter which chain Josh's request is made on, where PMM1 provides the quote, or where Native Credit Pool operates?
Thanks to our Credit Margin Engine, this entire swap has achieved true chain-abstraction.
The Native V1 source code is protected under a Business Source License (BSL), which strictly prohibits its use in any commercial or production setting until December 31st, 2026. This safeguards our innovation and deters premature exploitation for competitive gain.