bancorprotocol / carbon-app

https://app.carbondefi.xyz
MIT License
24 stars 14 forks source link

Trade page: Add strategy creation functionality and activity section #1167

Open Costa769 opened 3 months ago

Costa769 commented 3 months ago

Overview

Our objective is to expand our offerings by allowing users to create all types of trade strategies on the trade page. This includes limit & range disposable, recurring and concentrated strategies as well as spot trade strategy which is the current trade option against existing liquidity on the platform. Additionally, we aim to enhance the data presented to users on the trade page by introducing selected pair strategies and their related activities.

Designs

Mockups Strategy icons

Implementation

The update includes the following changes to the trade page:

  1. Modifying the buy and sell order creation forms to include options for creating limit & range disposable, recurring, and concentrated strategies (the same types currently available on the create strategy page), as well as a spot trade strategy, which is the current trading option against existing liquidity.
  2. Updating the token pair selection section to enable choosing any token pair combination, allowing users to create strategies with new token pairs without existing liquidity pools.
  3. Hiding and repositioning certain elements on the trade page, such as the order book and depth chart.
  4. Enhancing the trade page data by adding an activity section.
  5. Updating every strategy creation flow to route through the trade page, making the current strategy creation flow obsolete.
  6. Important- The new trade page designs feature mockups with interactive charts. Replacing TradingView charts with these interactive charts is not part of this issue and will be addressed in the next task. Therefore:
    • Consider every interactive history chart in the mockups as a TradingView chart.
    • The date picker is related to the interactive chart view, so do not implement it at this point.

Trade section

Each strategy creation logic is explained in the "Strategy creation" section below

Strategy creation

The process for creating each type of strategy follows a distinct flow.

Limit & Range strategies

Limit/range strategy info page, Limit sell, Limit buy, Range sell, Range buy

Recurring strategies

Recurring strategy info page, Sell high(first step), Buy low(second step), Summary limit, Summary range

Concentrated strategies

Concentrated strategy info page, Set prices history chart, Set prices range chart, Set budgets, Summary

Spot trade strategy

The spot rade strategy creation is similar to the current process for placing buy/sell orders on the trade page. Spot order info page, Spot order sell, Spot order buy

Token selection

To ensure users can select any token for creating their desired strategy, we plan to replace the current token pair selection menu. Instead, we'll introduce separate token selection modals identical to those used in the current strategy creation and simulate pages.

Consider adding an indication in the select token modal that informs the user which token pairs are currently available for spot trading once they select the base token.- TBD

Order book and price chart

Activity section

This section will display all activity related to the selected pair, using the same layout (overview, portfolio, and activity tabs) and functionality as the explore page when a specific token pair is selected.

Logic

Strategy creation flow

We want to update the strategy creation and duplicate flows so that users will create strategies exclusively through the trade page, making the current strategy creation& duplicate flow obsolete, therefore:

Note! -All other strategy flows (edit, deposit and withdraw) remain unchanged

Mobile

The mobile design of the new trade page maintains the current page structure, with the token selection and strategy creation section at the top, the chart in the middle, and the order book section at the bottom of the page replaced with the activity section.

tiagofilipenunes commented 3 months ago

Related #633