Smart Contract Audit — Security सीखें

60+ real-world audit challenges के ज़रिए security master करें। Attackers से पहले bugs ढूंढें।

Smart contract bugs ने 2020 से $3+ billion का loss करवाया है। Reentrancy, access control flaws और arithmetic errors top culprits हैं। Auditing optional नहीं — यह survival है।

Top 5 Vulnerabilities जो Master करनी हैं

Reentrancy

State updates से पहले external calls attackers को recursively funds drain करने देती हैं।

Integer Overflow/Underflow

Unchecked arithmetic wrap around हो सकता है, जिससे infinite tokens mint हो सकते हैं या limits bypass हो सकती हैं।

Access Control Flaws

Missing या incorrect modifiers किसी को भी admin-only functions call करने देते हैं।

Unchecked External Calls

call, delegatecall, या transfer से return values ignore करना silently fail करता है।

Front-Running

Attackers pending transactions observe करके अपना transaction insert कर value चुरा लेते हैं।

Example: Reentrancy Vulnerability

❌ Vulnerable

function withdraw() public {
    uint256 bal = balances[msg.sender];

    // External call BEFORE state update
    (bool ok, ) = msg.sender.call{value: bal}("");
    require(ok);

    balances[msg.sender] = 0; // बहुत late!
}

✅ Fixed

function withdraw() public {
    uint256 bal = balances[msg.sender];

    // State update BEFORE external call
    balances[msg.sender] = 0;

    (bool ok, ) = msg.sender.call{value: bal}("");
    require(ok);
}

Fix: External calls करने से पहले state update करें (Checks-Effects-Interactions pattern)। यह stale state के साथ function में re-enter होने से रोकता है।

अक्सर पूछे जाने वाले सवाल

Smart contract audit क्या है?

Smart contract audit code की systematic review है जिससे deployment से पहले security vulnerabilities, logic errors और gas inefficiencies पता चलती हैं। यह millions drain करने वाली exploits को रोकता है।

सबसे common vulnerabilities कौन सी हैं?

Top 5 हैं: reentrancy attacks, integer overflow/underflow, access control flaws, unchecked external calls, और front-running vulnerabilities।

Solingo auditing कैसे सिखाता है?

60 hands-on challenges के ज़रिए जहाँ आप real vulnerabilities find और fix करते हैं। हर challenge में vulnerable code, hints और step-by-step solutions हैं।

आज ही Smart Contracts Audit करना शुरू करें

Attackers से पहले vulnerabilities ढूंढना सीखें। Beginner से expert तक 60 challenges।

Audit Challenges शुरू करें →