
Move is a smart contract programming language specifically designed to safely manage digital assets like tokens, NFTs, and capabilities (permissions). It was originally developed for Facebook’s Diem (Libra) blockchain and is now used in modern blockchains like Aptos and Sui.
Unlike traditional smart contract languages like Solidity, Move introduces a resource-oriented programming model. This ensures that digital assets, once created, cannot be accidentally duplicated or destroyed — preserving safety at the language level. However, even with strong guarantees, developers can still introduce bugs if they misuse certain features like entry functions, abilities, or storage access. In this blog, we’ll break down how these mistakes can happen and how they can be exploited.
A Move program is usually organized into modules, which contain:
Structs (for data like tokens)
Functions (for logic like transfer/mint)
Visibility settings (who can call what)
a). Each module defines the rules for how its resources can be created, modified, or destroyed.
b). Resources are defined using structs with specific abilities that control how they behave — for example, whether they can be copied, dropped, or stored in global storage.
c). Functions in a module can be marked as public or public entry, which determines whether they’re callable by other modules only or by end-users through transactions.
1. Resource-Oriented Programming
Move is built around a resource-oriented model, where digital assets like coins, NFTs, or permissions are treated as unique resources that can’t be accidentally copied or destroyed. This means bugs like double-spends or silent loss of tokens are much harder to introduce. In Solidity, assets are usually just integers in a mapping — they can be accidentally overwritten or manipulated if not handled carefully.
2. Safer Against Reentrancy
Solidity developers must use patterns like reentrancyGuard or checks-effects-interactions to prevent reentrancy attacks — a common exploit where an external contract calls back into a function before the first call finishes. Move’s design makes reentrancy far less likely by enforcing strict resource transfer rules and atomic transaction execution. This built-in protection simplifies writing secure smart contracts.
3. Dynamic Keys and Flexible Storage
In Move (especially on Sui), developers can use dynamic fields to attach flexible, runtime-generated keys to a parent resource. This allows storing key-value pairs directly inside a resource, rather than relying on mappings defined at compile time like in Solidity. Solidity structs cannot change shape once deployed — all dynamic key behavior must be built using mappings managed externally in the contract state.
4. Explicit Struct Abilities
In Move, each struct can declare abilities like copy, drop, store, or key to tightly control how the data can be used. For example, marking an NFT without copy guarantees it cannot be duplicated, preserving uniqueness. Solidity doesn’t have a native ability system — how a struct behaves depends purely on how the developer writes the logic. This makes Move’s type system safer by default.
These design choices form the backbone of Move’s security — but misuse can open the door to unexpected exploits.
entry Keyword Blocks User AccessSometimes, we mistakenly assume that if a function is marked as public, it can be called by anyone—just like in Solidity or other programming languages. However, in Move, there is a special modifier called entry. If a public function is missing the entry keyword, users cannot invoke it directly through their wallet, CLI, or a transaction.
A function defined using public fun may appear accessible, but in Move, public only means it can be called by other modules or scripts, not by external users. Therefore, for any user-interactable function, it is essential to ensure that the function is marked with the entry keyword.
Incorrect: public fun Without entry

This is the claim_rewards function. It is intended to allow any user to call it and claim their reward portion. However, the function is missing the entry modifier. As a result, even though it is marked as public, the user cannot interact with it directly via a transaction or wallet. In Move, public does not mean user-accessible — only functions marked with entry can be invoked directly by users.
Correct: public entry fun With entry

With the entry keyword added, this function becomes accessible to users through wallets, CLI commands, or frontend interfaces. This is how reward claim functionality is intended to be exposed in a secure, user-friendly way.
Abilities in Move define the actions that are allowed on a given value or type in the system.
Move structs fundamentally support four core abilities.
copy : Allows values of types with this ability to be copied.
drop : Allows values of types with this ability to be popped/dropped.
store : Allows values of types with this ability to exist inside a struct in global storage.
key : Allows the type to serve as a key for global storage operations.
Incorrect usage of abilities occurs when a struct is assigned abilities that violate the intended behavior or safety model of the value it represents.

If the NFT can be copied, multiple owners can claim the same unique NFT, violating the principle of non-fungibility.
This breaks both marketplace logic and trust.

If users can copy their VotingToken, they can inflate their voting power, undermining governance integrity.
drop-able TokenLet’s take the example of a flash loan module, where users can temporarily borrow tokens and are required to return them within the same transaction. The idea is that the borrowed asset is used for some operation — such as arbitrage or liquidation — and must be fully repaid by the end of the transaction.
Buggy Token Definition:

Buggy Flash Loan Logic:

The Exploit:
If Token has the drop ability, a malicious borrower can simply:

No repayment , no error, no trace .
The protocol suffers a direct loss of funds
In Move, global storage refers to the persistent on-chain state where data is stored under specific blockchain addresses. It’s how Move modules store, access, and manage data across different accounts — beyond just temporary variables inside a function.
Each address on the blockchain has its own personal storage space, and Move allows you to read from, write to, or remove data from that storage using specific functions like:
move_to<T>(...) → save data
move_from<T>(...) → remove data
borrow_global<T>(...) → read data
borrow_global_mut<T>(...) → mutate data
exists<T>(...) → check if data exists
Accepting a &signer is not always sufficient for access control purposes. Be sure to assert that the signer is the expected account, especially when performing sensitive operations.
Let’s take the example of a reputation system where each user has a Reputation struct stored in their account. The intention is that only the user should be able to update their own reputation.
Insecure Code (Broken Access Control):

Any user can call update_reputation and update anyone else’s score.
The function accepts user: &signer, but doesn’t enforce that target == signer::address_of(user).
This means a malicious user can modify other users’ data, leading to manipulation, fake scores, or abuse.
Secure Version (Enforced Ownership):

Only allows users to update their own reputation.
Ensures that global state access is restricted to the owner’s address.
Hoping that you learned something from this blog. See you again next time in another awesome blog. Good Luck & WAGMI :)
Author: Mohini Vasisth