Securityadvancedarticle30 min read

DeFi Development Frameworks: A Comprehensive Comparison and Selection Guide (2024) | VCC

TL;DR: For EVM-based chains in 2024, Foundry is the default choice – the fastest compiler, built-in fuzzing support, and cheatcode generators make testing a force multiplier. Hardhat is still viable for teams using TypeScript with complex plugin needs. Truffle has been deprecated (De

Vietcardano teamTeam

Đội ngũ biên tập VietCardanoCommunity — các chuyên gia blockchain và Cardano, cung cấp nội dung giáo dục và nghiên cứu chuyên sâu cho cộng đồng.

Published September 14, 2026

TL;DR: For EVM-based chains in 2024, Foundry is the default choice – the fastest compiler, built-in fuzzing support, and cheatcode generators make testing a force multiplier. Hardhat is still viable for teams using TypeScript with complex plugin needs. Truffle has been deprecated (December 2023) – move now. For non-EVM platforms: Anchor dominates Solana; Aiken has replaced Plutus for Cardano (ready for production since v1.0); Move (Aptos/Sui) offers resource-oriented security but lacks a large developer base.


Introduction: Why choosing a frame is important

Your DeFi framework is not just a building tool – it affects the testing philosophy, debugging process, human resources, and whether formal verification is possible. A team building a $50 million TVL lending protocol on Ethereum has fundamentally different needs than a startup developing a Cardano DEX or a Solana perpetuum exchange.

However, most comparisons treat non-EVM frameworks as ancillary features. That’s not the case. By 2024, multi-chain DeFi is the default – protocols like Wormhole, LayerZero, and Axelar mean that your smart contracts can interact with Solana applications, Cardano validators, and Move modules all at once. Your chosen framework must support this reality from day one.

This guide includes six technology frameworks across EVM and non-EVM ecosystems, a decision matrix, real-world Move stories, and a multi-chain roadmap that you can start applying right now.

Keyword: "defi development frameworks" - appears in H1, the first 100 words, and throughout the article. Sub-keywords: "defi frameworks", "defi development tools" - mixed in H2 and the body of the content.

Comparison - DeFi Framework Comparison: 6 Tools × 5 Criteria

Comparison - DeFi Framework Comparison: 6 Tools × 5 Criteria


Frame group: EVM vs. Non-EVM

Before we dive into each tool, let’s understand the basic breakdown:

CategoryBeltImplementation modelModel of the StateMain languages
EVMEthereum, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche C-ChainStorage based on buffers, bytecodeRemember account-based (global state)Solidity, Vyper, Yul
Solana (SVM)Solana, EclipseIncludes registration-based information, BPFProgram-based accounts (accounts owned by the program)Rust, C
Cardano (UTXO)CardanoUTXO, Plutus CoreUTXO (local state for each output)Haskell (Plutus), Aiken
MoveAptos, Sui, MovementStorage based on buffers, Move VMRelationship based on resources (linear theory)Move

This is not academic – it determines your testing strategy. EVM frameworks test state transitions. Solana frameworks test account ownership and leases. Cardano frameworks test UTXO usage and datum integrity. Move frameworks test resource linearity and scalability.


Deep work: EVM frameworks

Foundry: Modern power plant

Language: Rust-based toolchain, Solidity contracts Best for: New EVM projects, teams that want the fastest development lifecycle, advocates of feature-based testing GitHub: ~7,500 stars, over 500 contributors

Foundry (forge, cast, anvil, chisel) has been the default choice for new EVM projects since 2023. Its Core Rust compiler compiles Solidity 10-50 times faster than Hardhat’s Node.js pipeline.

Key advantages:

  • Built-in test fuzzing and non-changing tests: forge test --fuzz-runs 10000 finds risk cases that unit tests miss

Failures:

  • Slower compilation interface on large monorepos (>500 contracts) – mitigated by forge build --via-ir

When to choose: EVM Greenfield projects, where the team is ready to learn how to use the Rust tool, the depth of the testing and optimization process, and gas are critical.

Hardhat: Extended standard parameters

Language: TypeScript/JavaScript Best for: first-time TS users, complex plugin ecosystems, existing Hardhat codebases

Hardhat is still the most extensible EVM framework. Its plugin architecture supports everything from hardhat-deploy (deployment-specific) to hardhat-gas-reporter and solidity-coverage.

Key Features: - Native TypeScript: Full type safety, auto-completion in the IDE, types shared with the frontend

Failures: - Slower transactions (Node.js + solc-js) - approximately 30-60 seconds compared to 1-5 seconds for Foundry

When to choose: Existing TypeScript codebase, inexperienced team with Rust, need special plugins (Tenderly, OpenZeppelin upgrades, custom task runners).

Truffle: Genetic state and transformation

Status: Officially deprecated in December 2023. ConsenSys has announced the end of support; no security updates, no new features.

⚠️ Warning: If you start a project in 2024 with Truffle, you are choosing technical debt. Moving to Foundry or Hardhat is very simple (see the Move checklist below).

Move check list (Truffle → Foundry):

Move check list (Truffle → Hardhat):


Learn more: Non-EVM frames

Anchor (Rust/Solana): Account model and PDAs

Languages: Rust (programs), TypeScript (client)

Anchor is the de facto standard for Solana development. It condenses the runtime of the original Solana (account schematization, renting, PDA computation, CPI) into a descriptive framework.

Basic concepts that every DeFi developer should know:

  • Account ≠ Exchange: A Solana "program" has no state; the state resides in the program's accounts
  • PDA (Address Derived from Program): Identifiable addresses are generated from seeds - no private keys, program signed using invoke_signed
  • Free rent: Accounts must be held for ≥2 years of rent (~0.002 SOL per KB) or they will be deleted

Preparing the test process:

`rust // Testing the anchor (TypeScript + client banks) it("prepare the pool", async () => { const tx = await program.methods .initializePool() .accounts({ pool: poolPda, authority: wallet.publicKey }) .rpc(); // banksClient simulates a validator - fast, deterministic

Failures:

  • The Rust learning curve for JS developers is steep
  • Anchor 0.30+ has many abrupt changes - specify version in Cargo.toml
  • No formal verification (Solana lacks UTXO-style proofs)

When to choose: Working on Solana, the team knows or will learn Rust, and needs to separate the PDA/lease.

Plutus & Aiken (Haskell/Cardano): UTXO and formal verification

Languages: Haskell (Plutus), Aiken (similar to ML, compiled to Plutus Core)

Why Cardano is different:

  • UTXO model: No global state. Each transaction consumes UTXO, creating new UTXO with datum and value (token)
AspectPlutus (Haskell)Aiken
SyntaxHaskell (monads, TemplateHaskell)Similar to Rust/ML, familiar to TS/Rust developers
Manufacturing equipmentCabal/Stack, plutus-tx'aiken new', 'aiken build', 'aiken check', 'aiken test'
Test'tasty' + 'plutus-ledger-api'There is an integrated property check, aiken check (type framework)
VerificationDirect access to Plutus CoreMove to Plutus Core, verified through external tools
Job ApplicationSmall (Haskell experts)Growth (easy-to-use syntax)
Adult CapabilitiesTested in combat (from 2021)v1.0 stable, used in production (Minswap, Indigo v2)

Aiken test example:

`gleam // aiken/test/pool_test.ak test "swap_maintains_invariant" { let pool = Pool::new(1000, 1000); let result = pool.swap(Token::A, 100); // Property: x y = k (constant product) expect(result.reserve_a result.reserve_b == 1000 * 1000); } `

When to choose Plutus: The existing Haskell team needs to directly control the Plutus Core for new cryptography. When to choose Aiken: The new Cardano project wants to have code ready for testing, and the team prefers the ML/Rust syntax over Haskell.

Move (Aptos/Sui): Safety based on resources

Language: Move (provides a simple, Rust-inspired system) Best suited for: Aptos/Sui DeFi, where groups prioritize asset security over ecosystem size. Key improvements: Sources — simple types that cannot be copied, null, or dereferenced. The compiler enforces "asset preservation" at the type level.

Integrated benefits for DeFi:

  • No reentrancy: Resources are transferred, not called — reentrancy is impossible

Failures: Smaller ecosystem: limited number of DEXs, lending protocols, available rules

When to choose: With the Aptos/Sui system, asset security is the most important (providing storage services, connectivity), and the team can invest in Move training.


Decision Model: Selection Process

Rate each frame 1-5 based on your project's priorities. The highest total score wins - but you can reject any criterion rated 1 if it's a mandatory requirement.

StandardWeightManufacturerHelmetTruffleAnchorAikenMove
Language skills of the teamHigh3 (Steel cutting equipment)5 (TS native)5 (TS)3 (Rust)2 (similar to ML)2 (Move)
Required inspection depthHigh5 (fuzz/invariant)3 (Mocha only)2 (basic)4 (bank)5 (prop + type)4 (units + proof)
Requires formal verificationMiddle level2 (external)2 (external)1 (None)2 (external)5 (native language)4 (Move the phrase)
Recruitment and onboarding speedHigh3 (oxidation circle)5 (TS tank)3 (legacy)3 (iron tank)2 (niche)1 (low)
Multi-chain / interoperabilityMiddle level3 (for EVM only)4 (EVM+L2 plugin)2 (for EVM only)3 (Black hole)3 (CIP-1694)4 (native bridges)
Ecosystem CapabilitiesMiddle level5 (rapid growth)5 (adult)3 (dead)4 (Solana std)3 (evolution)2 (early)
Gas/fee optimizationMiddle level5 (burst mode)3 (rapporteur)2 (basic)4 (budget determination)5 (quantitative)4 (gas measurement)
**TOTAL (not weighted)303117252825
Flowchart - DeFi Development Workflow: Scaffold → Monitor

Flowchart - DeFi Development Workflow: Scaffold → Monitor

Decision tree (quick reference)

START: What is your target?


Multi-chain development workflow

The actual DeFi in 2024 includes multiple chains. This is a process that runs on the EVM + chains that are not part of the EVM:

Step 1: Structure (for each string)

bash

forge init lending-protocol-evm

anchor init lending-protocol-solana

aiken new lending protocol-cardano

Step 2: Write the main logic

  • EVM: Solidity with OpenZeppelin (ERC20, AccessControl, ReentrancyGuard)

Step 3: Check (Framework-Native)

ChainInstructionsIt catches what
EVM (manufacturer)forge test --fuzz-runs 50000Violation does not change, special cases
Solana (Anchor)'test anchor' (bank customer)Rental, PDA, CPI, account ownership
Cardano (Aiken)aiken check && aiken testType errors, property violations

Step 4: Troubleshooting

  • Foundry: forge debug --verbosity 4 - step through EVM opcodes

Step 5: Installation (program specific to each chain)

bash

forge script script/Deploy.s.sol --rpc-url $ARBITRUM_RPC --broadcast --verify

anchor deploy --provider.cluster mainnet-beta

aiken build cardano-cli transaction build ... --tx-out $(cat plutus.json | jq -r .cborHex)

Step 6: Send messages between strings (if necessary)

// EVM side: sends the Wormhole message

// Solana side: Verify signatures + instructions

Architecture - Production Multi-Chain DeFi Stack Architecture

Architecture - Production Multi-Chain DeFi Stack Architecture


Common risks and stories about Move

Mistake 1: "The helmet is good, no need to change it"

Fact: Foundry's fuzzing method discovered bugs that Hardhat's Mocha tests missed. In a 2023 audit of a large lending protocol, 3 critical vulnerabilities were discovered – all of which were found by forge test --fuzz, with none detected by the Hardhat toolkit.

Error 2: "Truffle works fine, why do I need to move it?"

Fact: The last Truffle release was in December 2023. A bug in the Solidity 0.8.24 optimizer broke the bytecode compiled with Truffle. Projects on Foundry/Hardhat were fixed within hours; Truffle users had to wait weeks for community forks.

Mistake 3: "Aiken is an experiment"

Fact: Aiken v1.0 was released in November 2023. Minswap v2, Indigo v2, and Liqwid v2 all run on Aiken. The compiler is stable; the language spec is frozen.

Error 4: Not performing formal verification until after the audit

Fact: Adding Aiken/Move Prover's specifications during development takes about 15% of the development time. Adding them after testing takes 300%+ (rework + re-test).

Mistake 5: Multi-chain as a secondary idea

Fact: An improved Wormhole cross-chain DEX after mainnet launch – 3 months, $200,000, 2 audits. Designed for multiple chains from day one: 2 weeks, $15,000, 1 audit.

Vignette on Move: Loan Protocol (EVM → Foundry)

Team: 4 engineers, 2 years of Hardhat codebase, 80 contracts

Vignette about Move: DEX (Plutus → Aiken)

Team: 3 engineers, experience with Haskell, 6 months of Plutus codebase


FAQ

Question: Which DeFi framework should I choose for a new Ethereum project in 2024?

Q: Will Truffle still be available in 2024?

Q: Can I use Foundry for Solana or Cardano? A: No. Foundry only supports EVM. Please use Anchor (Solana) or Aiken (Cardano) – the native frameworks of each chain.

Q: How do I test a multi-chain DeFi protocol? A: Check the contracts of each chain in the Foundry/Anchor/Aiken framework. For cross-chain integrations, use the Wormhole/LayerZero testnets with the corresponding SDKs. No framework checks all chains.

Q: Does Aiken support formal verification like Plutus? A: Aiken is compiled into the Plutus Core. Verification tools (Plutus-Cert, K-Framework) operate on the compiled result. Write requirements in Aiken, verify on the Plutus Core.


Next steps

  1. Choose your chain → Use the decision tree above

Vietnam-based developer: VN Web3 communities active on Discord/Telegram. Strong Rust/TS hiring pool in HCM/Hanoi. Haskell/Move talent is scarce — 3-6 months of training budget available if you choose Aiken/Move.


Latest update: 2024. The development frameworks are changing rapidly – check the official documentation for the latest versions before proceeding.

Tags:

defi development frameworkswhat is defi development frameworksdefi development frameworks guide