Swap Pools

The jAsset protocol has integrated a Uniswap V2 fork as its decentralized exchange (DEX), incorporating dynamic features such as a balance fee and automatic jAsset debt repayment upon liquidity removal from pools.

Balance Fee

The balance fee is initially based on the static Uniswap swap fee but dynamically increases if a trade shifts the DEX price away from the Oracle price. This incentivizes users to avoid trading against the pegged price.

Automatic Debt Repayment

When a user withdraws liquidity from a pool, the protocol automatically attempts to repay any potential jAsset debts from the user's Trove. Only after settling these debts are the remaining tokens credited to the user's account. Liquidity pool tokens are non-transferable to enforce this restriction, aiming to reduce delta-neutral jAsset positions in balances.

jAsset Minting

New jAssets can only be minted by borrowers in conjunction with swap pools:

  • Long Position (Open Long Position): Borrowers mint new jUSD and swap it into a jAsset via a liquidity pair (SwapOperations.openLongPosition()).

  • Short Position (Open Short Position): Borrowers mint a jAsset and swap it for jUSD (SwapOperations.openShortPosition()).

After minting, a buyback through the pools is necessary to facilitate debt repayment.

Or neutral, by providing swap pool liquidity (Neutral Position): Borrowers mint a jAsset and jUSD in the current swap pool ratio and provide them directly as liquidity into the pool (SwapOperations.addLiquidity()).

Last updated