# Abstraction

Although all General Message Passing (GMP) protocols are designed to enable the exchange of cross-chain messages, each one features its own unique interface and interaction mechanism. Significant variations exist primarily in terms of:

* Interface: Different function names, parameter number and format
* Security: Requirement of pre-approvement of the destination address
* Identification: Arbitrary chain Codification (chainId)
* Payment: Native or ERC20 acceptance, exact amount or overpay/refund approaches
* Interaction: Payment or price quoting in advance

In the following example source and destination contracts are interacting with a GMP that:

* Requires a separated payment function with refund
* Uses string format for the message payload
* Uses an arbitrary vendor defined chain ID
* Requires to implement a specific reception interface

![](/files/vMQj5zDaNVs4icUtq9Q2)

In this other example source and destination contracts are interacting with a GMP that:

* Requires an initial query for the current operation price
* Uses byte array format for the message payload
* Uses an arbitrary vendor defined chain ID
* Requires to implement a specific reception interface

![](/files/QUgr4jUrzSqwLkpCjUko)

These variations can be specifically challenging when trying to work with more than one GMP:

![](/files/CZCqjuTrEK99nWNljDXx)

This translates to:

* Increased complexity: Users or developers have to deal with all the different details of each GMP implementation. New team members have a steeper learning curve of the protocol.
* Less Flexibility: Switching to a new GMP becomes challenging in the event of a hack or downtime of the current one.
* Difficulty in Maintenance: Since the high-level functionality is tightly coupled with the GMP implementation, a change in GMP interface will require rewriting of all the components and related tests.

## Glacis Abstraction

> The Abstraction functionality of Glacis enables users and developers to engage with any compatible General Message Passing (GMP) solution seamlessly, using a singular, streamlined interaction flow, without the necessity to understand the intricate usage details inherent to each solution.

![](/files/6CC8vZKdaWt3qRkQUk9O)

![](/files/ZAETCvdCgytfxTpxDeQv)

When engaging with multiple GMP protocols, the abstraction layer of Glacis ensures a consistent user interface. This means that regardless of the number or type of GMPs involved, users experience a uniform interaction pattern.

![](/files/n698t1Vpc8YacxpHJo9A)


---

# 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.glacislabs.com/glacis-core/concepts/features/abstraction.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.
