Module Types
Within Abstract, a module is a contract that adds functionality to your Account. You can explore all the available modules on the modules tab of your Account through the web-app.
In the previous sections we referred to these modules as “applications”. We did this to simplify the mental framework of the Abstract SDK. However, the term “application” is not entirely accurate, instead we should refer to them as “modules”. These modules come in different types, each with their own purpose. The most common of which is the “App” module, or “Abstract App”.
Modules are classified in the following categories:
- App: modules that add an additional functionality, exposing new entry-points for you or your users
- Adapter: modules that act as a standard interface between your Account and external services
- Standalone: modules not built within Abstract, but registered to your account so that the manager can execute commands on them
Adapters
Adapters serve as standard interfaces that facilitate communication between your Abstract Account and various external services. They act like bridges, enabling your account to interact with different smart-contract and blockchain services, thereby enhancing the interoperability of your applications.
The key function of an Adapter is to generalize functionality. Regardless of the underlying blockchain or smart contract protocol, the Adapter provides a standard interface that maintains consistency and simplifies the interaction process. As such, Adapters significantly simplify the developer experience and reduce the time required to integrate with various external systems.
Unlike other modules specific to each Abstract Account, Adapters are “global” in nature. This means that they are shared between multiple accounts. Due to this, Adapter modules are not migratable. This design choice is aimed at preventing supply-chain attacks that could potentially compromise the security of the Abstract ecosystem.
While individual Abstract Account owners can decide which Adapters and versions they wish to utilize, the overall control and maintenance of Adapters are handled at a platform level. This approach ensures that Adapters remain reliable, secure, and consistent across all Accounts.
The
abstract:dexmodule allows Accounts to access standard functions on dexes with the same interface, regardless of whether they’re local to the chain or across IBC.
Apps
An App module adds additional functionality to your Abstract Account, exposing new entry-points for you or your users. This could range from adding advanced financial logic, data management features, or complex computation capabilities, depending on your application’s needs.
Each App module is exclusive to a single Abstract Account, meaning the instance is owned by the Account owner, ensuring the owner has full control over the module’s functionality and lifecycle. This level of control extends to the management of upgrades, maintenance, and any customization that might be required for the specific use case of the application.
Because each Account has its own instance, App modules can be tightly integrated with the Account’s existing infrastructure. This includes the ability to interact directly with other modules within the same account, enabling powerful synergies and cross-module functionality.
The
abstract:etfmodule is an app that exposes entry-points allowing external users to buy and sell “shares” in your Account, representing a portion of the Accounts’ value.
flowchart LR
subgraph Accounts[" "]
direction BT
subgraph Acc1["Account 1"]
App1["abstract:etf"]
end
subgraph Acc2["Account 2"]
App2["abstract:etf"]
end
end
subgraph Adapters
Acc1-->Adapter1{{"abstract:dex"}}
Acc2-->Adapter1
end
Adapter1-->dex1([Osmosis])
Adapter1-->dex2([Wyndex])
Adapter1-->dex3([Astroport])
abstract:etf and abstract:dex modules installed