Audit Forge Pro

    by 0xndrean7

    1

    Go past the checklist — prove the economic attack, price the impact, write the report.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Audit Forge Pro

    Example session with this skill installed

    I need a deep audit of the RewardDistributor.sol contract in this repo. Focus on the claim logic and how it handles fee-on-transfer tokens. Here is the repo path and commit hash.

    • Read your context and instructions
    • Compiled the audit forge pro

    I have completed the economic and business-logic pass for RewardDistributor.sol. I identified a high-severity accounting drift when processing fee-on-transfer tokens.

    Audit Finding: Unbounded Credit via Fee-on-Transfer Drift

    FieldDetail
    TitleMissing balance check leads to insolvency in fee-on-transfer distributions
    SeverityHigh (Impact: High, Likelihood: Medium)
    LocationRewardDistributor.sol:142 (commit a1b2c3d)
    CVSSAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

    Description

    The distribute() function increments the internal totalDistributed ledger using the amount parameter provided by the caller. However, if the underlying token subtracts a fee on transfer, the actual balance received by the contract is less than amount. This creates a drift where the internal ledger exceeds the actual token balance, eventually bricking withdrawals for the final users in the queue.

    Proof of Concept

    // test/PoC_AccountingDrift.t.sol
    function test_AttackFeeOnTransferDrift() public {
        // 1. Setup: Deploy distributor with a 5% fee-on-transfer token
        // 2. Action: User calls distribute(1000e18)
        vm.prank(user);
        distributor.distribute(1000e18);
    
        // 3. Measure: Impact
        uint256 internalLedger = distributor.totalDistributed();
        uint256 actualBalance = token.balanceOf(address(distributor));
        
        assertGt(internalLedger, actualBalance);
        emit log_named_uint("Protocol Accounting Drift", internalLedger - actualBalance);
    }
    

    Recommendation

    Use the "balance before and after" pattern. Measure the actual change in token.balanceOf(address(this)) and use that delta to update the internal ledger rather than trusting the input parameter.

    Next steps

    1. Apply the suggested balance-check fix to RewardDistributor.sol.
    2. Run forge test --match-path test/PoC_AccountingDrift.t.sol to verify the PoC now fails.
    3. Review the Vault.sol contract for similar deposit-side accounting drifts.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Most protocol losses do not come from a missing access check. They come from math that rounds the wrong way, a price feed an attacker can push inside its own update window, a credit nobody authorized, a payment record that does not say who paid, or an upgrade that silently changes what a storage slot means. That is the layer Audit Forge Pro audits. Give Pro a Solidity codebase and it models the protocol as an economy first and a codebase second: who puts value in, who takes value out, what each transition is allowed to move, and which numbers an attacker can bend. Then it hunts in five passes — economic and business-logic attacks, oracle manipulation and flash-loan chains, proxy and upgradeability risk, DeFi attack patterns, and cross-function accounting — and proves each suspected break with a Foundry proof of concept that ends in a number: how much the attacker gains, how much the victim or the protocol loses. A PoC that cannot name the gain is not finished. Every finding is scored (impact × likelihood, plus a CVSS-style vector for bounty-ready reports) and written up in a full report format: attack chain, measured impact, PoC, fix, and fix verification — the same PoC re-run against patched code must fail, and the protocol's own tests must still pass. The report states plainly what was not covered, and it never claims the contracts are safe. An audit narrows risk; it does not erase it. Built from real audit practice, including a settlement-protocol audit (Nov 2026, Foundry only, no chain transactions) whose lessons are rewritten here as general patterns: credits that check only "non-zero address", executors that let anyone front-run the spread, payment records that do not bind the spender, price adapters that cannot pay their own feed fee, authorizations that never expire. What it does not do: it never promises a bug will be found, and it never promises a bounty. Bug bounties pay only for valid, first-reported bugs — a review may find nothing, and that is a valid result.

    Requires local Foundry installation. Impact proof is limited to what can be modeled in Foundry tests. Does not support non-Solidity contracts or chain-level validator attacks.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 15 days ago

    Accounts
    GitHub
    Software
    Git

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files

    Allowed Hosts

    raw.githubusercontent.com
    Listed15 days ago

    What's inside

    Frequently Asked Questions

    Audit Forge Pro is specifically designed for Solidity projects using the Foundry suite. It integrates seamlessly with `forge` and `cast` workflows and can leverage output from static analyzers like Slither or Aderyn to guide its deep-logic reviews.

    Unlike generic prompts that flag theoretical risks, this skill follows a 'no number, no finding' rule. It automatically generates Foundry-based Proof-of-Concepts (PoCs) that demonstrate exactly how much value can be extracted, saving you hours of manual verification.

    The skill performs a comprehensive five-pass review covering economic logic, oracle integrations, proxy safety (including storage collisions), DeFi design patterns, and cross-function accounting to ensure no stone is left unturned.

    A five-pass deep audit: economic/business-logic, oracle + flash-loan chains, proxy/upgradeability, DeFi patterns, cross-function accounting. Foundry PoCs that prove impact in measured numbers — attacker gain and victim loss in real units, re-runnable locally (no mainnet transactions). A full severity-scored report: attack chain, impact, PoC, fix, and fix verification — bounty-ready in format. A worked example: a vault share-inflation attack with a passing PoC (attacker +100,000 tokens, victim 0) and the complete report. Invariant-harness lessons built in: pin the fuzz target, fund the paying contract, assert against the contract's own ledger. Killed leads recorded, so no path is checked twice blindly.

    To ensure maximum accuracy, the skill requires access to a local repository clone with a pinned commit. It also necessitates a functioning local Foundry environment to execute and validate the impact-based tests it generates.

    This skill is designed for offline analysis of your local codebase; it never requests private keys and does not perform live transactions on mainnet or testnet, ensuring your deployment environment remains secure.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.