# Overview

All key components of the Chainspot protocol you can find on the scheme below:

<figure><img src="https://2874846156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDl9PIQunhIbtX5NHobUr%2Fuploads%2FIaR880ZXhEhzuGX1Y2Li%2Fscheme-04.png?alt=media&#x26;token=59759106-363a-4ebb-89a4-deb59eb4f93b" alt=""><figcaption><p>Chainspot architecture overview</p></figcaption></figure>

## Intro

**Our goal** was not only to simplify and accelerate user and business access to DeFi but also to do so with optimal efficiency regarding blockchain fees and liquidity movement (swap/bridge). \
To achieve this, we found an effective balance between on-chain and off-chain modules, minimizing fee costs, streamlining DeFi position management, and ensuring security, even if control over the off-chain components is compromised.

**The core business logic** for handling user funds is executed through smart contracts, providing a reliable and predictable protocol in all use cases. \
The off-chain component acts as an interface for smart contracts and is responsible for generating the most efficient route for user fund transfers (like a “skyscanner” for liquidity) based on integrated liquidity providers. It also handles callData and payload assembly and supports analytical tasks and cross-chain messaging (cross-chain native token standard) via the Asterizm infrastructure.

Additionally, the **B2B Integration Kit** is developed and delivered from the off-chain module, facilitating seamless partner integrations.

## Components

The Chainspot protocol infrastructure consists of multiple on-chain and off-chain modules.

### **On-chain**

* Set of liquidity manager smart contracts: execution of the on-chain and cross-chain swaps via third party liquidity providers + multihop features.
* Set of yield manager smart contracts: connectors to the third party yield vaults, execution of DeFi positions management(deposit/withdrawal/claim) + auto compounding.
* Set of LP token manager smart contracts: wrapping of vault LP tokens into omnichain standard with Asterizm infrastructure, bridgeless transfers across EVM and non-EVM chains.
* Set of loyalty manager smart contracts: cashback and referral payouts claimer, NFT membership and some business logic related to the loyalty program of the Chainspot.

### Off-chain

* [Liquidity routing engine](https://docs.chainspot.io/architecture/liquidity-routing)[: ](https://docs.chainspot.io/architecture/liquidity-routing)a module for finding and assembling the most efficient route for asset swaps across any supported blockchains. It generates the callData and payload.
* [Yield routing engine:](https://docs.chainspot.io/architecture/yield-routing) a module for assembling callData and payload for managing DeFi positions, tracking positions data, accumulating statistics on yield vaults, and performing additional calculations.
* [Gamification module:](https://docs.chainspot.io/architecture/gamification-module) a module for calculating loyalty program metrics, including user experience and level assessment, referral system management, and tracking cashback and referral payout balances.
* [Enterprise module:](https://docs.chainspot.io/architecture/enterprise-module) a module necessary for providing fintech partners with all relevant legal data and additional technical services. It performs AML checks before transactions and maintains required reporting for exchanges and yield positions.
* [Asterizm Client Server Module](https://docs.chainspot.io/architecture/asterizm-client-server-module): a module necessary for the secure execution of cross-chain payload transfers within the omnichain vault LP tokens standard. The decentralized cross-chain messaging protocol Asterizm guarantees the security of omnichain DeFi positions.
* [B2B integration kit module](https://docs.chainspot.io/integration/overview): this module implements APIs and SDKs in various formats for convenient use of Chainspot by both web3 projects and traditional fintech applications.
