Backend Walk Through


MSafe uses move modules to store essential data of transaction on chain. Basically, the transaction payload and signatures are stored in the multi-sig wallet's resource data in deployed MOVE module, and the executor will collect the signatures from chain, assemble signatures to form multi-ed25519 signatures, and submit the transaction through MSafe wallet.

MSafe registration

For example, for a 3/5 multi-sig wallet created by 5 public keys A, B, C, D, and E. The process of the MSafe multi-sig wallet will follow the following process:

  1. Alice initiate a wallet creation by constructing the transaction momentum_safe.register,and submit their signature by sending a transaction calling creator.initTransaction to submit the wallet creation request.

  2. Bob submit their signature to approve the creation of MSafe through creator.submit_signature.

  3. Charlie collects the signature from Alice and Bob, combine their signatures, form a transaction, and submit it on blockchain.

  4. The function MomentumSafe.register is called, and data is publish under the multi-sig wallet’s resource. Thus MSafe wallet is initialized and registered on blockchain.

Sending a transaction

The process of sending a transaction will follow the following process:

  1. Alice initiates a new transaction through momentum_safe.initTransaction and submits the transaction payload and their signature.

  2. Bob submit their signature on-chain through momentum_safe.submit_signature.

  3. Charlie collects the two signatures from Alice and Bob, combines their signature, forms a transaction, and submits it to the blockchain.

  4. The transaction passes multi-ed25519 signature verification and is finalized in the blockchain.

Revoke a transaction

Sometimes, the user may want to revoke a transaction to unblock the following transactions.

  1. Alice initiates a transaction Tx1.

  2. Bob initiates a transaction Tx2. Tx2 will be blocked by Tx1.

  3. Bob, Charlie, and Danny want to revoke Tx1, they sign a dummy transaction Tx1’ with the same sequence number as Tx1, and submit it to the blockchain.

  4. Tx1’ is finalized by blockchain, and Tx1 is pruned.

  5. Tx2 will be submitted again and further finalized after Tx1’ is finalized.

Last updated