Multi-Signature
In this session, we will work with multiple signatures
Introduction
MultiSignature (or MultiSig) on the XRPL allows multiple users to collectively authorize transactions from a shared account. This ensures enhanced security and reduces risks associated with a single point of control. Think of it like a group-controlled vault where multiple stakeholders must approve access.
MultiSign Explained
1. Configuration and Setup
MultiSignature starts with a shared account on the XRPL. This account is configured with specific rules, defining how many and which signers are required for transaction approval. Each signer is assigned a "weight," reflecting their influence in the decision-making process.
2. Establishing a Quorum
The quorum is the minimum number of signers required to authorize a transaction. For example, a quorum of three means at least three pre-approved parties must sign off for the transaction to proceed.
3. Transaction Authorization
When a transaction is initiated, it must receive the necessary number of approvals as specified in the MultiSignature configuration. For instance, if the quorum requires two out of three signers, the transaction will execute only after two parties provide their signatures.
4. Enhanced Security Features
MultiSignature ensures that even if one signer's private key is compromised, unauthorized transactions cannot occur without meeting the quorum. This reduces risks associated with fraud or hacking.
5. Customizable Flexibility
MultiSignature is highly adaptable, allowing configurations to be updated over time. For example, fewer signers can be required for everyday transactions, but unanimous approval might be enforced for high-value transfers.
Why MultiSignature Stands Out
1. Distributed Control and Governance
MultiSignature decentralizes decision-making power by requiring consensus from multiple signers. This ensures no single individual has complete control, making it ideal for businesses, joint ventures, and collaborative setups.
2. Enhanced Security Against Threats
By requiring multiple approvals, MultiSignature significantly reduces the risk of unauthorized transactions, even if one key is compromised. This layered security is a robust defense against hacking and fraud.
3. Fostering Trust in Shared Transactions
MultiSignature enhances trust in shared financial operations by ensuring transparency and consensus among all parties involved.
4. Risk Mitigation for Organizations
MultiSignature mitigates risks such as insider threats and key compromises by spreading responsibility across multiple signers.
5. Customizable for Your Needs
Configurations can be tailored to operational requirements, such as setting different approval thresholds for routine versus high-value transactions.
What are we going to do
Wallet Initialization Create wallets for the main account and the signers using their seeds.
Setting Up the Signer List Configure the signer list with their respective weights and set the quorum.
Submitting the SignerListSet Transaction Send the signer list configuration to the XRPL.
Creating the Payment Transaction Define the payment transaction that will be multi-signed.
Autofilling Transaction Details Use autofill to complete transaction fields like
Sequence
andFee
.Signing the Transaction by Each Signer Each signer independently signs the transaction.
Combining the Signatures Use
multisign
to combine the individual signatures into one transaction.Submitting the MultiSigned Transaction Submit the combined transaction to the XRPL.
Setup
Accounts
For this example you need a total of four accounts:
One main account
Three signers
The signers do not require funds but must enable the master key.
SignerQuorum: The minimum weight sum required for valid transactions.
SignerEntries: A list with at least one member and no more than 32 members.
Create Wallets
Generate Wallets instead
Alternatively you can create Wallets dynamically:
Create and Set the Signer List
Creating a Transaction
Create Transaction
In this example, we prepare a simple payment transaction to be later signed using MultiSignature. The transaction sends 1 XRP (in drops) from the main account to a specified destination address.
Prepare the transaction
Signing the Transaction
Combine the signatures
Submit
Key Points to Remember
Signer Weights and Quorum
The sum of the signer weights must meet or exceed the
SignerQuorum
for a transaction to be valid.In the example, Signer 1 has a weight of 2, while Signers 2 and 3 have a weight of 1 each.
Fee Calculation
Multi-signed transactions require higher fees due to their increased complexity.
Ensure the fee is sufficient to cover the multi-signature. In this example we used
autofill(transaction, 3)
specifying 3 signers for the Fee calculation.
Transaction Sequence or Tickets
In this example, we use the Sequence number provided by
autofill
.
Asynchronous Signing
Each signer can sign the transaction independently and at different times.
Security Considerations
MultiSignature enhances security by requiring multiple keys to authorize a transaction.
Even if one key is compromised, the attacker cannot perform unauthorized transactions without additional signatures, if the signer list is correctly set.
With MultiSignature, you can ensure robust security and reliable transaction governance on the XRPL.
Last updated