Skip to content

Manage Fungible Assets with Multisig

This tutorial introduces a practical use case that combines Aptos framework multisig account with fungible asset standard to enhance the security margin of the management of fungible assets. Make sure you have understood module publishing and Aptos framework multisig account before moving on to the tutorial. If not, it is highly recommended to try out the following tutorials first:

This tutorial was created for the TypeScript SDK.

Other developers are invited to add support for the Python SDK, Rust SDK, and Go SDK!

To create a fungible asset controlled by an Aptos framework multisig account with all the administrative operations (mint, transfer, burn, freeze/unfreeze), a well-designed smart contract based on fungible asset standard is a prerequisite. The Aptos team provides an example code in aptos-core repo.

Clone the aptos-core repo:

Terminal window
git clone git@github.com:aptos-labs/aptos-core.git ~/aptos-core

Navigate to the managed_fungible_asset directory and then publish this package onto your default account using CLI:

Terminal window
cd ~/aptos-core/aptos-move/move-examples/fungible_asset/managed_fungible_asset
aptos move publish --named-addresses example_addr=default

Navigate to the multisig_managed_coin directory and then publish this package onto your default account using CLI too:

Terminal window
cd ~/aptos-core/aptos-move/move-examples/fungible_asset/multisig_managed_coin
aptos move publish --named-addresses example_addr=default

For this tutorial, multisig_managed_coin need to call functions defined in managed_fungible_asset on the same address. So both modules have to be published.

The TypeScript example that used to live under aptos-core/ecosystem/typescript/sdk was removed when the SDK moved to aptos-ts-sdk. Use the Move packages you just published, then drive the same flow with the current SDK multisig APIs.

The intended flow is:

Generate three accounts — owner1, owner2, and owner3 — that will co-own an Aptos framework multisig account.

Create a framework multisig that administers a fungible asset

Section titled “Create a framework multisig that administers a fungible asset”

Have owner1 call initialize() in multisig_managed_coin.move. That function creates a framework multisig owned by owner1, adds owner2 and owner3, creates a fungible asset (“meme coin”) with the settings in the argument list, and makes the multisig the asset admin. Each proposal needs at least two approvals.

Mint 1000 units to owner2 and 2000 to owner3. Owner2 submits the proposal; owner3 approves it; then execute.

Freeze owner1’s primary store. Owner2 submits; owner3 approves. Unfreeze is the same call with the last argument set to false.

While owner1 is frozen, a normal transfer cannot withdraw from or deposit to that account. The multisig, as admin, can still force-transfer 1000 units from owner3 to owner1. Owner2 proposes; owner1 approves.

Burn 1000 units from each owner. Owner2 proposes; owner1 approves.

This tutorial shows an end-to-end flow of using an Aptos framework multisig account to administer a fungible asset. You can publish your own module and use the current SDK to build an administration scheme that fits your needs.