1 of 19

Move’s next move:

moving Move forward in 2024, on Sui

Sam Blackshear

Creator of Move, co-founder + CTO @Mysten

w/ Move Core + Move Innovation teams @ Mysten

+ Sui developer community

2 of 19

Huge thank you to MoveFunsDAO + the APAC Move developer community!

3 of 19

Agenda

  • Move 2022-2023 Recap
  • 3 foundational improvements that give Sui devs superpowers
  • Examples of these superpowers in action

  • Move 2024 Preview

4 of 19

Move 2022-2023: safe + expressive foundations

  1. Object Data Model

Core building block for Move smart contract programming

  • Programmable Transaction Blocks (PTBs)

Code composability

  • Dynamic fields

Data composability

5 of 19

Sui objects: core smart contract building blocks

Native implementation of

  • Globally unique identifiers
  • Transfers (with store ability)
  • Ownership (in metadata)
    • By address
    • By another object
    • Shared/immutable
  • Client-side visualization (with Display standard)

struct Obj has key, store {

id: UID,

// … other fields

}

fun f(o: Obj, a: address) {

transfer(o, a)

}

6 of 19

What Sui objects do for programmers

  • Object access control checks performed by Sui runtime
    • Manual checks introduce vulns (if missing/wrong), boilerplate
  • Consistent vocabulary throughout the stack
    • Devs create objects, APIs read objects, apps/wallets/explorers display objects…
  • Enable advanced standards like kiosk, closed loop tokens that rely on native transfers + ownership
  • Enable ultra-low latency txes (480ms e2e latency) via Sui’s consensus fast path

7 of 19

Example: universal claim-object-via-link app

8 of 19

How objects enable universal claim links

  • “Create link page” shows all objects with store, uses display standard to render. For object type T
    • App doesn’t need to explicitly support T
    • Creator of T doesn’t need to explicitly enable app
  • Create link = transfer objects to temporary account A
  • Claim via link = transfer objects from A to wallet/zkLogin address
    • Using sponsored tx or gas coin included in object bundle
  • Can also specify that objects must be claimed by specific email, can be reclaimed by sender after delay, …

Superpower for onboarding/growth: send asset to anyone with an email, no wallet install needed

9 of 19

Programmable transaction blocks (PTBs): code composability

  • Sui txes can directly accept objects as input
  • Single tx can contain up to 1024 Move calls
  • Batching (e.g. payments, NFT minting)
  • Heterogeneous composition: call different functions, pass output objects into subsequent call inputs
  • Supports on-the-fly-construction in client

10 of 19

Example: Flash loan + multi-pool arbitrage

PTBs: safer and more powerful than interfaces

Superpower for DeFi builders

  • Touches 4 protocols
  • No on-chain interfaces or explicit integration needed
  • No code published
  • Gas fee < $0.01

11 of 19

Dynamic fields: data composability

  1. Add or remove fields to an object on-the-fly
  2. Can be done in declaring package, upgrade, or (if desired) external package
  3. Can add unlimited dynamic fields (do not count toward object size)

struct Obj has key{

id: UID,

f: u64 // normal field

}

fun add_coin<T>(o: &mut Obj) {

let t = type_name::get<T>();

// dynamic field

o.id[t] = coin::zero<T>()

}

12 of 19

What dynamic fields do for programmers

  • Collections (e.g., Table, LinkedTable)
  • Heterogeneous collections (e.g., Bag).
  • Custom collections (e.g., BigVector)
  • Upgradeable objects
  • Composable object hierarchies
    • NFT with accessories
    • Game character with inventory
    • DOM element with children
    • Multi-asset deposit in a lending protocol

13 of 19

Example: SuiFrens x Pebble City accessory mashup

Native and external objects compose seamlessly

Superpower for NFT, game, social devs

SuiFren

id: 0x34b

AccessoryV2<NHN>

owned by 0x7d1

id: 0x938

Field<AccessoryKey,ID>

owned by 0x34b

id: 0x7d1

key: “torso”

value: 0x938

Field<AccessoryKey,ID>

owned by 0x34b

id: 0x84b

key: “eyes”

value: 0xdaf

Accessory

owned by 0x84b

id: 0xdaf

torso

eyes

14 of 19

Agenda

  • Move 2022-2023 Recap
  • 3 foundational improvements that give Sui devs superpowers
  • Examples of these superpowers in action
    • s
  • Move 2024 Preview

15 of 19

Move 2024: strong foundations => advanced tools

Safe + expressive foundations

  1. Source language 2024 edition
  2. New zkLogin features (multisig!)
  3. Kiosk + closed loop token standards
  4. Transfer to object
  5. Secure native on-chain randomness

Advanced Tools to accelerate development

  • Package and source management
  • Object-centric GraphQL powered RPC
  • Comprehensive linters
  • Enhanced IDE support
  • Move to app compiler + LLM support

16 of 19

Secure on-chain randomness

(on mainnet in Q1)

  • New Random type
    • Generate random integers, bytes, …
  • Call using Random must be last in PTB
    • Discourages composition attacks (e.g., play lottery with flash loan, abort if you lose)
  • Great for loot boxes, random NFTs, games, lotteries …

entry fun mint_random_nft(

r: &mut Random,

ctx: &mut TxContext

) {

let rarity = r.generate_u64();

// … generate NFT, transfer to sender

17 of 19

Object-centric RPC via GraphQL

(on mainnet Jan 22)

  • Objects now truly common vocabulary throughout the stack
  • Map/filters over large object sets are highly efficient
    • No pagination unless final result is large
  • Atomic query batching
    • Get a consistent view of state at time t
  • Examples (all single query, no back-and-forth):
    • Get object + all its dynamic fields
    • Get all objects of a specific type
    • Get all dynamic fields that match a filter
  • RPC providers and apps can add custom post-processing

18 of 19

Move-to-app compiler (launching Q2/Q3)

  • Typical app is ~5% Move, 95% frontend + other stuff
  • Idea: leverage the nice structure of Move code + objects to codegen a lot of that 95%
  • Examples
    • TS type definitions and serializers + deserializers, TS function bindings, PTB construction, useful GraphQL queries + bindings
  • Goal: generate an app that works e2e, from Move source
    • Interactive visual aid for testing/prototyping
    • Instant starter code for building a real app (manually, or with LLM-powered assistance…)

19 of 19

Move 2024: strong foundations => advanced tools

Safe + expressive foundations

  • Source language 2024 edition - Feb
  • New zkLogin features (multisig!) - Q1
  • Kiosk + closed loop token standards - Ongoing
  • Transfer to object - Jan 17
  • Secure native on-chain randomness - Q2

Advanced Tools to accelerate development

  • Package and source management - Ongoing
  • Object-centric GraphQL powered RPC - Jan 22
  • Comprehensive linters - Ongoing
  • Enhanced IDE support - Ongoing
  • Move to app compiler + LLM support - Q2/Q3