# Multi-Owner (Sender) System

The Asterizm Protocol can continuously handle a significant volume of on-chain transactions.

EVM systems incorporate nonce logic, determining a precise order for sending transactions from a specific address. This approach has a crucial nuance - if one transaction from the sequence doesn't make it into a block, all subsequent transactions won't be included in a block until the original one is included. Consequently, queues for transaction submission may form on owner addresses.

The Asterizm Protocol has been designed with this nuance in mind, allowing multiple addresses capable of sending requests to be added to contracts. These addresses are referred to as **senders**. In this context, the off-chain part of the system selects the least loaded sender. This approach helps reduce load and avoid transaction queues.

## Sender logic on client contracts

To implement this logic, additional senders need to be added (the first sender is considered the owner who deployed the contract, and it is automatically added to the list of senders during the deployment of the client contract). To achieve this, the following method should be called on the respective contract:

```solidity
function addSender(address _sender) public onlyOwner
```

This method adds the provided address to the list of senders, enabling the specified address to invoke basic methods for sending protocol transfers.

## Sender logic (off-chain part)

After adding a sender to the client contract, it is necessary to include this sender in the off-chain module of the protocol. To achieve this, execute the following console command:

```bash
docker exec asterizm-console /app/main owners/add {netwotk-symbol} {owner-address} {owner-private-key} {?owner-public-key}
```

This command adds a sender to the contract of a specific network. It accepts the following parameters:

* **network-symbol** - mandatory parameter, the network symbol (e.g., ETH, POL, etc.)
* **owner-address** - mandatory parameter, the address of the owner
* **owner-private-key** - mandatory parameter, the private key of the owner
* **owner-public-key** - optional parameter, the public key of the owner (used in TVM systems).

After adding a sender to the off-chain module, it is necessary to restart the system. This is done with the following command: <mark style="color:orange;">`docker compose -f /opt/asterizm/docker-compose.yml restart`</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.asterizm.io/guides/multi-owner-sender-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
