NYYU Logo
APIUser Tier

Add New Task Setting

Create task reward configurations for the gamification system (Admin only)

🎁

Add Task Setting

ADMIN

Configure reward points for user activities

Admin Access Required

This mutation is accessible only to users with ADMIN privileges. Configures point rewards for the entire platform.

Overview

The addNewSetting mutation allows administrators to create task reward configurations that define how many points users earn for various activities. Set up verification bonuses, deposit rewards, trading incentives, and staking multipliers.

GraphQL Schema

🔧
Mutation Definition
Creates comprehensive task reward settings
addNewSetting(
  setting: TaskSettingInput!
): TaskSetting

Parameters

📝
TaskSettingInput
Complete reward configuration
input TaskSettingInput {
  verification: Float!
  wallet: [WalletTaskInput]!
  auction: Float!
  direct: Float!
  staking: [StakeTaskInput]!
}
verification
Verification Points

Points awarded for completing account verification (e.g., 50.0)

wallet
Wallet Deposit Rewards

Array of deposit tiers with amount thresholds and corresponding point rewards

[{ amount: 100, point: 10.0 }, { amount: 500, point: 75.0 }]

auction
Auction Participation Points

Points per auction bid placement (e.g., 5.0)

direct
Direct Purchase Points

Points per direct trading transaction (e.g., 2.0)

staking
Staking Multipliers

Array of staking durations with point multipliers

[{ expiredTime: 30, ratio: 1.5 }, { expiredTime: 90, ratio: 2.0 }]

Return Type

📦
TaskSetting Object
Complete reward configuration with generated ID
type TaskSetting {
  id: Int!
  verification: Float
  wallet: [WalletTask]
  auction: Float
  direct: Float
  staking: [StakeTask]
}

Example Mutation

mutation {
  addNewSetting(
    setting: {
      verification: 50.0
      wallet: [
        { amount: 100, point: 10.0 }
        { amount: 500, point: 75.0 }
        { amount: 1000, point: 200.0 }
      ]
      auction: 5.0
      direct: 2.0
      staking: [
        { expiredTime: 30, ratio: 1.5 }
        { expiredTime: 90, ratio: 2.0 }
        { expiredTime: 180, ratio: 3.0 }
      ]
    }
  ) {
    id
    verification
    wallet {
      amount
      point
    }
    auction
    direct
    staking {
      expiredTime
      ratio
    }
  }
}

Example Response

Success Response
Task setting created successfully
{
  "data": {
    "addNewSetting": {
      "id": 1,
      "verification": 50,
      "wallet": [
        { "amount": 100, "point": 10 },
        { "amount": 500, "point": 75 },
        { "amount": 1000, "point": 200 }
      ],
      "auction": 5,
      "direct": 2,
      "staking": [
        { "expiredTime": 30, "ratio": 1.5 },
        { "expiredTime": 90, "ratio": 2 },
        { "expiredTime": 180, "ratio": 3 }
      ]
    }
  }
}

Reward Configuration Examples

🎯
Common Configurations
Typical reward structures for different strategies
Conservative Strategy
Lower rewards, easier to achieve
verification: 25.0
wallet: [{100, 5}, {500, 30}, {1000, 80}]
auction: 3.0
direct: 1.0
staking: [{30, 1.2}, {90, 1.5}]
Balanced Strategy
Moderate rewards for steady engagement
verification: 50.0
wallet: [{100, 10}, {500, 75}, {1000, 200}]
auction: 5.0
direct: 2.0
staking: [{30, 1.5}, {90, 2.0}, {180, 3.0}]
Aggressive Strategy
High rewards to drive rapid adoption
verification: 100.0
wallet: [{100, 25}, {500, 150}, {1000, 400}]
auction: 10.0
direct: 5.0
staking: [{30, 2.0}, {90, 3.0}, {180, 5.0}]

Use Cases

🚀
Platform Launch

Set up initial reward structure to incentivize early adopters

🎯
Behavior Targeting

Configure high rewards for specific activities you want to encourage

💰
Deposit Incentives

Create graduated wallet rewards to encourage larger deposits

🔒
Long-term Commitment

Use staking multipliers to reward users who commit for extended periods

Best Practices

📊
Progressive Wallet Tiers

Create at least 3-5 deposit tiers with increasing rewards to encourage larger deposits

⚖️
Balance Activity Rewards

Keep auction and direct trading points relatively low since users can perform these repeatedly

🎁
Verification Bonus

Set verification points high (50-100) as it's a one-time action that builds trust

📈
Staking Multiplier Progression

Use meaningful multiplier increases (1.5x → 2.0x → 3.0x) to make longer staking periods worthwhile

🧮
Calculate Total Economy

Estimate total points distribution based on expected user behavior to ensure sustainable progression

Implementation Example

💻
Admin Implementation
Configure rewards programmatically
// Define reward structure
const rewardConfig = {
  verification: 50.0,
  wallet: [
    { amount: 100, point: 10.0 },
    { amount: 500, point: 75.0 },
    { amount: 1000, point: 200.0 },
    { amount: 5000, point: 1200.0 }
  ],
  auction: 5.0,
  direct: 2.0,
  staking: [
    { expiredTime: 30, ratio: 1.5 },   // 30 days: 1.5x multiplier
    { expiredTime: 90, ratio: 2.0 },   // 90 days: 2.0x multiplier
    { expiredTime: 180, ratio: 3.0 },  // 180 days: 3.0x multiplier
    { expiredTime: 365, ratio: 5.0 }   // 1 year: 5.0x multiplier
  ]
};

// Create task setting
const { data } = await client.mutate({
  mutation: gql`
    mutation CreateTaskSetting($setting: TaskSettingInput!) {
      addNewSetting(setting: $setting) {
        id
        verification
        wallet {
          amount
          point
        }
        auction
        direct
        staking {
          expiredTime
          ratio
        }
      }
    }
  `,
  variables: {
    setting: rewardConfig
  }
});

console.log('Task setting created:', data.addNewSetting);

// Validate configuration
const totalWalletRewards = rewardConfig.wallet.reduce(
  (sum, tier) => sum + tier.point,
  0
);
console.log(`Total wallet tier rewards: ${totalWalletRewards} points`);
console.log(`Max staking multiplier: ${Math.max(...rewardConfig.staking.map(s => s.ratio))}x`);

System-Wide Configuration

Task settings apply to all users platform-wide. Carefully plan reward values to maintain a balanced gamification economy.