Skip to main content

Overview

Contribution types define the categories of activities that earn points in the GenLayer Points system. Each type belongs to a category (Builder, Validator, or Steward) and has point ranges, multipliers, and submission rules.

List Contribution Types

Get all available contribution types with filtering.
cURL
curl "https://tally.genlayer.com/api/v1/contribution-types/?category=builder&is_submittable=true"

Query Parameters

category
string
Filter by category: builder, validator, or steward
is_submittable
boolean
Filter by whether users can submit this type (true or false)
Search by name or description
ordering
string
Order by: name, created_at, -name, -created_at

Response

[
  {
    "id": 5,
    "name": "Smart Contract Deploy",
    "slug": "smart-contract-deploy",
    "description": "Deploy an intelligent contract on GenLayer testnet",
    "category": "builder",
    "min_points": 50,
    "max_points": 200,
    "current_multiplier": 1.5,
    "is_submittable": true,
    "examples": [
      "First contract deployment",
      "DeFi protocol contract",
      "NFT marketplace contract"
    ],
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  },
  {
    "id": 8,
    "name": "Community Content",
    "slug": "community-content",
    "description": "Create blog posts, tutorials, or educational content",
    "category": "builder",
    "min_points": 20,
    "max_points": 100,
    "current_multiplier": 1.0,
    "is_submittable": true,
    "examples": [
      "Tutorial blog post",
      "Video walkthrough",
      "Documentation contribution"
    ],
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-10T09:00:00Z"
  }
]

Get Single Contribution Type

Retrieve details for a specific contribution type.
cURL
curl https://tally.genlayer.com/api/v1/contribution-types/5/

Response

Returns a single contribution type object with the same schema as the list endpoint.

Get Type Statistics

Get aggregated statistics for all contribution types.
cURL
curl "https://tally.genlayer.com/api/v1/contribution-types/statistics/?category=builder"

Query Parameters

category
string
Filter by category (optional)

Response

[
  {
    "id": 5,
    "name": "Smart Contract Deploy",
    "description": "Deploy an intelligent contract",
    "min_points": 50,
    "max_points": 200,
    "count": 150,
    "participants_count": 45,
    "last_earned": "2024-03-01T15:00:00Z",
    "total_points_given": 22500,
    "current_multiplier": 1.5,
    "is_submittable": true
  },
  {
    "id": 8,
    "name": "Community Content",
    "description": "Create educational content",
    "min_points": 20,
    "max_points": 100,
    "count": 85,
    "participants_count": 30,
    "last_earned": "2024-02-28T12:00:00Z",
    "total_points_given": 6800,
    "current_multiplier": 1.0,
    "is_submittable": true
  }
]

Get Top Contributors

Get the top 10 contributors for a specific contribution type.
cURL
curl https://tally.genlayer.com/api/v1/contribution-types/5/top_contributors/

Response

id
integer
User ID
name
string
User name
address
string
Ethereum address
profile_image_url
string
Profile image URL
total_points
integer
Total points earned for this type
contribution_count
integer
Number of contributions of this type
[
  {
    "id": 42,
    "name": "Alice Builder",
    "address": "0x1234567890abcdef1234567890abcdef12345678",
    "profile_image_url": "https://res.cloudinary.com/.../profile.jpg",
    "total_points": 1500,
    "contribution_count": 15
  },
  {
    "id": 10,
    "name": "Bob Developer",
    "address": "0xabcdef1234567890abcdef1234567890abcdef12",
    "profile_image_url": "https://res.cloudinary.com/.../bob.jpg",
    "total_points": 1200,
    "contribution_count": 12
  }
]

Get Recent Contributions

Get the last 10 contributions for a specific contribution type.
cURL
curl https://tally.genlayer.com/api/v1/contribution-types/5/recent_contributions/

Response

Returns an array of contribution objects (using lightweight serializer).
[
  {
    "id": 1,
    "user": {
      "id": 42,
      "name": "Alice Builder",
      "address": "0x1234..."
    },
    "contribution_type": {
      "id": 5,
      "name": "Smart Contract Deploy"
    },
    "points": 100,
    "frozen_global_points": 150,
    "contribution_date": "2024-01-20T10:00:00Z"
  }
]

Get Type Highlights

Get active highlights for a specific contribution type.
cURL
curl "https://tally.genlayer.com/api/v1/contribution-types/5/highlights/?limit=5"

Query Parameters

limit
integer
default:"5"
Number of highlights to return

Response

Returns an array of highlight objects.
[
  {
    "id": 1,
    "title": "First Smart Contract",
    "description": "Alice deployed her first intelligent contract",
    "user_name": "Alice Builder",
    "user_address": "0x1234...",
    "contribution_points": 150,
    "contribution_date": "2024-01-20T10:00:00Z"
  }
]

Common Contribution Types

Builder Category

Points: 20
Submittable: No (auto-awarded)
Description: Welcome contribution for starting builder journey
Points: 50
Submittable: No (auto-awarded)
Description: Awarded when completing builder journey
Points: 50-200
Submittable: Yes
Description: Deploy an intelligent contract on testnet
Points: 20-100
Submittable: Yes
Description: Create tutorials, blog posts, or educational content

Validator Category

Points: 20
Submittable: No (auto-awarded)
Description: Join the validator waitlist
Points: 100
Submittable: No (auto-awarded)
Description: Become an active validator
Points: 10-50
Submittable: No (auto-tracked)
Description: Run a validator node
Points: 5-20
Submittable: No (auto-tracked)
Description: Maintain node uptime

Validation Rules

Point Ranges

  • Points must be between min_points and max_points
  • Stewards assign exact points during review
  • Points are multiplied by current multiplier to get frozen_global_points

Category Access

{
  "error": "You must complete the Builder Welcome journey before submitting builder contributions."
}

Submittability

  • is_submittable: false types cannot be submitted by users
  • These are typically auto-awarded (e.g., builder-welcome, validator)
  • Attempting to submit non-submittable types returns 400 error

Multipliers

Each contribution type has a global multiplier that affects points calculation:
frozen_global_points = base_points × current_multiplier
Example:
  • Type: “Smart Contract Deploy”
  • Base points: 100
  • Current multiplier: 1.5
  • Frozen global points: 150
Multipliers can change over time, but existing contributions keep their frozen points.

Examples in Practice

Check Available Types for Submission

const response = await fetch(
  'https://tally.genlayer.com/api/v1/contribution-types/?is_submittable=true&category=builder'
);
const types = await response.json();

// Show types in submission form
types.forEach(type => {
  console.log(`${type.name}: ${type.min_points}-${type.max_points} points`);
  console.log(`Examples: ${type.examples.join(', ')}`);
});

Get Statistics for Dashboard

const response = await fetch(
  'https://tally.genlayer.com/api/v1/contribution-types/statistics/?category=builder'
);
const stats = await response.json();

stats.forEach(stat => {
  console.log(`${stat.name}: ${stat.count} contributions, ${stat.participants_count} participants`);
});

Best Practices

  1. Cache type data - Types rarely change
  2. Show examples to users when submitting
  3. Validate points before submission
  4. Check category requirements before allowing submission
  5. Display current multiplier to show potential points
  6. Filter by is_submittable for user-facing forms

Next Steps

Submit Contribution

Learn how to submit contributions

View Statistics

Access leaderboard and stats

Build docs developers (and LLMs) love