Technical overview

The Avocado platform consists of several smart contracts, backend infrastructure and the Avocado App (UI).

The contracts implement the smart contract wallet logic, deployment of new wallets, forwarding and signed transactions execution etc. They are explained in more detail in the section Contracts.

The magic component making Avocado work so elegantly on multiple networks is the custom built Avocado RPC. Important for understanding how Avocado works is: even though users must connect to the Avocado RPC, Avocado itself is not a network. It is merely used for signing the transactions that will then be dispatched to the correct network by an allowed broadcaster.

The main components involved in a normal Avocado transaction execution are outlined in the diagram below:

Avocado Infrastructure

Omnichain wallet

Avocado allows users to deploy their smart contract wallet on the same deterministic address across all supported networks.

The deterministic address of an Avocado depends on the owner EOA and the index param. This is well visible in the Contract docs for the AvoForwarder and AvoFactory, where methods like deploy, computeAvocado etc. take owner and index as input params.

Important: Index 0 is treated as Avocado Personal in the Avocado UIs (such as https://avocado.instadapp.io/).

Avocado is available on 10+ networks. For all supported networks see the relevant help section and also see Contract addresses.

Basics

Avocado wallets are smart contract wallets that support executing arbitrary actions given the signature of authorized signers. Signers can be configured as is the standard for Multisig wallets. Signatures must be EIP-712 compatible, but use chainId "634". The actual chainId where the tx will be executed is set in the salt.

All of this is easily explained in Integrate.

Avocado wallets support:

  • Executing arbitrary actions
  • Receiving NFTs (ERC721)
  • Receiving ERC1155 tokens
  • ERC1271 smart contract signatures
  • Instadapp Flashloan callbacks
  • Upgradeable (to allow-listed versions set in AvoRegistry)

See Contract docs for details.

Interaction

Most interaction with an Avocado wallet will happen through the AvoForwarder. The AvoForwarder is a smart contract that enables allow-listed broadcasters to trigger executing arbitrary actions at an Avocado smart wallet. Note that of course it is only possible for broadcasters to execute actions as previously signed of the allowed signers on the Avocado itself.

The AvoForwarder automatically checks if the Avocado in question is already deployed, and if not, it triggers deployment through the AvoFactory before executing the instructed actions.

When sending a transaction to the Avocado network, it will automatically get picked up and broadcasted at the AvoForwarder by an allowed broadcaster.