Petra Vault
Guides
Transaction Management

Transaction Management

Unlike traditional wallets, the flow for executing a transaction from a Vault is a three step process.

  1. Propose a Transaction - Create a transaction and propose it to the Vault.
  2. Vote on the Transaction - Vote on the transaction with the other owners of the Vault.
  3. Execute/Revoke the Transaction - Execute or revoke the transaction based on the vote results.

Although the process is slightly more complex, it is important to note that the process is fully transparent and can be verified by anyone. In addition, this additional layer of security ensures that there is not a single point of failure in the transaction execution process, making a Vault a more secure options for managing assets.

In this guide, we will be walking you through each step of the process.

This guide assumes you have an existing vault. If you don't have a vault, please refer to the Create a Vault guide.

Propose a Transaction

Navigate to the "Create Proposal" page

Navigate to the Create Proposal page by clicking on the Create Proposal option in the sidebar


Create Proposal

Enter Form Details

This section assumes you have a basic understanding of how transactions are built to called contracts.

Enter an entry function that you would like to call, typically in the format of 0x{address}::{module_name}::{function_name}. If the entry function is valid, the arguments of the function will show up in another section right below. Fill in the arguments of the function and a simulation should appear next to the form. Ensure that the simulation is showing up with the expected results.


Arguments

Click on Confirm Draft once you are satisfied with the details of the transaction.

Review Transaction

Once you have confirmed the draft, you will be redirected to the Review Transaction page. Here you will be able to review the transaction details one last time before sending the transaction.


Review Transaction

Click on Create Proposal to add the transaction to the queue of the Vault. Adding a transaction requires gas fees from the owner's account. Once in the queue, the transaction can be voted on by the other owners of the Vault.


Pending Transaction

Vote on a Transaction

Congratulations! You have proposed a transaction to the Vault. The next step is to vote on that transaction to determine whether the transaction should be executed. Let's quickly go over how pending transactions work.

  • If a transaction receives MORE approval votes than the signatures required, the transaction can be executed on behalf of one of the owners. The transaction fees will come out of the executor's account.
  • If a transaction receives MORE rejection votes than the signatures required, the transaction can be revoked and removed from the queue. The transaction fees will still be taken out of the executor's account for removing the transaction.

In the state that there are neither more approval or rejection votes than the signatures required, the transaction will remain in the queue until the owners have voted to meet one of the two conditions.

Furthermore, a transaction can only be executed/removed once it is at the top of the queue. If the transaction meets the signatures required but is not at the top of the queue, it must wait until all transactions ahead of it are executed or removed.

Navigate to the "Pending Transactions" page

To vote on a transaction, navigate to the Home page by clicking on the Home option in the sidebar and click on the Transactions tab. Here, you will be able to see all the pending transactions currently in the queue.


Pending Transactions

Click on the transaction you would like to vote on and you will be redirected to the Proposal Details page.

Review Transaction Details and Vote

When on the Proposal Details page, you will be able to review the transaction details and vote on the transaction.

You will be presented with two options, to either Approve or Reject the transaction. If you are currently approved or rejected, you will only see the opposite option. Casting a vote will require gas fees from your account.


Rejecting a Transaction

Reject Transaction

Approving a Transaction

Approve Transaction

Once you have voted, and the transaction has received more approvals or rejections than the signatures required, the transaction can be executed or removed by one of the owners.

Execute/Revoke a Transaction

Once transactions have been voted on and enter a state of execution or removal, then must be executed or revoked by one of the owners. It is important to note that in order to execute or revoke a transaction, the transaction must be at the top of the queue.

Executing a Transaction

To execute a transaction, there must be more approvals than the signatures required. Once this condition is met, the transaction can be executed by one of the owners. This is typically indicated by a green check mark towards the actions section of the transaction.


Can Execute

Click on the Execute button to execute the transaction. This will require gas fees from the executor's account.

Revoking a Transaction

To revoke a transaction, there must be more rejections than the signatures required. Once this condition is met, the transaction can be revoked by one of the owners. This is typically indicated by a red check mark towards the actions section of the transaction.


Can Revoke

Click on the Revoke button to revoke the transaction. This will require gas fees from the executor's account.

Reviewing Executed Transactions

Once a transaction has been executed or revoked, it will be moved to the transaction history section of the Vault where you can review the details of the transaction. In each row, it will show you the number of approvals/rejections, the status of the transaction, and the executor of the transaction.


Executed Transactions

Next Steps