newOS for Developers

Back to Payment Hub

Stake User

intermediate

Power stake to support creators and increase their visibility.

Endpoint

POST /user/stake

Stakes WATTS on another user to boost their creator score.

Request / Response

// Request
interface StakeRequest {
  targetId: string;  // User ID to stake on
  amount: number;    // WATTS amount to stake
}

// Response
interface StakeResponse {
  staked: number;      // Amount successfully staked
  balance: number;     // Remaining WATTS balance
  targetScore: number; // Updated creator score
}

Implementation

import { newgraphClient } from "newgraph-signals";

// Stake WATTS on a creator
const result = await newgraphClient.api.user.stakeCreate({
  targetId: "user-id-to-support",
  amount: 100
});

console.log("Staked:", result.staked, "WATTS");
console.log("Creator score:", result.targetScore);
console.log("Your balance:", result.balance);

How Staking Works

Staking in newOS is a way to support creators you believe in:

  • Boost visibility — Staked users appear higher in recommendations
  • Increase creator score — Affects content distribution
  • Time-locked — Stakes are locked for a period before unstaking
  • Earn returns — Stakers may receive rewards based on creator performance

Staking Flow

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  Check your    │ ──▶ │  POST /user/    │ ──▶ │  WATTS locked   │
│  WATTS balance │     │  stake          │     │  on creator     │
└─────────────────┘     └─────────────────┘     └────────┬────────┘
                                                         │
                        ┌─────────────────┐     ┌────────▼────────┐
                        │  Creator score  │ ◀── │  Lock period    │
                        │  increased      │     │  begins         │
                        └─────────────────┘     └─────────────────┘

Edge Cases

Insufficient balance — Returns error if WATTS balance is too low
Self-stake — Cannot stake on yourself
Minimum amount — May have minimum stake requirements
Unstaking — Has a cooldown period before WATTS are returned