Athena Transactions journey

Transaction flow:

Let’s take the simple transaction example: Alice paying Bob

  1. Alice opens her wallet, creates a transaction which sends money to Bob, presses enter and it’s done. Alice has only an Athena account and funds in this scenario and no L1 account. Alice can also be a sophisticated user and become a relay herself which means she has an account in both Athena and L1.

  2. The wallet needs to gather specific information from the network and Alice:

  • Current Execution Price: The wallet downloads the current gas price required for transaction execution.
  • Storage fee (storage fee is paid to miner and execution fee is paid to executor). A part of the payment will be to pay relays since it’s the relay who pays for storage.
  • Nonce and Balance: It retrieves Alice’s account nonce and the balance to ensure the transaction can be processed.
  • Receiver’s address (Bob) and amount to send from Alice and her key to sign the transaction.
  • Expiration time can be a default value from the wallet or customized by Alice.
  1. Wallet estimates cost and displays it to Alice (Alice does not need to know the details of fee but only the maximum total price) this might cost so she confirms the amount.

  2. Alice confirms the price to pay.

  3. Wallet sends Alice’s transaction to the relay mempool where it will be stored as an unconfirmed transaction.

  4. Relays parse Alice’s transaction and other transactions from the relay mempool to verify if users have the necessary funds and decide whether to sponsor them.

  5. Relays select transactions, forming bundles to broadcast to the L1 mempool.

  6. Transaction Deduplication: Bundles are deduplicated in the unified block creation process. Deduplication removes redundant transactions, optimizing storage and processing.

Relays

Relays are responsible for collecting and bundling Athena transactions into groups. They ensure these transactions are ready for inclusion in the L1 blockchain. This includes managing the initial processing and sorting of transactions to form coherent and executable bundles which are then deduplicated in the unified block creation. A relay mechanism requires relays to have liquidity in L1 for storage fee payment. Athena transactions and users balances are completely opaque to L1 miners.

  1. Relays start by gathering transactions that users submit to the relays mempool (This is a different one from the L1 mempool).

  2. Parsing and initial validation : Relays parse users transactions (format check, Deserialization) and verify users Athena signatures and balance to ensure users have the necessary funds and decide whether to sponsor them ensuring only valid transactions reach the L1 mempool.

  3. Bundles: Once transactions are validated, they are included in bundles

  4. Submission to L1: Once a transaction bundle is ready, the relay is responsible for submitting it to the L1 blockchain.

Random Selection of Relays:

Using randomness, Hare participants will assign transactions to relays. This helps in reducing the storage burden and ensures that each transaction is linked to only one relay, so for every transaction there is only one relay selected because it’s more efficient in terms of storage. Relays pay storage costs only for transactions they are responsible for, preventing duplication.

Deduplication Process:

Before relays are randomly assigned to transactions, a deduplication process occurs. Deduplication removes redundant transactions, optimizing storage and processing. This means that even if multiple relays include the same transaction, it is only stored once. Miners use the same Hare mechanism as for L1 transactions to recognize and remove any duplicate transactions.
Bundles are deduplicated in the unified block creation process.

Fee Management, Cost and Reward:

Transactions specify two types of fees: one for the relay and another for execution. The relay fee covers indirect costs such as L1 storage and gas proxying between L1 and Athena layer.
Relays use their own funds to pay for the gas required to store transaction bundles on L1, effectively decoupling users from needing L1 accounts or L1 gas for transactions.

The storage fees for Athena transactions are paid by the relays that included them (have been assigned to each of these transactions using the random selection mechanism previously explained). The hare does deduplication and also selects for each transaction, a single relay that will get all reward and pay all the storage for that transaction.

Each relay should pay:

  1. A fee for L1 transaction itself when creating a tx bundle
  2. The cost of storing the tx in the block for each Athena tx that the relay includes.

Relays that don’t have enough L1 balance to pay for transactions because are filtered by Hare.
The payment is done after deduplication, so after the block is created, the hare participants decide how much each relay actually pays. This is due to the fact that the Hare participants are aware of which transaction belongs to which relay.

Pruning: We can prune all Athena data after a long range for example a checkpoint and have only some archival nodes to store it.

Hare dishonest majority attack

Hare participants decide how much each relay pays and gets paid, they are also in charge of the random selection. In the case of Hare dishonest majority, the worst they can do to the relay is make it pay storage fees for transactions that were included in the block but the relay did not include. This attack is very limited because relay won’t pay more than the maximum storage fee( we need to add a separate field to the bundle which says the maximum). The actual bundle will contain an extra small field which is the total storage of all the transactions that are included in the bundle (max storage cost).

We should not prune the relay signature. The reason why is: suppose relay A is included in 1 in every 50 blocks, if we don’t have signatures and there is a dishonest majority, then Hare participants can make this relay pay every block for all the transactions in the block. If the signature is there it’s only limited to blocks to which the relay actually participated so they cannot insert a relay transaction into a block where it didn’t belong and suck out money and the second thing by having this maximum storage cost, the relay is saying it will never pay more than this amount.