Пост
Поделитесь своими знаниями.
Preventing Reentrancy in Move
How does Move’s object model help avoid reentrancy vulnerabilities?
- Move
Ответы
4Objects have single ownership and versioning, so functions cannot unintentionally re-enter or duplicate resources.
Move’s strict resource ownership and linear types prevent reentrancy by ensuring objects can’t be accessed or modified concurrently during a transaction, eliminating reentrant calls and state inconsistencies.
You avoid reentrancy problems in Move because the object model forces strict ownership and linear usage of resources, meaning an object can only be borrowed or moved once in a transaction and its version must update before it can be touched again. This prevents a contract from being re-entered while still holding mutable access to the same state, which is the classic attack surface in Solidity. Since objects in Move can’t be duplicated or partially reused, and function calls complete before ownership is released, an attacker has no way to recursively drain funds or trigger inconsistent state changes. In practice, this design makes reentrancy exploits that plague account-based systems like Ethereum far less likely on Sui.
How Move Prevents Reentrancy Vulnerabilities
-
Linear resource model – Resources can't be copied or accessed from multiple places, preventing unsafe reentry.
-
Strict ownership and borrowing rules – Enforces exclusive access to data during execution.
-
No external or dynamic calls – Contracts can't call back into each other during execution.
-
Isolated, deterministic execution – All object access is static and scoped to a single transaction.
Result: Move's object model prevents reentrancy by design—eliminating the key risks that make reentrancy possible in other smart contract languages like Solidity.
Знаете ответ?
Пожалуйста, войдите в систему и поделитесь им.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
Заработай свою долю из 1000 Sui
Зарабатывай очки репутации и получай награды за помощь в развитии сообщества Sui.

- 24p30p... SUI+2811
1
- Dpodium.js... SUI+2476
2
- Gifted.eth... SUI+2286
3
- ... SUIJeff+2205
- ... SUIJK spike+2175
- ... SUIcasey+2106
- ... SUIMatthardy+1777
- ... SUIjakodelarin+1040
- ... SUIChubbycheeks +898
- ... SUIacher+846
- Почему BCS требует точного порядка полей для десериализации, когда структуры Move содержат именованные поля?65
- «Ошибки проверки нескольких источников» в публикациях модуля Sui Move — автоматическое устранение ошибок55
- Сбой транзакции Sui: объекты, зарезервированные для другой транзакции49
- Ошибка Sui Move — невозможно обработать транзакцию Не найдено действительных газовых монет для транзакции315
- Как максимизировать прибыль, держа SUI: стейкинг и ликвидный стейкинг212