NYYU Logo
APIUser Tier

Update Task Setting

Modify task reward configurations in the gamification system (Admin only)

🔄

Update Task Setting

ADMIN

Adjust reward points for user activities

Admin Access Required

This mutation is accessible only to users with ADMIN privileges. Changes affect all platform users immediately.

Overview

The updateTaskSetting mutation allows administrators to modify existing task reward configurations. Adjust verification bonuses, rebalance deposit rewards, update trading incentives, or refine staking multipliers to optimize your gamification economy.

GraphQL Schema

🔧
Mutation Definition
Updates complete reward configuration
updateTaskSetting(
  setting: TaskSettingInput!
): TaskSetting

Parameters

📝
TaskSettingInput
All fields required - provides complete replacement
input TaskSettingInput {
  verification: Float!
  wallet: [WalletTaskInput]!
  auction: Float!
  direct: Float!
  staking: [StakeTaskInput]!
}

Note: This mutation replaces the entire configuration. Include all fields even if only updating some values.

Return Type

📦
Updated TaskSetting
Complete updated configuration
type TaskSetting {
  id: Int!
  verification: Float
  wallet: [WalletTask]
  auction: Float
  direct: Float
  staking: [StakeTask]
}

Example Mutation

mutation {
  updateTaskSetting(
    setting: {
      verification: 75.0
      wallet: [
        { amount: 100, point: 15.0 }
        { amount: 500, point: 100.0 }
        { amount: 1000, point: 250.0 }
        { amount: 5000, point: 1500.0 }
      ]
      auction: 7.0
      direct: 3.0
      staking: [
        { expiredTime: 30, ratio: 1.5 }
        { expiredTime: 90, ratio: 2.5 }
        { expiredTime: 180, ratio: 4.0 }
        { expiredTime: 365, ratio: 6.0 }
      ]
    }
  ) {
    id
    verification
    wallet {
      amount
      point
    }
    auction
    direct
    staking {
      expiredTime
      ratio
    }
  }
}

Example Response

Success Response
Configuration updated successfully
{
  "data": {
    "updateTaskSetting": {
      "id": 1,
      "verification": 75,
      "wallet": [
        { "amount": 100, "point": 15 },
        { "amount": 500, "point": 100 },
        { "amount": 1000, "point": 250 },
        { "amount": 5000, "point": 1500 }
      ],
      "auction": 7,
      "direct": 3,
      "staking": [
        { "expiredTime": 30, "ratio": 1.5 },
        { "expiredTime": 90, "ratio": 2.5 },
        { "expiredTime": 180, "ratio": 4 },
        { "expiredTime": 365, "ratio": 6 }
      ]
    }
  }
}

Common Update Scenarios

🎯
Update Strategies
When and how to adjust rewards
Increase Engagement
Boost specific activity rewards to drive behavior

Increase auction: 5.0 → 10.0 to drive bidding activity

Rebalance Economy
Adjust when users progress too quickly or slowly

Reduce all rewards by 25% if tier advancement is too rapid

Add New Tiers
Expand wallet or staking options

Add wallet tier: { amount: 10000, point: 5000.0 }

Seasonal Adjustments
Temporary boosts for promotional periods

Double all staking ratios during promotion month

Use Cases

⚖️
Economic Rebalancing

Adjust rewards based on user progression analytics and tier distribution data

🎪
Promotional Events

Temporarily increase rewards during special campaigns or seasonal events

📈
Growth Optimization

Fine-tune specific rewards to drive desired user behaviors and platform growth

🔧
Bug Fixes

Correct misconfigured rewards or fix issues in the gamification economy

Best Practices

📊
Data-Driven Updates

Analyze user behavior and tier progression before making changes. Use metrics to guide adjustments.

📢
Communicate Changes

Notify users before significant reward adjustments, especially reductions. Transparency builds trust.

🧪
Test Impact

Calculate how changes affect tier progression times. Ensure updates don't break the gamification balance.

⏱️
Timing Matters

Deploy reward changes during low-traffic periods to minimize user disruption and confusion.

📝
Document Changes

Keep a changelog of reward adjustments for reference and to track gamification evolution over time.

🔄
Gradual Adjustments

Make incremental changes rather than dramatic shifts. Monitor impact before further adjustments.

Implementation Example

💻
Safe Update Implementation
Fetch current config, modify, and update
// Step 1: Fetch current configuration
const { data: currentConfig } = await client.query({
  query: gql`
    query GetTaskSetting {
      getTaskSetting {
        id
        verification
        wallet {
          amount
          point
        }
        auction
        direct
        staking {
          expiredTime
          ratio
        }
      }
    }
  `
});

// Step 2: Create modified configuration
const updatedConfig = {
  verification: currentConfig.getTaskSetting.verification * 1.5, // 50% increase
  wallet: currentConfig.getTaskSetting.wallet.map(tier => ({
    amount: tier.amount,
    point: tier.point * 1.25 // 25% increase
  })),
  auction: currentConfig.getTaskSetting.auction,
  direct: currentConfig.getTaskSetting.direct,
  staking: currentConfig.getTaskSetting.staking.map(tier => ({
    expiredTime: tier.expiredTime,
    ratio: tier.ratio * 1.2 // 20% increase
  }))
};

// Step 3: Validate changes
console.log('Current verification:', currentConfig.getTaskSetting.verification);
console.log('New verification:', updatedConfig.verification);
console.log('Change:', `+${((updatedConfig.verification / currentConfig.getTaskSetting.verification - 1) * 100).toFixed(1)}%`);

// Step 4: Apply update
const { data } = await client.mutate({
  mutation: gql`
    mutation UpdateRewards($setting: TaskSettingInput!) {
      updateTaskSetting(setting: $setting) {
        id
        verification
        wallet {
          amount
          point
        }
        auction
        direct
        staking {
          expiredTime
          ratio
        }
      }
    }
  `,
  variables: {
    setting: updatedConfig
  }
});

console.log('Rewards updated successfully:', data.updateTaskSetting);

// Step 5: Notify users
await notifyUsers({
  title: 'Reward Boost!',
  message: 'We\\'ve increased point rewards across all activities. Earn more, climb faster!'
});

Impact Analysis

📈
Calculate Update Impact
Estimate effect on tier progression
// Example: Calculate impact on tier progression
const tierThresholds = [0, 1000, 5000, 15000, 50000]; // Tier point requirements

const calculateProgressionTime = (dailyActivity, rewards) => {
  // Assume daily activity: 2 deposits, 10 auctions, 5 direct trades
  const dailyPoints =
    (rewards.wallet[0].point * 2) +
    (rewards.auction * 10) +
    (rewards.direct * 5);

  return tierThresholds.map((threshold, index) => ({
    tier: index,
    daysToReach: Math.ceil(threshold / dailyPoints)
  }));
};

// Before update
const currentProgression = calculateProgressionTime(dailyActivity, currentConfig);

// After update
const newProgression = calculateProgressionTime(dailyActivity, updatedConfig);

console.log('Progression comparison:');
currentProgression.forEach((current, i) => {
  const updated = newProgression[i];
  console.log(`Tier ${i}: ${current.daysToReach} → ${updated.daysToReach} days (${current.daysToReach - updated.daysToReach} day reduction)`);
});

Immediate Effect

Changes to task settings take effect immediately for all users. Plan updates carefully and communicate with your user base about significant changes.