<?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: Konstadinos Chonas</title>
    <description>The latest articles on DEV Community by Konstadinos Chonas (@konstadinos_chonas_93361d).</description>
    <link>https://dev.to/konstadinos_chonas_93361d</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3516552%2F8e6ddade-c2e6-4880-aba5-669b54692f3f.png</url>
      <title>DEV Community: Konstadinos Chonas</title>
      <link>https://dev.to/konstadinos_chonas_93361d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/konstadinos_chonas_93361d"/>
    <language>en</language>
    <item>
      <title>🚀 Building a Token Vesting &amp; Airdrop DApp with Solidity, Hardhat, and React</title>
      <dc:creator>Konstadinos Chonas</dc:creator>
      <pubDate>Sat, 20 Sep 2025 13:47:04 +0000</pubDate>
      <link>https://dev.to/konstadinos_chonas_93361d/building-a-token-vesting-airdrop-dapp-with-solidity-hardhat-and-react-22hl</link>
      <guid>https://dev.to/konstadinos_chonas_93361d/building-a-token-vesting-airdrop-dapp-with-solidity-hardhat-and-react-22hl</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Over the past month, I worked on a project that combined three fundamental building blocks of blockchain applications:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;An ERC-20 token&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A vesting schedule for stakeholders&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A Merkle tree-based airdrop system&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result is a &lt;strong&gt;full-stack decentralized application (DApp)&lt;/strong&gt; where users can connect their wallet, check vesting schedules, and claim airdropped tokens directly from the UI.&lt;br&gt;
This post is both a showcase of what I built and a reflection on what I learned while developing it.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Why This Project?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Almost every blockchain team that issues its own token needs to solve the same problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Secure token contracts&lt;/strong&gt; that comply with ERC-20 standards&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fair vesting schedules&lt;/strong&gt; to gradually release tokens to founders and investors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient airdrops&lt;/strong&gt; to reward community members without wasting gas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By building all three in one application, I created something that mirrors real-world use cases while giving me hands-on experience with both smart contracts and frontend integration.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔧 &lt;strong&gt;Tech Stack&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smart Contracts&lt;/strong&gt;: Solidity + OpenZeppelin libraries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development&lt;/strong&gt;: Hardhat (compiling, testing, deploying) + Foundry (fuzz and invariant testing)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt;: Slither (static analysis)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React.js, Ethers.js, Web3React&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Sepolia Testnet (via Alchemy/Infura)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Backend: Smart Contracts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The backend consists of three core contracts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MyToken.sol&lt;/strong&gt; → ERC-20 token with a fixed supply&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vesting.sol&lt;/strong&gt; → releases tokens incrementally over time (cliff + duration)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AirdropMerkle.sol&lt;/strong&gt; → verifies Merkle proofs so eligible wallets can claim tokens without storing a massive on-chain list
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I used &lt;strong&gt;Hardhat&lt;/strong&gt; for compilation and testing, while &lt;strong&gt;Foundry&lt;/strong&gt; allowed me to perform &lt;strong&gt;fuzz testing and invariant testing&lt;/strong&gt;, ensuring the contracts behaved correctly under edge cases.&lt;br&gt;
Static analysis with &lt;strong&gt;Slither&lt;/strong&gt; helped identify possible vulnerabilities early on.  &lt;/p&gt;

&lt;p&gt;Deployed contracts on &lt;strong&gt;Sepolia Testnet&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ERC-20 Token → &lt;code&gt;0x5C4Ce5240D563f76cA2af86dff446eb888897Ad5&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Vesting → &lt;code&gt;0x0B549f2c07Bccd36E2CD82bdCEF35ac2694DEFF9&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Airdrop → &lt;code&gt;0xE6C8d1770846FB0cDCCDD84d6163F663C3f56285&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Frontend: User Interface&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;On the frontend, I built a React-based UI with wallet connectivity via &lt;strong&gt;MetaMask&lt;/strong&gt;.&lt;br&gt;
Key features include:  &lt;/p&gt;

&lt;p&gt;🦊 &lt;strong&gt;Wallet integration&lt;/strong&gt; (MetaMask)&lt;br&gt;
📜 &lt;strong&gt;View vesting schedules&lt;/strong&gt; (with human-readable dates)&lt;br&gt;
🎁 &lt;strong&gt;Claim vested tokens&lt;/strong&gt; directly from the UI&lt;br&gt;
✅ &lt;strong&gt;Merkle proof verification&lt;/strong&gt; for airdrop eligibility&lt;br&gt;
💰 &lt;strong&gt;Check balances and transfer tokens&lt;/strong&gt;&lt;br&gt;
🔄 &lt;strong&gt;Automatic refresh&lt;/strong&gt; after transactions  &lt;/p&gt;

&lt;p&gt;This gave me practice with &lt;strong&gt;React state management, ethers.js contract calls&lt;/strong&gt;, and ensuring smooth UX flows for blockchain interactions.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Challenges &amp;amp; Lessons Learned&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gas efficiency&lt;/strong&gt; → Merkle trees significantly cut down gas costs compared to naive storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security-first mindset&lt;/strong&gt; → Reentrancy and invariant testing became part of my workflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tooling matters&lt;/strong&gt; → Hardhat is excellent for development, but Foundry made fuzz and invariant testing far easier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend + Blockchain = Friction&lt;/strong&gt; → Handling async blockchain calls and state refreshes is trickier than it looks.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Closing Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This project helped me grow from just experimenting with Solidity to building a complete DApp that solves a real-world problem.  &lt;/p&gt;

&lt;p&gt;It reinforced the importance of:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing &lt;strong&gt;secure and efficient contracts&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing beyond unit tests&lt;/strong&gt; (fuzz + invariants)&lt;/li&gt;
&lt;li&gt;Creating a &lt;strong&gt;smooth frontend experience&lt;/strong&gt; for blockchain users
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 You can find the full project here on &lt;a href="https://github.com/KonstantinosChonas" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;If you're also working on blockchain projects or interested in collaborating, feel free to connect with me on &lt;a href="https://www.linkedin.com/in/konstantinos-chonas-a88931335/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;. 🚀&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>ethereum</category>
      <category>solidity</category>
    </item>
  </channel>
</rss>
