Cum detectează auditorii o înșelătorie DeFi Rug Pull: poți să o faci singur?

Cum detectează auditorii o înșelătorie DeFi Rug Pull: poți să o faci singur?

How Auditors Detect a DeFi Rug Pull Scam: Can You Do It Yourself? PlatoBlockchain Data Intelligence. Vertical Search. Ai.

Hackerii au furat mai multe criptomonede de pe platformele de finanțare descentralizată (DeFi) decât oricând înainte în 2022. Aproape 98% din toate jetoanele lansate pe flagman-ul DEX Uniswap de la DeFi au fost identificate drept covorașe.

Cel mai recent, Defrost Finance, a venit ca un coșmar de Crăciun pentru investitorii cripto, ștergând 12 milioane de dolari din banii lor. 

Cele mai multe hack-uri pe platformele DeFi au loc prin breșe de securitate și exploatări de cod. Projects that end up being rug pull scams have serious security issues that have been allowed to slide, or maybe, undetected on purpose. To prevent similar risks, DeFi security audits are critical.

Here we’ll find out more about these audits, how they are conducted, and whether it is possible to run a DeFi audit by yourself. 

What Is a DeFi Security Audit?

DeFi projects are implemented as complex, self-executing smart contracts, often transparent and open-source. They act as legal agreements between two parties. And since no centralized entity is behind them, even a small bug in smart contracts might lead to irreversible consequences.

Aceasta înseamnă că nu ar trebui să existe loc pentru erori în contractele inteligente. Auditurile de securitate a contractelor inteligente DeFi sunt menite să asigure asta.

Security audits examine the code of smart contracts and how it grounds contracts’ terms and conditions. The detailed analysis searches for potential security flaws, violations, and system bugs in the code, so it cannot be exploited. 

Security audits, usually conducted by third parties, are vital to ensuring the security and credibility of projects and maintaining a healthy DeFi ecosystem.

How Do Scammers Exploit Smart Contracts for a Rug Pull?

A rug pull is a type of exit scam that operates in a simple model: developers create a legit-looking DeFi protocol, run and promote it until the project attracts enough liquidity, then pull out the funds and disappear. 

Well, not always. Occasionally, rug-pull scammers blame hackers for stealing liquidity and stay in business until the next time.

Pentru a implementa un atac, escrocii încorporează cod rău intenționat în contractele inteligente. Le modifică pentru a împiedica investitorii să vândă: setați taxa de vânzare maximă (100%), puneți pe lista neagră a proprietarilor de jetoane și blocați banii utilizatorilor într-un contract.

Unele contracte inteligente implică codificarea unei „uși din spate” rău intenționate în ele, care permite dezvoltatorilor să retragă lichiditatea.  

De cele mai multe ori, contractele inteligente modificate nu sunt verificate de auditorii de securitate și sunt ascunse ochiului public. Deoarece majoritatea contractelor în lanț sunt disponibile publicului, lipsește transparența GitHub ar putea fi un steag roșu. 

How to Check Whether a DeFi Smart Contract Is Safe

Industria blockchain și a contractelor inteligente este încă relativ tânără, la fel și sectorul de audit al contractelor inteligente. Numeroase firme sunt specializate în audituri de securitate smart contract, își dezvoltă instrumentele și își modelează know-how-ul. 

Standardele și cele mai bune practici din industria de securitate a contractelor inteligente evoluează. În ciuda acestui fapt, unele metode de audit destul de standard sunt folosite de jucătorii din industria de audit DeFi.

De obicei, investigațiile lor încep cu evaluarea contractului inteligent. Auditorul analizează documentul alb, logica de afaceri și specificațiile tehnice ale protocolului DeFi pentru a estima riscurile potențiale și caracteristicile de securitate.

Apoi își îndreaptă atenția asupra codului contractului inteligent. Acesta este momentul în care începe revizuirea și analiza codului. 

Auditors inspect code line by line, looking for vulnerabilities of different levels: critical ones that can result in a liquidity leak; medium-level, which could partially damage the smart contract; and low-level issues, which affect the contract’s security the least.

Ei implementează o serie de tehnici de audit, inclusiv analiză automată și manuală. Ambele au avantajele și dezavantajele lor.

An automated security audit means scanning the code with automated analysis software, which searches for bugs against the database of known vulnerabilities and identifies their precise location in the code.

The software-based audit is typically conducted before the manual analysis to detect errors that humans might overlook. It is faster and less time-consuming, but at the same time, it may not always be aware of the context and thus miss certain vulnerabilities. 

Manual code analysis is king in smart contract auditing and is the most critical part of a comprehensive and accurate smart code security audit. It is conducted by at least two separate experts that inspect the code line by line.

Scopul este de a verifica dacă fiecare detaliu din specificația proiectului este implementat în contractul inteligent și că nimic nu încalcă comportamentul inițial prevăzut. 

The auditors scrutinize the code for unintended, unexpected behavior, crucial security issues, and vulnerabilities like re-entrance, data manipulations, flash loans, and other manipulations that might be implemented while the smart contract interacts with others.

In addition to that, manual audits run simulations to evaluate how well the DeFi project’s smart contract responds to unidentified threats and how capable it is of defending itself against them. 

În partea finală a analizei manuale a codului, auditorul compară logica contractului inteligent cu descrierea acestuia din cartea albă a proiectului. 

Odată ce toate vulnerabilitățile au fost identificate și remediate, auditorii rulează un proces de dublă verificare pentru a se asigura că codul inteligent funcționează conform așteptărilor.

În cele din urmă, după finalizarea auditului de securitate, auditorii întocmesc un raport cuprinzător. Aici oferă feedback detaliat despre ceea ce au descoperit. De obicei, raportul lor vine cu recomandări despre cum pot fi remediate punctele slabe detectate ale codului pentru a atenua securitatea proiectului. 

What Ensures that a Smart Contract Audit Is Professional?

Smart contracts are a relatively new innovation. Their security standards are evolving accordingly. This means no golden rule guarantees total smart contract safety.

Mai mult, nu toate firmele de audit smart contract sunt la fel și nu toate auditurile garantează siguranța. Auditorii pot avea diferite niveluri de calificare, obiective diferite și costuri diferite.

Not to mention the fact that the market is full of sketchy developers that forge audits and still benefit from the name of a respectable company. This is what happened to Peckshield, a blockchain security and data analytics company, more than a year ago.

Situații ca aceasta sunt destul de frecvente în spațiul criptomonedei. Ei iau numele unui auditor legitim și respectabil și îl pun în cartea lor albă, spunând că protocolul lor a fost auditat.

The only way to avoid cases like this is to check for confirmation on the auditor’s original channels. If there aren’t any, chances are that the auditor’s name has been stolen. 

Always check its client portfolio to evaluate whether the auditor is solid and reputable. Google the cases to verify their experience records, and check if any of the audited projects have suffered a rug pull or other attacks.

Can You Conduct Code Audit Yourself?

With so many hacks and rug pulls in the crypto space, it’s naive to imagine that DeFi projects are safe without looking into them in more detail. Smart contract audits provide a critical layer of safety. 

However, even the most professional ones do not guarantee that a DeFi project is absolutely bug-free. Smart contracts are complex. They require detailed and comprehensive analysis, expertise, tools, and, most importantly, more than one pair of eyes.

Timestamp-ul:

Mai mult de la DailyCoin