# Lagrange

The Lagrange Protocol is a cross-chain infrastructure that enables the creation of generalized state proofs across all major blockchains.

Applications that integrate with the Lagrange Protocol can enable applications to submit aggregated proofs of multi-chain states that can be verified in a non-interactive fashion by contracts on other chains.&#x20;

Futaba can use this Lagrange as an Oracle to get the state root of various chains/rollups in a trustless manner.

{% embed url="<https://lagrange-labs.gitbook.io/lagrange-labs/overview/what-is-the-lagrange-protocol>" %}

{% @mermaid/diagram content="graph RL;
subgraph Src chain
G\[Gateway Contract]<-->|9. verify storage proof|L\[LightClient Contract];
end

```
subgraph Off-chain
	G-->|1. emit event|R((Relayer));
	L-->|2. emit event|LG{Lagrange Oracle};
	LG-->|5. return and verify state proof|L
	R-->|8. return storage proof and value|G
end

subgraph Destination chain
	LG-->|3. query state proof|T[Target Contract]
	T-->|4. return state proof|LG
	R-->|6. query storage proof|T
	T-->|7. return storage proof and value|R
end" %}
```

The event received from the [LightClient](https://futaba.gitbook.io/docs/protocol/light-client) contract is used by the Lagrange-based Oracle to obtain the state proof of the Destination chain and return it to the [LightClient](https://futaba.gitbook.io/docs/protocol/light-client) contract, which stores the state root after successful verification and uses it to verify the account proof and storage proof received from the [Relayer](https://futaba.gitbook.io/docs/protocol/relayer).


---

# 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://futaba.gitbook.io/docs/protocol/konoha/lagrange.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.
