0Pricing
Web3 & DApp Development Fundamentals · درس

مجمّعات السيولة

توفير السيولة

مجمّعات السيولة درس مجاني في Web3 & DApp Development Fundamentals على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Web3 & DApp Development Fundamentals، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Web3 & DApp Development Fundamentals 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

What Is a Liquidity Pool?

A liquidity pool is the reserve of two (or more) tokens locked in an AMM smart contract that traders swap against.

Without liquidity there is nothing to trade against, so pools are the foundation of every DEX.

Liquidity Providers (LPs)

A liquidity provider deposits tokens into a pool to enable trading and earn a share of the fees.

Anyone can become an LP — you simply supply both tokens of the pair in the correct ratio.

Depositing in the Correct Ratio

You must add both tokens proportional to the current reserves so you do not shift the price.

If the pool is 1 ETH : 2000 USDC, you deposit in that same ratio.

Pool ratio: 1 ETH : 2000 USDC
To add liquidity with 5 ETH
-> you also add 10000 USDC

LP Tokens

In return for your deposit, the pool mints LP tokens representing your share of the reserves.

Burning your LP tokens later lets you withdraw your portion plus accrued fees.

mint LPtokens = pool.totalSupply *
    (deposited / reserves)
// LP tokens = proof of your share

Earning Trading Fees

Every swap pays a fee that stays in the pool. As fees accumulate, the value backing each LP token grows.

Your earnings are proportional to your share and the pool's trading volume.

Impermanent Loss

Impermanent loss is the opportunity cost an LP suffers when the two tokens diverge in price compared to simply holding them.

The AMM rebalances the pool as prices move, leaving you with more of the falling asset and less of the rising one.

Why It Is Called Impermanent

The loss is impermanent because it disappears if prices return to their original ratio. It only becomes real when you withdraw at a diverged price.

Fees earned can offset or exceed impermanent loss, which is why high-volume pools remain attractive.

Price diverges -> paper loss vs holding
Price returns  -> loss vanishes
Withdraw while diverged -> loss realized

Stable Pairs Have Less IL

Pools of similar assets (USDC/DAI) barely diverge in price, so impermanent loss is minimal.

This is why stablecoin pools on protocols like Curve are popular with conservative LPs.

Pool Depth and Slippage

The more liquidity a pool holds, the less each trade moves the price. Deep pools offer low slippage and attract more volume.

More volume means more fees, which attracts more liquidity — a reinforcing cycle.

Liquidity Mining Incentives

To bootstrap a new pool, protocols often offer liquidity mining: extra reward tokens on top of trading fees.

These incentives jump-start liquidity but can fade once rewards end, so LPs must weigh long-term viability.

Putting It Together

Liquidity pools let anyone supply token pairs, receive LP tokens, and earn fees. The trade-off is impermanent loss when prices diverge, partially offset by fees and incentives.

Next we build a simple swap to see the mechanics in code.

Quick Check

Test your liquidity pool knowledge.

Recap: Liquidity Pools

You learned that:

  • LPs deposit token pairs and receive LP tokens
  • They earn a share of trading fees
  • Impermanent loss arises when prices diverge
  • Deep pools mean low slippage; incentives bootstrap liquidity

Next: coding a basic swap.

الأسئلة الشائعة

هل درس «مجمّعات السيولة» مجاني؟

نعم — نص درس «مجمّعات السيولة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Web3 & DApp Development Fundamentals، انتقل إلى CoddyKit PRO. تتضمن دورة Web3 & DApp Development Fundamentals 4 دروس في المجموع.

ماذا ستتعلم في «مجمّعات السيولة»؟

توفير السيولة تتمرن على Web3 & DApp Development Fundamentals مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Web3 & DApp Development Fundamentals؟

لا تُشترط خبرة سابقة. Web3 & DApp Development Fundamentals على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.

كم من الوقت يستغرق درس «مجمّعات السيولة»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Web3 & DApp Development Fundamentals هذا؟

نعم. كل درس في Web3 & DApp Development Fundamentals يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. نظرة عامة على DeFi
  2. صنّاع السوق الآليون
  3. مجمّعات السيولة
  4. بناء Swap بسيط
← العودة إلى Web3 & DApp Development Fundamentals