> For the complete documentation index, see [llms.txt](https://arpitsrivastava2012.gitbook.io/wisewallet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arpitsrivastava2012.gitbook.io/wisewallet/technical-architecture.md).

# Technical Architecture

<figure><img src="/files/hssMxWJHoJcdiX1jBW27" alt=""><figcaption></figcaption></figure>

WiseWallet stands as a beacon of innovation in the world of decentralized finance (DeFi) on the Comdex blockchain. Below, we delineate its intricate architecture, covering components from wallet contracts to the cutting-edge integration of GPT interpretations for transaction intent.

### 1. Wallet Contract

At the heart of the Comdex lies the Wallet Contract, streamlining complex transactional functions and making them accessible for the end-users.

#### 1.1 Features & Functions:

* **Token Transfers**: Manages the primary functions of dispatching and receiving tokens.
* **Holding**: Facilitates users in securely storing their tokens in the contract.
* **Approvals**: Offers permissions for third-party applications to carry out actions using user tokens, aiding in DeFi processes.

This architecture provides a holistic environment for users to conduct a multitude of transaction types.

### 2. Entrypoint Contract

The Entrypoint Contract acts as a gatekeeper and relay for bundled transactions, ensuring security and efficiency in transactional processes.

#### 2.1 Process:

* **Signature Verification**: The contract first ensures the transaction's authenticity by scrutinizing its associated signatures.
* **Transaction Relay**: Upon validation, the contract sends the transaction to its intended target, ensuring user instructions are carried out precisely.

### 3. Limit Hooks

One of the most groundbreaking features of WiseWallet, Limit Hooks enable users to set up transactions based on future timestamps. Users can provide signatures indicating their intent, and when specific conditions like price limits are met, the transaction is executed using the provided signature.

#### 3.1 Advantages:

* **Non-Custodial Approach**: Users don't have to keep their assets locked in a platform, ensuring security and flexibility.
* **Future-Proof Transactions**: Users can plan for future market conditions, automating their actions based on anticipated price movements.

### 4. GPT Interpretations

Integration of GPT models in WiseWallet represents a step towards bridging the gap between everyday users and the technicalities of the blockchain world.

#### 4.1 Features:

* **User-Friendly**: Converts everyday language into valid transaction requests.
* **Dynamic Interpretation**: The versatility of the GPT models ensures a broad range of user inputs can be processed and translated into valid blockchain commands.
* **Seamless Collaboration**: Works cohesively with other components like the bundler mempool and solvers.

### 5. Solvers

Dynamic entities, solvers actively scan the bundler's mempool, ensuring that transactions are executed optimally.

#### 5.1 Functionality:

* **Mempool Monitoring**: Constantly searches the mempool for viable transactions.
* **Best Path Identification**: On finding a suitable transaction, solvers execute it, ensuring maximum value for users.
* **Commission-based Service**: Solvers take a commission, incentivizing them to provide the most beneficial paths for users.

### 6. Oracles on Comdex

To prevent potential fraudulent activities like artificial price manipulation through Flash Loans, WiseWallet utilizes Oracles on Comdex. These oracles independently verify off-chain prices, ensuring that solvers can't exploit the system to deceive users.

#### 6.1 Importance:

* **Reliable Price Verification**: Oracles provide a trustworthy source for price data, ensuring the integrity of transactional decisions based on price limits.
* **Anti-Fraud Mechanism**: By taking data from a verified off-chain source, the possibility of malicious actors manipulating prices for their gain is substantially reduced.

### Conclusion

WiseWallet's intricate architecture is a blend of tried-and-tested blockchain mechanisms combined with cutting-edge technology. By leveraging user-friendly interfaces, proactive solvers, and the latest in AI interpretation technology, WiseWallet sets the stage for a user-centric DeFi platform, ensuring accessibility, security, and efficiency for all users.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://arpitsrivastava2012.gitbook.io/wisewallet/technical-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
