Why move-based programming matters
Move-based programming represents a fundamental shift from general-purpose smart contract languages like Solidity or Rust. Instead of treating digital assets as mutable balances within a global state, Move treats them as first-class resources. This distinction is not merely semantic; it enforces safety at the language level, ensuring that assets cannot be duplicated, discarded, or accessed without proper ownership.
In traditional EVM-based environments, state management relies heavily on careful coding practices to prevent reentrancy attacks or balance inconsistencies. Move inverts this model. Resources are opaque types that can only be moved, destroyed, or copied if explicitly marked. This means that the compiler itself acts as the primary security guard, catching structural errors before deployment.
This resource-centric approach allows for richer composability and safer logic. As noted in the official Move documentation, the language is designed to enable developers to flexibly manage and transfer assets while providing built-in protections against common attack vectors. By making ownership explicit and enforced, Move-based programming reduces the cognitive load on developers and significantly raises the baseline security for smart contract ecosystems.
The resource model in action
In Move, the concept of a "resource" is the foundation of smart contract safety. Unlike standard data types that can be copied or discarded at will, a resource is strictly typed and unique. This means you cannot accidentally duplicate an asset or let it vanish into thin air. It behaves like a physical object: you can move it from one account to another, or destroy it intentionally, but you cannot clone it.
To define a resource, you use the resource keyword before a struct definition. This tells the Move compiler that the struct represents a unique asset. The compiler enforces several rules:
- No Copying: You cannot duplicate a resource. Every instance must have exactly one owner.
- No Dropping: You cannot silently discard a resource. It must be explicitly destroyed using the
destroyfunction or transferred to another account. - No Default: Resources do not have default values. They must be constructed explicitly.
This strictness prevents common vulnerabilities found in other languages, such as reentrancy attacks or accidental inflation. By ensuring that every unit of value is accounted for, Move provides a high level of security by default.

Consider a simple Coin resource. In a traditional language, you might accidentally create two coins from one. In Move, the compiler prevents this. If you try to copy a Coin, the code will fail to compile. This forces developers to think carefully about ownership and transfer, leading to more robust smart contracts.
The resource model is not just a theoretical concept; it is a practical tool for building secure applications. By treating assets as first-class citizens with strict lifecycle rules, Move reduces the attack surface and makes it easier to reason about the state of your contract. This approach is particularly valuable in financial applications where precision and safety are paramount.
Programmable transaction blocks
Programmable transaction blocks (PTBs) are the execution engine that distinguishes Move-based programming from traditional account-based blockchains. In languages like Solidity, complex operations often require multiple separate transactions or intricate contract interactions that can fail mid-stream. Move solves this by allowing developers to bundle multiple operations into a single, atomic unit.
A PTB is essentially a script or module entry point that executes sequentially within one block. This atomicity guarantees that either all steps succeed or none do. If a swap fails, the subsequent transfer never happens, preventing partial state changes that could leave funds in an inconsistent state. This structural guarantee is foundational to the composability that Move promises.
Consider a typical DeFi interaction: swapping tokens, transferring the result to a wallet, and minting a NFT receipt. In a PTB, these are just function calls in a single script. This reduces latency and gas costs while eliminating the risk of a user receiving tokens but failing to mint the receipt due to a network hiccup.
script {
fun execute_swap_and_mint(
signer: &signer,
amount: u64
) {
// 1. Swap SUI for USDC
let usdc = swap_sui_for_usdc(&signer, amount);
// 2. Transfer USDC to a specific wallet
transfer(usdc, recipient_address);
// 3. Mint NFT if transfer succeeded
mint_nft(recipient_address);
}
}
This approach allows for rich composability. Developers can treat other smart contracts as libraries, calling their functions directly within the PTB. This modularity means you can build complex financial instruments by combining simpler, verified components without worrying about the atomicity of the interactions between them.

Real-world move-based examples
Move’s strict ownership model and resource types have moved beyond theory into production-grade applications. By treating digital assets as first-class citizens that cannot be copied or dropped, developers can build systems where value is mathematically guaranteed to remain intact. This section highlights prominent projects that leverage these specific language features to solve complex state management problems.
Sui: Parallel Execution and NFTs
Sui uses Move to enable parallel transaction processing, a significant departure from sequential blockchains. Because Move explicitly tracks object ownership, the runtime can determine which transactions touch different objects and execute them simultaneously. This architecture powers high-throughput NFT marketplaces and gaming economies where thousands of users interact with unique assets without clogging the network.
Aptos: Secure DeFi Infrastructure
Aptos applies Move’s formal verification capabilities to build DeFi protocols with a focus on safety. The language’s resource model prevents common vulnerabilities like reentrancy attacks, which have historically drained funds in Solidity-based DeFi. Projects on Aptos utilize this security layer to offer stable, auditable financial instruments that require less complex external auditing for basic asset transfers.
Diem (Libra): Stablecoin Architecture
Originally developed by Meta, the Diem blockchain demonstrated Move’s capability for regulated financial assets. Although the project evolved, its codebase established patterns for stablecoins where the underlying currency is fully backed and transferable only by authorized entities. This use case highlights Move’s strength in handling compliance-heavy logic where asset integrity is paramount.
Prominent Move-based projects
-
Sui
Focuses on parallel execution and unique object ownership for high-speed NFTs and gaming. -
Aptos
Emphasizes formal verification and security for DeFi protocols and financial applications. -
Diem
Pioneered stablecoin architecture with strict resource control and compliance features.
Common pitfalls for new developers
Moving to Move from Solidity or Rust often feels like learning to walk again. The most immediate shock is the strict ownership model. In Solidity, you can pass references to storage variables freely; in Move, data is moved by default. This isn't just a performance optimization—it's a security guarantee that prevents double-spending at the language level. If you try to use a variable after it has been moved, the compiler will reject it immediately.
Another frequent mistake is misunderstanding the key and friend modules. New developers often try to expose internal state as they would in Solidity contracts. Move requires you to explicitly declare which modules can access your data using the friend keyword. Without this, your data remains private to the module, which is safer but requires more upfront architectural planning.
Finally, avoid treating Move like a standard object-oriented language. There are no classes or inheritance in the traditional sense. Instead, you define structs and implement behavior through separate modules. Trying to force inheritance patterns will lead to verbose, hard-to-maintain code. Stick to the module-centric design that Move encourages.

No comments yet. Be the first to share your thoughts!