Audit Forge Pro
by 0xndrean7
Go past the checklist — prove the economic attack, price the impact, write the report.
$10
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
| Field | Detail |
|---|---|
| Title | Missing balance check leads to insolvency in fee-on-transfer distributions |
| Severity | High (Impact: High, Likelihood: Medium) |
| Location | RewardDistributor.sol:142 (commit a1b2c3d) |
| CVSS | AV: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
- Apply the suggested balance-check fix to
RewardDistributor.sol. - Run
forge test --match-path test/PoC_AccountingDrift.t.solto verify the PoC now fails. - Review the
Vault.solcontract 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
Allowed Hosts
What's inside
Frequently Asked Questions
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.