# Frontend Overview

## Requirement

> "Status and Process need to be shown in the frontend."

## List of Frontend Components

### Wallet Connection Section

Allow users to connect their Ethereum wallet (e.g., Metamask) to interact with the stablecoin on the Sepolia testnet.

### Stablecoin Balance

Show each user how much HS Coin he has.

### DEX Interaction

not fronetend (less frontend): Allow users to trade or provide liquidity for your stablecoin on a DEX.

### Stablecoin Price Stability Mechanism

Show the status of the rebalancing process of your stablecoin to ensure it remains stable.

- Current price of the stablecoin (e.g., 1 SCoin = $1 or its peg value).
- Rebalancing status: Whether the system has initiated a rebalancing event to maintain the price peg (for example, using oracles, burning/minting tokens, or adjusting supply in a liquidity pool).
- Graph or live feed displaying price fluctuations and stability over time.

### Transaction History & Status Feedback

Show the status of ongoing transactions (e.g., swapping tokens, minting/burning stablecoins) and allow users to track their past interactions with the smart contract.

### Gas Fees and Network Fees

Clearly indicate to users the estimated gas fees for interactions with the blockchain (since deploying smart contracts, interacting with liquidity pools, etc., require gas fees on Ethereum).

### Notes

- send/receive HS coin
- status of sending process --> started, tranfering, finish
- eth kaufen mit HSC
- status: how many HSC available / possible to buy due to the amount of CHF in our books

### Backend APIs

> prefix: /api/v1.0

- /coin/mint (POST)
- /coin/burn (POST)
- /coin/status (all infos about coin: transfers, total supply, processed, transactions, rate)
- /wallet/balance
- /wallets (show how many wallets use our coin/token)

evtl via MetaMask:

- /smartcontract/totalsupply
- /smartcontract/transfer
- /smartcontract/transfer/from
- /smartcontract/approve
- /smartcontract/allowance

## Group Meeting

- trade/Swap page: link auf sushiswap oder ähnlich
  - nur nötig wenn DEX frontend nicht funktioneirt (metamask connecten auf unsere seite)
- status page:
  - mintMax (nur so viel wie möglich, dass kaptial nicht überschritten wird)
  - wie viele ETH wir wirklich haben
  - zentrale sachen: contract adresse anzeigen / Wallet adresse
  - exchange rate CHF : HSC
