Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Move -> Soroban: the differential cheat sheet

For Aptos Move developers shipping Soroban contracts. Each entry is composed in the following structure:

  • What it is in Move
  • What it is in Soroban
  • Where the analogy breaks.
  • The breakage is the payload.

Legend:

  • ⚠ FALSE FRIEND: your Move instinct produces compiling, working-looking Soroban code that is wrong.
  • ∅ NO ANALOGUE: nothing on the other side, don’t force one.
  • 🔧 DIRECT SWAP: mechanical rename, low risk.

Verified against soroban-sdk 27.0.6 · rustc 1.91.1 · Aptos Move 9.4.0 Every Soroban snippet in this document compiles and, where it asserts behaviour, runs green, see Verification, which also records how this was drafted. Move snippets are illustrative and not compiled.

Version note. soroban-sdk major = Stellar protocol version (SDK 27 ↔ protocol 27). Network limits and TTL floors are set by validator vote; the numbers in §6.4 match InvocationResourceLimits::mainnet() as baked into SDK 27.0.6 (a snapshot dated 2026-07-10; the SDK itself notes these are hardcoded and require an SDK update to refresh). Check live values before relying on them: Stellar Lab network limits · stellar network settings --network mainnet · crates.io/soroban-sdk.


Quick map

#ConceptMoveFlagSoroban§
1Transaction authority&signer⚠Address param + addr.require_auth()1.1
2Caller identitysigner::address_of(s)🔧the Address param itself1.1
3Multi-party authorizationmulti-agent tx (N signers)N auth entries in one tx1.2
4Programmatic signingresource account + SignerCapabilitycustom account (__check_auth) / invoker auth1.4
5Module-to-module accessfriend / public(friend)∅∅, auth checks replace visibility1.5
6Delegated authoritycapability structs (MintCap, AdminCap…)⚠role Address in storage + require_auth2.1
7Composable asset primitiveAptos object model (Object<T>, refs)∅∅, keyed entries or factory instances2.2
8Enforced obligationhot potato (no-ability struct)∅∅, runtime checks in one invocation2.3
9Storage operationsmove_to / borrow_global / exists / move_from⚠storage().{set,get,has,remove,update}3.1
10State ownershipresources under user accountsall state under the contract3.2
11Mutable state accessborrow_global_mut writes through⚠get returns a copy; write only on set3.3
12Access declarationacquires (explicit or inferred)transaction footprint, from simulation3.4
13State lifetimestate persists once paid∅ ⚠durability tiers + TTL + archival3.5
14Type-level guaranteesabilities key/store/copy/drop∅ ⚠∅, every value is plain data4.1
15Asset representationCoin<T> value in hand⚠∅ value objects; funds move only via token calls4.2
16Type-level asset segregationgeneric entry fns, phantom params⚠monomorphic ABI; asset identity = Address4.3
17Data modellingMove 2 enums / positional structs🔧#[contracttype] enums / tuple structs4.4
18Numeric semanticssigned types since Move 2.3, but amounts are u64⚠token amount i128 is signed4.5
19Code deployment unitmodule published at an addressWasm hash (upload) + instances (deploy)5.1
20Dependency linkingcompile-time use other_module⚠runtime client to an address held in storage5.2
21Function visibilityentry / public / privateone exported namespace, all-public5.3
22Initializationinit_module(&signer)🔧__constructor(env, args…)5.4
23Upgradeabilityupgrade policy in Move.tomlupgrade entry point compiled in, or immutable by omission5.5
24Transaction compositionscripts compose calls in one tx∅exactly one invocation per tx5.6
25Failure signallingabort / assert! codes#[contracterror] + Result / panic_with_error!6.1
26Failure propagationabort always propagates∅callee errors catchable via try_ clients6.2
27Overflow safetyoverflow aborts, always⚠Rust semantics behind a profile flag4.5
28Call dispatchstatic dispatch, reentrancy impossibledynamic dispatch, host blocks reentrancy6.3
29Metering modelgas schedule, no declarationmultidimensional declared resources6.4
30Off-chain observability#[event] + event::emit⚠#[contractevent], topics vs data, ~7-day retention7
31Fungible token standardCoin / Fungible Asset standards⚠SEP-41 + Stellar Asset Contract8.1
32Non-fungible token standardDigital Asset standard (token objects + refs)⚠SEP-50 (draft), and no SAC-equivalent trustable tier8.2
33Unit testing#[test(a = @0x1)], expected_failure⚠Env testutils, mock_all_auths9
34Formal verificationMove Prover (first-party, in-language spec {})⚠no first-party tool; third-party Certora Sunbeam, Komet9
35Read-only queries#[view] + /view endpoint∅ ⚠∅ attribute, any fn via simulateTransaction; view is a call mode5.7
36Customizing token behaviourstatic dispatch + DFA escape hatch (AIP-73)⚠dynamic dispatch is the only mechanism; the token is the hook5.8
37Event access on-chainreading emitted events on-chain∅ ⚠∅ on both; write-only in production, readable in tests only7.1
38Compile-time inlininginline fun (+ lambda params)🔧∅ keyword; ordinary private fns + closures5.9
39Paying out a sharesplitting a Coin<T> is the value moving⚠arithmetic, plus a token call you can omit4.6

Contents

  1. Identity & authorization
  2. Capabilities & the object model
  3. State & storage
  4. Types & abilities
  5. Modules vs. contracts
  6. Execution semantics
  7. Events
  8. Tokens
  9. Testing & assurance
  10. Toolchain quick map
  11. Porting reflexes, the grep-able checklist
  12. Verification
  13. Primary sources

Contributing

Corrections are the most valuable contribution. Missing Move concepts are equally welcome as issues even without an answer. See CONTRIBUTING.md; All Soroban snippets must compile.