# User Flow

<figure><img src="https://1058501036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG6wtJueCdOPZQwanSQ92%2Fuploads%2FX7PbiixLn0m6YrM7KJ1l%2Fdiagram-01.png?alt=media&#x26;token=843349fe-0884-414d-b89d-945214acfa81" alt=""><figcaption></figcaption></figure>

## 1. Admin Creates a Basket

* **Basket Setup**: An admin initiates the creation of a new investment basket, selecting a specific set of tokens to include.
* **Token Selection**: Each basket is carefully curated, with token allocations reflecting proportions based on strategy, theme, or market trends.
* **Basket Details**: The admin finalizes the basket by specifying all key details, including:
  * **Token Composition**: The specific tokens included in the basket.
  * **Allocation Proportion**: The percentage each token holds within the basket.
  * **Investment Strategy**: Optional notes that define the basket's purpose, theme, or risk level.
* **Basket Availability**: Once finalized, the basket is made available on the platform for users to view and purchase.

## 2. User Purchases a Basket

* **Basket Selection**: Users browse through available baskets, viewing each basket's composition, proportions, and any other relevant information provided by the admin.
* **Payment via Odos Multi-Token Swap API**: When ready to invest, the user selects a basket and initiates the purchase using Ethereum (ETH). The Odos API facilitates a seamless multi-token swap, allowing users to purchase multiple tokens in the basket with a single ETH transaction.
* **Transaction Confirmation**: Upon successful payment, the system confirms the purchase, and the tokens are allocated to the user’s selected basket.

## 3. Creation of Basket NFT

* **NFT Generation**: To represent ownership of the purchased basket, the system automatically generates a unique, non-fungible token (NFT).
* **NFT Details**: This NFT contains metadata representing the specific basket, including:
  * **Ownership**: Information linking the NFT to the user as the basket owner.
  * **Basket Composition**: Details on the tokens within the basket, their allocation, and any relevant purchase information.
* **User's NFT Wallet**: The NFT is sent to the user’s linked wallet, confirming and securing their ownership of the basket. This NFT not only represents the user’s investment but also makes it easier to transfer or track basket ownership on the blockchain.

## 4. Selling a Basket

* **Sell Initiation**: When the user decides to sell their basket, they initiate a sale transaction on the platform.
* **NFT Burn**: Upon sale, the system "burns" or permanently deletes the NFT associated with the basket, ending the user's ownership.
* **Token Swap**: Using the Odos multi-token swap API, the system processes the sale by converting the basket’s token allocations back into ETH.
* **ETH Transfer**: The ETH obtained from the token swap is then transferred back to the user’s wallet, completing the sale.

## Summary of User Flow Benefits

* **Efficiency**: The Odos multi-token swap API minimizes transaction complexity by allowing users to purchase and sell baskets seamlessly.
* **Security**: NFT ownership of baskets creates a secure, transparent record of investment, reducing risks and enabling easy verification.
