DeFi me Flash loans kya hoten h?

Kisi stranger se loan lena jisse user ki money ka sacrifice jarrori nahi h?Ye possible h, lekin ek Condition paar:kisi individual ko same transaction me lender ko loan repay krna hoga jisme usne liya tha.Ye strange laagta h, h na?Aap ek loan ke saath kya kya kaar sakte h jo kuch hi seconds k baad lender ko repay krna h?

Lekin, ye pta chala h ki aap usi transaction me smart contracts call kr skte h. Agar aap apne loan ka use krke jyada paisa earn kr skte hai,to aap loan repay kr skte h or profits bahut jaldi earn kar sakte hai.Lekin ye sab itna easy nahi h.DeFi ecosystem me new additions k baare me jaanne ke liye aage padhe.

Contents

  • Introduction
  • Regular loans kaise kaam krte h?
  • Unsecured loans
  • Secured loans
  • Flash loan kaise kaam karta hai?
  • Lekin baat kya hai?
  • Flash loan attack
  • The first Flash loan attack
  • The second flash loan attack
  • Kya flash loans risky hai?
  • Closing thoughts

Introduction

Legacy financial system ki reinvention ke baare me cryptocurrency me bahut fanfare hai,lekin blockchain par,Skeptics iss idea se disagree ho skte hai,lekin definitely iss paar kuch interesting infrastructure ko built kiya jaa sakta hai.

Indeed ,DeFi ka whole purpose blockchain network ke top par permissionless, decentralized aur transparent financial ecosystem ko continue krna hai.Cryptocurrency ne ye prove krdiya hai ki ye paise k saath krna possible hai.Har din,Bitcoin jaise system ko duniya bhar me value transfer krne k liye use kiya jaata hai.

DeFi technologies ki nayi wave ek additional layer dene ka promise krti hai.Aaj aap crypto-backed loans ko nikal sakte hai,bharose ke saath digital assets ka transaction kar sakte hai.Or aise coins me wealth store kar sakate hai jo nakli nakli currencies bnate hai.

Following information me,hum loans ki ek specific category ko dekhne jaa rhe hai jisse - flash loan bolte hai.Jaise ki hum dekhenge,ye sach me decentralized finanace stack ke liye unique additions hai.

Regular loans kaise kaam krte hai?

Hum me se approximately sab saamjhte hai ki ek regular loan kaise kaam krta hai,fir bhi ye repeat kiya jaa sakta hai taaki hum baad me compare kr ske.

Unsecured loans

Ek unsecured loan aisa loan hai jaha aapko koi collateral/security nahi deni paadti.Dusre words me,koi asset nahi hota jo iss baat se agree ho ki agar aap loan repay naahi krte ho to lender uss asset ko aapne paas rakh ske.

Example ke liye,imagine kr le ki aap gold ki ek chain banvana chaate ho.Jiska price 30000 ruppes hai . jiss paar Binance ka logo lattakta ho.Aapke paas uss time cash nahi hai,lekin jab aapke paas agle week cash aa jayega jaab apki salary aa jaegi.

Aap apne dost Bob se baat krte hai aap usse btate hai ki aap uss chain ko kitna chahte hai,isse apke trading game me 20% kaise improve hoga,aur wo aapko rupees dene ke liye agree ho jata hai But,ek condition par ,ki jab apka paycheck aa jaega aap usse rupees wapis de denge.

Generally, institutions se unsecured loan lene k liye kisi type ki credit check ki jaarurat hoti hai.Wo aapke track record( credit record) ko dekhenge.Taaki aapki repay ability ko measure kr ske.Agar unhe laagta hai ki aapne bahut se loans liye hai aur unhe time se repay bhi kiya hai to wo aapko paise dene ke liye soch saakte hai aur unhe laagega ki aap paar bharosa kiya jaa sakta hai.Or wo aapko kuch paise lend/uddhar dedenge.

Tab institutions aapko paise to deta hai,par unme strings attached hote hai.Wo strings interest rates hote hai.Ab paise lene k liye aapko ye accept krna hoga ki aap baad me jyada paise waapis denge.

Agar aap credit card use krte hai,to aap iss model se familiar honge.Agar aap apne bill ki payment kisi fixed date ko nhi krte hai to,wo tab tak interest lagate hai jab tak aap pura amount repay nhi krte hai.

Secured loans

Kabhi kabhi acha credit score enough naahi hota hai.Chaahe aapne kai saalo se time par apna loan chuka rhe ho.Aapke paas sirf apni creditworthiness ke base par jyada amount lene me difficulty hogi. In cases me aapko collateral rakhna hoga.

Agar aap kisi se jyada loan maangte hai.to unke liye ise accept krna risky ho jaaega.Iss risk ko kum krne ke liye wo aapse iss baat ki demand krte hai ki aap kuch collateral ki form me kuch de.Uss asset ki form kuch bhi ho sakti hai jo jewellery, property se lekar kuch bhi ho saakta hai.Agar aap unhe time paar loan repay nhi kaar pata to wo collateral item lender ka ho jaata hai.Yahan par idea ye hai ki lender taab kuch price ki recovery kar saakta hai jo unhone kho diya hai.In briefly, ye hi collateral hai.

Suppose kijiye ki aab aap 500000 ki car lena chahte hai.Bob aap paar bharosa krta hai,lekin wo aapko unsecured loan ki form me paise nahi dena chaahta.Iss waajah se wo aapse collateral ki form me kuch jewellery collection usko dene ke liye kehta h.Aab, agar aap loan time paar repay nahi kaar paate hai to Bob aapki collection ko seize kar sakta hai aur apne paise recover krne ke liye unko kisi ko bhi sell kar sakta hai.

Flash loan kaise kaam karta hai?

Hum flash loan ko ek unseured loan kehte hai,kyunki hum isme koi collateral nhi dete hai.Lekin aapko ek credit check ya aisa kuch bhi paas krne ki jaarurat nahi hai.Aap bas lender se puche ki kya wo aapko 500000 ETH me lendings de skta hai,to wo loan dene ke liye ready ho jaenge.

Ek flash loan ki repayment bhi aapko same transaction me krna hoga, jisme aapne loan liya tha.Ye bikul bhi intuitive nahi hai,par ye isliye ki hum ek typical transaction ke format me use krte hai jahan funds ek user se dusre user ko bheje jaate hai.Jaise jab aap goods or services k liye ki gayi payment ya phir exchange me token deposit krna.

However,agar aap Ethereum ke baare me thoda saa bhi jaante hai to aapko pta chalega ki ye platform bahut flexible hai.Isliye kuch isse programmable money kehte hai.Ek flash loan ke case me.aap apne transaction programm ko 3 parts me divide kr skte hai :- 1. Loan amount receive krna

  1. Loan amount se kuch krna
  2. Loan ki repayment kre

Aur ye saab sirf ek flash me hota hai.

Chalo bas ye blockchain technology ke magic ka attribute hai.Transaction network ko submit kiya jaata hai, temporarily form me aapko un funds ko udhaar de rha hai.Aap transaction ke part two me kuch kar sakte hai.Aap jo chaahe kre,jab tak paisa part 3 ke liye time par wapis aa jaaye.Agar aisa nahi hai,to ye network transaction ko reject kr deta hai,matlab ki lender ko apna paisa wapis mil jaata hai. Actually me ,jaaha tak blockchain concerned hai,tab tak funds hai.

Isse ye clear hota hai ki lender ko aapki or se collateral ki jaarurat kyu nahi hoti.Repayment ka contract code ke saath kiya jaata hai.

Lekin baat kya hai ?

Iss time aap soch rhe honge ki aapko flash loan kyu lena hai.Agar ye saab ek transaction me hota hai,to aap bilkul bhi lambo nhi kharid skte,kya aap kharid skte hai.

Dekhiye,ye wo aim nahi hai.Chalo pehle btaye gaye transaction k 2 parts paar focus krte hai,jaahan aap loan ke saath kuch krte hai.Idea ye h ki funds ko smart contracts me feed kre,profit ko flip krde aur transaction ke end me initial loan ko repay kre.Jaisa ki aap dekh skte hai flash loan ek profit hai.

Aise kuch useful cases hai jaahan paar ye kaam aa skta hai.Lekin,aap iss ke beech koi bhi off chain stuff nhi kr skte hai,Lekin aap DeFi protocols me tap kr skte hai aur apne loan ka use krke jyada paise earn kar sakte hai.Sabse popular application arbitrage me hai jahna aap different trading venues me price disparities ki advantage le skte hai.

Suppose kijiye ki ek token $10 ke liye  DEX A  me trade krta hai,Lekin DEX B me $10.50 ka trade hota hai.Zero fees assume krte hue, DEX B paar reselling se pehle DEX A paar 10 tokens kharidne se $5 ka profit milega.Iss type ki activity aapko kisi bhi time ek private island buy krke nahi dene waali hai,lekin aap bade amount me money dekar dekh saakte hai.Agar apne $100,000 ke liye 10,000 token kharide aur successfully unhe $105,000  ke liye flip kiya, to aapko $5000 ka profit milega.

Agar aap flash loan acquire krte hai (example ke liye Aave protocol,ke instance se),to aap decentralized exchanges me iss taarah ke arbitrage opportunities ki advantage le skte hai.Yaha ek example Uss loan hai .Jo iss tarah se dikhta hai:-

  • Ek $10,000 ka loan le.
  • ka use DEX A paar tokens kharidne k liye kre.
  • DEX B paar tokens ko resell kr de
  • Loan return krde (saath hi interest)
  • Profit aapne paas rakhe.

Saabhi ek transaction me .Phir bhi reality ye hai ki,high competition, interest rates or slippage ke saath transaction ke liye fees transact ke liye arbitrage razor thin bna dete hai.Aapko activity ko profitable bnaane ke liye game price me difference ke liye ek raasta/ way find krna hoga.Jab aap hazaro aur user's ke saath competition  krte hai jo aisa  krne ki koshish krte hai,to aapko paas bahut jaydaa luck nhi hoga.

Flash loan attacks

Cryptocurrency aur by extension , DeFi ek highly experimental field hai.Jab bahut saara paisa stake paar laaga hai to bahut pehle hi vulnerabilities  discovered ho chuuki hai.Ethereum me humne iconic 2017 DAO hack ka ek example dekha.Kai protocols ke baad se 51% financial gain ke liye attack kiya gya hai.

2020 me ,two high profiles flash loan ke attacks ne dekha ki attackers ne uss time almost $1,000,000 ka price bnaya tha.Dono hi attacks ne almost same pattern use kiya tha.

The First Flash loan attack

Pehle to borrower ne dydx par ether flash loan liya.Taab un hone iss loan ko divide kar diya aur usse 2 aur lending platforms paar bhej diya : Compound and Fulcrum.

Fulcrum (bZx platform paar buit h) paar attackers ne loan ka kuch portion ETH paar wrapped bitcoin (WBTC)  k saamne use kiya , jiska meaning hai ki Fulcrum ko ab WBTC ko acquire krna pada .Iss information ko ek aur DeFi protocol ,Kyber se related kiya gaya tha .Jo ek popular Ethereum based DEX hai.But ,Uniswap ki kum liquidity ke kaaran WBTC ka price bahut increase hogya .Jiska matlab ye hai ki kharidi gyi WBTC  ke liye Fulcrum  ko overpaid krna pada.

Ussi time,attacker ne dydx loan ka use krke WBTC se compound loan liya.Price increase ho gye, Unhone borrowed WBTC ko Uniswap par flip kiya aur aache profit k saath kaam kiya.Last me unhone loan ko dydx se repay kiya aur baache hue ETH ko raakh liya.

Ye bahut kaam lagta hai,aur shayad difficult bhi ho sakta hai.Bottom line ki baat ye hai ki attackers ne market me manipulate krne ke liye 5 different  DeFi protocols ka use kiya.Ye saab uss time hua jab ye original flash loan confirm hua.

Kya aapne pehchan liya hai ki problem kidhar thi ? Ye Fulcrum ke dwaara use kiye jaan waale bZx protocol me tha.Market me hera pheri krke attacker ye sochne laga ki WBTC actually me jitna tha ,usse jyada keemati hai.

The Second Flash loan attack

Ye bZx ke liye accha week nahi tha .Sirf kuch hi dino baad ek aur attack hua.Attacker ne flash loan liya aur uske parts ko stablecoin(sUSD) me change krdiya.Aap shayad pehle se hi jaante hai ki stablecoins fiat currencies ke price ko track krte hai.Lastly,isse naam me USD mil gya hai.

Unke naam ke baad bhi,smart contracts intelligent nhi hai,Wo nahi jaante ki stablecoins ka kya matlab hai.Isliye jab attackers USD(using borrowed ETH) kharidne ke liye bada order use krta hai to ,Kyber paar keemat double ho jaati hai.

bZx sochta hai ki sUSD $1 ke jaagah $2 ki worth hai.Attacker ne bZx par normally loan se double loan liya kyunki unke $1 coin ki purchasing power $2 thi.Finally attacker ne initial loan repay kiya aur baaki ke saath bhaag gya.

Kya flash loans risky hai?

Sahi ya galat,ye particular attack vector impressive tha,sirf isliye ki ye dikhata hai ki kitni duur tak attackers jaa sakte hai.Iske liye bZx ke dwaara data lene ke liye different price oracle ka use krna chahiye.Lekin reality ye hai ki iss type ki  chori bahut cheap hai.Iske liye attackers ko jyada investment ki jaarurat nahi hai.Waha koi financial detterent nahi tha ki wo isse band krne se rok sake.

Traditionally, individuals ya groups dwaara cryptocurrency ki bhaari maatra ki thi jo market me hera pheri krna chaahte the.Lekin flash loan ke saath,koi bhi kuch seconds ke liye ek whale ban sakta hai.Aur jaisa ki humne dekha, kuch seconds me hi aap hundreds of thousands of dollar ke equal ki ether bna saakte hai.

Bright side par dono attacks se baaki baacha hua space seekh jaaega.Kya ye possible hai ki koi dusra kisi dusre ko successfully kheech le,ab, jab ki sab log unke baare me jaante hai ? Shayad.Second attack ke time Oracles me bahut saari weakness paayi gayi thi.Or inhe iss type ki weaknesses se free hone ke liye bahut work krne ki jaarurat hai.

Sab kuch milakar,isme sirf flash loans ka fault nahi hai, especially jin vulnerabilities ko exploit kiya gya hai wo dusre protocol me hai,jabki flash loan ne sirf attack ko financed kiya hai.DeFi lending ke iss form me bahut se interesting use ke cases ho sakte hai., especially lenders or borrowers ke liye low risk diya jaa saakta hai.

Closing thoughts

Flash loans DeFi space me nascent entry kr rhe hai,lekin unhone definitely ek lasting impression bna diya hai . Uncollatrized loans ka concept ,jo sirf code ke saath hi enforced kiya jaa sakta hai,New financial system me bahut saari possibilities ko open kr deta hai.

Iss time use ke cases bahut limited hai,lekin ultimately flash loan ne decentralized finance me innovative new applications ke liye foundation rakhi hai.

DeFi ya flash loans ya kuch or topics ke baare me question's puchne ke liye ask academy paar paahuche,wahan paar community aapke questions ka answer degi.