<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 1DanWave2</title>
    <description>The latest articles on DEV Community by 1DanWave2 (@1danwave2).</description>
    <link>https://dev.to/1danwave2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3998647%2F5b32cbce-6908-4265-b365-235276f83fba.png</url>
      <title>DEV Community: 1DanWave2</title>
      <link>https://dev.to/1danwave2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/1danwave2"/>
    <language>en</language>
    <item>
      <title>The pre-audit checklist I run before paying for a smart contract audit (Solidity + Solana)</title>
      <dc:creator>1DanWave2</dc:creator>
      <pubDate>Tue, 23 Jun 2026 11:57:28 +0000</pubDate>
      <link>https://dev.to/1danwave2/the-pre-audit-checklist-i-run-before-paying-for-a-smart-contract-audit-solidity-solana-4go8</link>
      <guid>https://dev.to/1danwave2/the-pre-audit-checklist-i-run-before-paying-for-a-smart-contract-audit-solidity-solana-4go8</guid>
      <description>&lt;p&gt;A formal audit costs $30k to $200k and the auditors' clock is running. Every hour they spend on issues you could have caught yourself is money burned, and a noisy codebase gets a shallower audit because attention goes to the easy stuff. Before any code I review goes to a paid audit, I run it through a fixed checklist. Here is the core of it, the EVM side in full and the Solana side in summary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solidity / EVM, the high-signal items
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Access control&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every state-changing external function has an intentional access modifier, not an accidental &lt;code&gt;public&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;No single EOA holds an irreversible power without a timelock or multisig.&lt;/li&gt;
&lt;li&gt;Initializers cannot be front-run or called twice on upgradeable contracts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Reentrancy and external calls&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks-Effects-Interactions on every function that calls out, state written before the call.&lt;/li&gt;
&lt;li&gt;Cross-function and cross-contract reentrancy considered, not just single-function.&lt;/li&gt;
&lt;li&gt;Arbitrary-token callbacks (ERC-777, fee-on-transfer, rebasing) considered where tokens are not fixed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Oracles and pricing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Price feeds checked for staleness (&lt;code&gt;updatedAt&lt;/code&gt;) and sane bounds.&lt;/li&gt;
&lt;li&gt;On L2s, the sequencer-uptime feed is checked.&lt;/li&gt;
&lt;li&gt;No raw DEX spot price used as a manipulable oracle without a TWAP or sanity bounds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Accounting and rounding&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rounding always favors the protocol, and there is no add-then-remove or deposit-then-withdraw loop that extracts value.&lt;/li&gt;
&lt;li&gt;ERC-4626 vaults: first-depositor / share-inflation handled, &lt;code&gt;totalAssets&lt;/code&gt; cannot be moved by a direct token transfer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tests and invariants&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 to 5 written invariants (for example, total supply &amp;lt;= backing, sum of balances == totalAssets) with a Foundry, Echidna or Medusa suite that tries to break them.&lt;/li&gt;
&lt;li&gt;Fork tests against the real oracles and vaults you integrate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solana / Anchor, the bug families EVM intuition misses
&lt;/h2&gt;

&lt;p&gt;On Solana there is no trusted &lt;code&gt;msg.sender&lt;/code&gt;, any account can be passed into any instruction, and the program only knows what it checks. The recurring classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Signer and authority:&lt;/strong&gt; the privileged instruction checks the right authority signed, not just that someone signed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Account ownership and type:&lt;/strong&gt; every account is owned by the expected program, and the discriminator stops a different account type being substituted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDA and bump:&lt;/strong&gt; derive with the canonical bump, never trust a user-supplied bump, no seed collisions across users or types.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPI:&lt;/strong&gt; the invoked program id is verified, no arbitrary CPI to an attacker-passed program, the token program is the real SPL Token or Token-2022.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anchor constraints:&lt;/strong&gt; &lt;code&gt;has_one&lt;/code&gt; on every relationship, &lt;code&gt;init_if_needed&lt;/code&gt; cannot reset critical state, &lt;code&gt;close&lt;/code&gt; cannot be revived in the same tx.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arithmetic:&lt;/strong&gt; checked math everywhere on value (overflow-checks on in the deploy profile), u128 for products that can exceed u64.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oracles and tokens:&lt;/strong&gt; Pyth or Switchboard staleness and confidence checked, Token-2022 extensions (transfer fee, transfer hook) cannot break accounting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each item is a yes or no. Every no is a fix or a one-line justification you hand the auditors.&lt;/p&gt;

&lt;p&gt;I packaged the full version, 22 sections across Solidity and Solana with every item, as a PDF here: &lt;a href="https://payhip.com/b/zgtoW" rel="noopener noreferrer"&gt;https://payhip.com/b/zgtoW&lt;/a&gt;. And if you would rather have someone run it on your code and hand you a report, that is what I do. Repo and contact in my profile.&lt;/p&gt;

</description>
      <category>solidity</category>
      <category>100daysofsolana</category>
      <category>security</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
