Skip to main content

Sui Move Patterns

What design patterns emerge when ownership is structural and the compiler prevents the bugs you'd write on EVM?

Move's resource model eliminates re-entrancy, asset duplication, and unchecked access control by construction. The patterns that matter are different — not "how to prevent X" but "how to compose Y."

Patterns by Domain

DomainPatternsOur Packages
DePINDevice lifecycle state machine, operator/owner separation, stake-weighted reputation, sensor data attestationdevice_registry, depin_core, precision_agriculture, smart_city
Agent CommerceIntent→Cart→Approval flow, agent identity verification, budget constraints, expiration handlingmandate, identity
AttributionLink genealogy (parent/embedded), decay functions (4 types), revenue splits, spam detectionlink, collision, loyalty
Economic ProofsValue conservation, attribution sum validation, property-based test generationtokenomics_validation, test_framework
IoT VerticalsSensor-per-farm binding, AI prediction objects, insurance with risk calculation from telemetryprecision_agriculture

Core Move Patterns

PatternWhen to UseExample
CapabilityAccess controlAdminCap object as proof of authorization
Shared objectMulti-party accessmandate uses share_object for buyer/seller interaction
Owned objectSingle-owner fast pathlink uses transfer for creator ownership
Object compositionNested ownershipDevice owns its Capabilities and Location
Event emittersIndexer integrationAll state changes emit events for off-chain tracking
Systematic error codesDebuggability100s/200s/300s/400s/500s per module domain
test_scenarioMulti-transaction testsRealistic flows with sender switching between transactions

What Goes Here

Pages in this directory document Move-specific design patterns — grouped by domain (DePIN, DeFi, attribution, agent commerce) and by pattern type (general, economic, security). Equivalent to EVM Patterns in the EVM section.

Context

Questions

Which Move patterns from our DePIN packages would survive as reusable library modules — and which are too domain-specific to extract?