Home

Awesome

Starsign multisig

Multi-signature functionality for StarkNet utilizing Cairo 1.

⚠️ WARNING! ⚠️

This project is under construction. Do not use in production.

Current version

The current version contains all basic multisig functionality, written in Cairo 1. This version consists of two pieces:

The current version supports on-chain multi-signatures. The multisig is a separate contract, which is called through your regular account contract (wallet).

The current version is not finalized and is lacking some unit tests. As the Cairo 1 compiler evolves, the contract syntax and language capabilities also evolve - this repo will be updated to reflect the new functionalities.

Audit

This code has not been audited yet.

Functionality

The following functionality is supported:

Creating a new transaction

When creating a new transaction, you should call the submit_transaction function with the following parameters:

Only signers of the multisig can submit a transaction.

Confirming a transaction

Once a transaction has been submitted to the multisig, it needs to be confirmed by threshold amount of signers. To confirm a transaction as a signer, you should call the confirm_transaction function with the transaction nonce as parameter.

Only signers of the multisig can confirm a transaction.

Executing a transaction

Once a transaction has been confirmed by threshold amount of signers, it can be executed by anyone - the executer does not have to be a signer. The execution is done by calling the execute_transaction function with the transaction nonce as parameter.

Revoking a confirmation

If you, as a signer, have confirmed a transaction, but wish to revoke the confirmation, you can call the revoke_confirmation function with the transaction nonce as parameter.

Changing the signers and threshold

There exist three functions for changing the signers and threshold:

Only signers can change the threshold and the amount of signers. These actions need to go through the multisig itself, so you have to go through the submit_transaction function (setting the multisig contract itself as the transaction target).

UI

The UI for the contracts is being developed in its own repo.

Future development

In near future we'll get here:

Multisig implementation options

The current implementation uses Option 1 in the following image. Option 2 is in our roadmap for near future.

<img src="multisig_options.png" alt="options" width="800"/>

Used technologies

Usage

Fluffy stuff

Created by Equilibrium.

If you have any question, feel free to join our Discord.