🆕Basic Pools
Discover the mechanics of Basic Pools and the benefits of providing liquidity on Ociswap.
What is a Basic Pool?
Ociswap's Basic Pool (BP
) uses Radix's native "Resource Pools" as a building block. In particular, it utilises the TwoResourcePool (TRP
), which is a liquidity pool that contains a pair of digital assets (e.g. $XRD/$OCI
). ThisTRP
holds the market's liquidity for a single pool and is exclusively managed by its corresponding BP
.
By making use of the TRP
, the BP
can provide pool units (LP-tokens) that are fully compatible with the official Radix Wallet. This ensures a great user experience, because the Radix Wallet transparently showcases the underlying tokens, while allowing users to seamlessly access and intuitively manage their funds at all times.
Basic Liquidity Pool Features
Swaps: The
BP
uses a Constant Product Automated Market Maker formula to create a market and calculate prices and trading outputs.Liquidity Provider Fees: The
BP
imposes fees upon swap execution, with the specific trading fee rate established during the liquidity pool's creation. These fees can be configured to 0.01%, 0.05%, 0.3%, or 1%. All fees are awarded to the liquidity providers of theTRP
and can be claimed by redeeming the underlying liquidity.Auto-Compounding: The
BP
consistently reinvests the trading fees back into the liquidity pool. This boosts returns and creates a hassle-free experience for liquidity providers.🔜 Price Oracle: On-ledger pool-based oracles provide users with accurate and tamper-resistant price data. The oracle calculates the price of tokens based on the trading dynamics and liquidity ratios within these pools.
🆕 Hooks: Users can execute custom code before and after certain events within the liquidity pool, such as swaps or liquidity updates. This capability allows for a wide range of innovative applications and functionalities on Ociswap. Learn more.
🆕 Flash Loans: Users may borrow assets from a liquidity pool without providing collateral, under the condition that the loan is borrowed and repaid within the same transaction. Flash loans allow users to capitalize on discrepancies in prices across different exchanges (arbitrage), swap one collateral type for another without closing a position (collateral swap), or pay off debts to avoid liquidation (self-liquidation).
🆕 Imbalanced Ratios: Users can customize the asset ratio within a pool, which can range from 80/20 to 98/2 or any other ratio. This enables liquidity providers to have more control over their exposure to specific assets.
How do Basic Pools work?
To understand the design concepts of the BP
, it's crucial to grasp which functions are provided by the TRP
and how the BP
is built around it:
Instantiate Pool Allowing users to create a
BP
with a correspondingTRP
to hold its liquidity.Add Liquidity
Allowing users to provide liquidity to a
BP
, which is deposited into theTRP
using itsContribute
function. Liquidity is provided in token pairs, matching the pool's ratio.Remove Liquidity Allowing users to withdraw their liquidity from the
BP
via theTRP
'sRedeem
function.Swap Allowing users to execute trades through the
BP
. During the swap, theBP
utilises theProtected Deposit
andProtected Withdraw
functions of theTRP
to amend its token holdings.
Users can also interact with the Redeem
function of the TRP
directly from the Radix Wallet, allowing them to withdraw liquidity at any time.
Last updated