📊

# Staking Position Management

View & Manage User Staking Positions

## 🎯 Position Overview

Staking positions represent individual user stakes in staking pools. The system tracks basic position information including staked amounts, start/end dates, status, and withdrawal requests. Administrators can view and manage all positions from the admin panel.

## 📈 Position Status Types

✅

### ACTIVE

Position is currently staking and earning rewards

✔️

### COMPLETED

Staking period finished, rewards distributed

❌

### CANCELLED

Position was cancelled before completion

⏳

### PENDING_WITHDRAWAL

User requested early withdrawal

## 🔧 Position Management

### Access Position Management

Navigate to the position management dashboard:

Admin Panel → Staking → Positions

View all user positions with filtering and sorting options.

### Position Information

Each position displays the following information:

Basic Details

- • Position ID and user information
- • Pool name and token details
- • Staked amount
- • Current status

Timeline Information

- • Start date and end date
- • Withdrawal request status
- • Withdrawal request date
- • Completion date (if completed)

### Admin Actions

Available administrative actions for positions:

View Position Details: Access comprehensive position information
Update Status: Change position status when needed
Add Admin Notes: Record administrative notes for positions
Delete Position: Remove positions if necessary

## 📋 Position Model Structure

### stakingPosition Fields

Field | Type | Description
--- | --- | ---
id | UUID | Unique position identifier
userId | UUID | Reference to the user who owns this position
poolId | UUID | Reference to the staking pool
amount | Float | Amount of tokens staked
startDate | Date | When the staking period started
endDate | Date | When the staking period ends
status | Enum | ACTIVE | COMPLETED | CANCELLED | PENDING_WITHDRAWAL
withdrawalRequested | Boolean | Whether user requested early withdrawal
withdrawalRequestDate | Date | When withdrawal was requested (optional)
adminNotes | Text | Administrative notes (optional)
completedAt | Date | When position was completed (optional)

## 🔌 API Integration

### Available Endpoints

`GET /api/admin/staking/position/all`

Get all staking positions

`GET /api/admin/staking/position/{id}`

Get specific position details

`PUT /api/admin/staking/position/status`

Update position status

`DELETE /api/admin/staking/position/{id}`

Delete a staking position

## 🔗 Position Relationships

### Database Relationships

Pool Association

Each position belongs to a staking pool via poolId

Earning Records

Positions have many earning records for reward tracking

## 💡 Best Practices

### Position Monitoring

Regularly review position statuses and handle withdrawal requests promptly.

### Status Management

Keep position statuses updated to reflect current state accurately.

### Admin Notes

Use admin notes to document any special circumstances or actions taken.

### Data Integrity

Ensure dates and amounts are accurate and consistent across related records.