Polymarket Bot Tutorial · Chapter 19 of 32

Polymarket liquidity rewards program کو programmatically farm کریں: rebate program کیسے کام کرتا ہے، qualifying spread thresholds، ROI math، profitable markets کی ranking، اور کب farming دوسری strategies کو beat کرتی ہے۔

اس chapter میں کیا covered ہے

Polymarket eligible markets میں maker-rewards program کے ذریعے liquidity providers کو pay کرتا ہے۔ ان rewards کو farming کرنے کی strategy well-defined ہے، لیکن margins بہت thin ہیں اور inventory risk حقیقی ہے۔ اس chapter میں qualifying spread thresholds، ROI math، اور یہ سب cover کیا گیا ہے کہ farming کہاں کام کرتی ہے اور کہاں نقصان دیتی ہے۔

  • How Polymarkets liquidity reward program works
  • Spread thresholds to qualify
  • ROI math: rebate + fee saving + spread
  • Best markets for farming
  • Risk: inventory blowup
  • Code: minimal LP-farming MM

How Polymarkets liquidity reward program works

Polymarket ایک liquidity rewards program چلاتا ہے جو eligible markets میں resting limit orders فراہم کرنے والے traders کو maker rebates دیتا ہے۔ Exchange روزانہ eligible quotes کو aggregate کرتا ہے اور time-weighted spread-improving order share کے تناسب سے rewards distribute کرتا ہے۔

Eligible markets ہر ہفتے بدلتے ہیں - عموماً high-priority events (election years، major sports tournaments) جہاں Polymarket deeper books چاہتا ہے۔ Eligible list Polymarket کے rewards page پر publish ہوتی ہے؛ کسی market کے گرد farming strategy بنانے سے پہلے اسے ضرور check کریں۔

Rewards pUSD میں pay ہوتے ہیں، اور periodic basis پر deposited ہوتے ہیں (عام طور پر daily یا weekly)۔ یہ trade PnL سے الگ ہوتے ہیں - آپ ایک ہی market میں ایک ہی period کے دوران inventory پر net-down اور rewards پر net-up ہو سکتے ہیں۔

Qualify کرنے کے لیے spread thresholds

Rewards eligibility کے لیے آپ کا quote midpoint کے ایک "qualifying spread" کے اندر ہونا چاہیے، جو اس وقت binary markets کے لیے mid کے تقریباً ±3-5% کے اندر ہوتا ہے۔ اس band سے باہر کے quotes book پر تو رہتے ہیں لیکن reward نہیں کماتے۔

جتنا narrow آپ quote کریں گے، per-block reward میں آپ کا share اتنا ہی زیادہ competitive ہوگا، لیکن adverse selection لگنے کا امکان بھی اتنا ہی زیادہ ہوگا۔ جتنا wide آپ quote کریں گے، اتنے ہی safer، مگر reward share اتنا ہی چھوٹا ہوگا۔ زیادہ تر markets کے لیے sweet spot ہر side پر mid سے تقریباً 1-2c دور ہوتا ہے۔

Eligibility میں minimum order size بھی شامل ہے (عام طور پر 5+ shares؛ GTC minimum کے مطابق)۔ Minimum سے کم orders book پر تو رہتے ہیں لیکن rewards کے لیے count نہیں ہوتے۔

ROI math: rebate + fee saving + spread

Full reward-farming ROI کے تین components ہوتے ہیں۔

  • Rebate income: per-share rebate × fills، pUSD میں pay کیا جاتا ہے۔ Numbers مختلف ہوتے ہیں؛ current range filled share پر 0.1-0.5c ہے۔
  • Spread captured: اگر آپ mid سے 1c اوپر اور نیچے quote کرتے ہیں، اور دونوں sides fill ہو جائیں، تو آپ round trip پر 2c کماتے ہیں۔ Actual capture rate fill imbalance پر depend کرتی ہے۔
  • Inventory PnL: جو position آپ accumulate کرتے ہیں اس میں mark-to-market exposure ہوتی ہے۔ Positive بھی ہو سکتی ہے اور negative بھی؛ اگر strategy well-designed ہو تو عموماً یہ چھوٹی ہوتی ہے۔

Sample math: ایک market میں اگر آپ side per 100 shares quote کریں، 24-hour period میں ہر side پر 60% fill rate ہو، اور rebate $0.30/sh ہو۔ Reward: 100 × 0.60 × $0.30 = $18/day۔ Spread capture: انہی fills کے ساتھ، 1c spread × 60 round trips = $0.60۔ Volume-thin markets میں rebate، spread پر dominate کرتی ہے؛ volume-thick markets میں spread، rebate پر dominate کرتی ہے۔

Farming کے لیے بہترین markets

وہ economic profile جو farming کو favor کرتی ہے:

  • High eligible reward rate - current per-share rebate by market کے لیے rewards page check کریں۔
  • Moderate volume - اتنی fills کہ meaningful reward ملے، مگر اتنی زیادہ نہیں کہ competitive makers آپ کا share کھا جائیں۔
  • Stable mid - ایسے markets prefer کریں جہاں implied probability ایک ہی news event میں 10c نہ ہلے۔ Election markets pre-news اچھے ہوتے ہیں؛ resolution-imminent markets اچھے نہیں ہوتے۔
  • Narrow natural spread - وہ markets جہاں موجودہ book پہلے ہی tight ہو، اس کا مطلب ہے کہ آپ market کھولنے کے بجائے rebate distribution پر compete کر رہے ہیں۔

ان سے بچیں: resolution سے پہلے آخری 24h کے markets (price jumps inventory کو خراب کرتے ہیں)، اور مسلسل one-sided flow والے markets (آپ بہت زیادہ directional exposure اکٹھا کر لیتے ہیں)۔

Risk: inventory blowup

Farming کا سب سے بڑا risk price move کے دوران directional exposure اکٹھا ہونا ہے۔ اگر mid ایک گھنٹے میں 0.55 سے 0.42 پر آ جائے، تو آپ کا bid بار بار fill ہوگا جبکہ ask unfilled رہے گا؛ نتیجتاً آپ N shares long ہو جائیں گے، جن کی average cost current mid سے اوپر ہوگی۔

Cures:

  • Inventory cap: اس side پر quote کرنا بند کر دیں جہاں آپ پہلے ہی بہت زیادہ long ہیں۔
  • Skew: جب long ہوں تو bid کو wider کریں اور ask کو tighter کریں۔ جب short ہوں تو اس کے inverse کریں۔
  • Kill switch: جب inventory normal range کے 2x سے زیادہ ہو جائے یا mid آپ کے شروع کرنے کے وقت سے >X% move کرے، تو halt کریں اور flatten کریں۔

Farming PnL = rewards + spread − inventory MTM۔ Blowups اس لیے ہوتے ہیں کیونکہ third term ایک ہی news-driven mid move پر بہت زیادہ negative ہو جاتی ہے۔

Code: minimal LP-farming MM

Reference: simplest viable liquidity-rewards-farming maker.

QUOTE_OFFSET = 0.01     # 1c off mid each side
INV_CAP = 50            # max long or short
SIZE = 5                # GTC minimum

def farm_loop(token_id):
    while True:
        book = fetch_book(token_id)
        mid = (book.best_bid + book.best_ask) / 2
        inv = chain_balance(token_id)

        cancel_my_quotes(token_id)
        if inv < INV_CAP:
            post_gtc(token_id, "BUY",  mid - QUOTE_OFFSET, SIZE)
        if inv > -INV_CAP:
            post_gtc(token_id, "SELL", mid + QUOTE_OFFSET, min(SIZE, abs(inv)))
        time.sleep(30)  # re-quote every 30s

Production additions: inventory پر skew، news-event pause، rebate stream سمیت daily PnL reconciliation۔

اکثر پوچھے جانے والے سوالات

Polymarkets liquidity reward program کیسے pay کرتا ہے؟
Liquidity providers (makers جو tight spreads quote کرتے ہیں) اپنے markets میں taker fees کا ایک حصہ earn کرتے ہیں، عام طور پر ہر taker order پر fee کا 20-25% جو ان کے resting quote کو hit کرے۔ Payments خودکار طور پر accrue ہوتے ہیں اور روزانہ آپ کے wallet میں credit ہو جاتے ہیں۔
Rewards کے لیے qualify کرنے کو مجھے کتنا spread quote کرنا چاہیے؟
Polymarkets program کے مطابق آپ کو mid-price کے ایک defined band کے اندر quote کرنا ہوتا ہے - عام طور پر ہر side پر 1-3 cents۔ Exact threshold market depth کے مطابق مختلف ہوتا ہے؛ markets reward documentation چیک کریں۔ Band سے باہر کے quotes rebates نہیں کماتے۔
کیا retail کے لیے liquidity-rewards farming profitable ہے؟
معمولی حد تک۔ صرف rebate ہی liquid markets میں round trip پر تقریباً 0.15-0.30% ہوتا ہے۔ Spread کے ساتھ مل کر (round trip پر 1-2 cents)، gross returns round trip پر 0.5-1% تک ہو سکتے ہیں - لیکن inventory risk (5-cent adverse move کی cost 50 round trips سے زیادہ ہو سکتی ہے) کی وجہ سے اکثر retail farmers خراب دن پر money lose کرتے ہیں۔
Farming کے لیے کون سے markets بہترین ہیں؟
Liquid politics اور sports، جن میں two-sided flow consistent ہو مگر news slow ہو۔ Bitcoin price markets بہت volatile ہوتے ہیں۔ NegRisk multi-outcome markets میں اکثر farmable spreads بہتر ہوتے ہیں کیونکہ ہر leg thinner ہوتی ہے۔ ایسے markets دیکھیں جن کا 24h volume کم از کم 50K USD ہو اور news flow minimal ہو۔
Farming full market making سے کیسے مختلف ہے؟
Farming rebate volume optimize کرتی ہے؛ full market making spread + rebate optimize کرتی ہے۔ Farming bots threshold پر quote کرتے ہیں اور volume accumulate کرتے ہیں؛ MM bots tighter quote کرتے ہیں اور inventory کے ساتھ skew کرتے ہیں۔ Farming زیادہ passive ہے - code کرنا آسان، PnL volatility کم، expected return کم۔
کیا میں سوتے ہوئے rewards farm کر سکتا ہوں؟
جی ہاں - یہی اس کی appeal ہے۔ ایک well-coded farming bot کو صرف تب intervention کی ضرورت ہوتی ہے جب market آپ کی spread tolerance سے زیادہ shift کرے۔ ہمارے farming bots ہفتوں تک unattended چلتے ہیں۔ Risk یہ ہے کہ news flow سوتے ہوئے inventory کو blow up کر دے، اسی لیے hard inventory caps non-negotiable ہیں۔