5 min
Read
GameFAI: Where Gamification Meets DeFi and AI
by
Nuklai

GameFi is a well-known application of blockchain, but by adding an extra “A” to create GameFAI, we’re entering new territory: one where gaming meets DeFi and AI. In this emerging trend, users not only play to earn, but also contribute to training AI, seamlessly blending the excitement of gaming, the innovation of decentralized finance (DeFi), and the intelligence of AI.

GameFAI embodies a forward-thinking approach that unites three dynamic fields:

  • DeFi: Empowering users with direct control over their financial assets and transactions.
  • Gaming: Infusing interactive, play-centric elements by bringing real gaming mechanics into the world of blockchain and AI.
  • AI Training: Enabling the community to play-to-earn while simultaneously training an AI agent through real-time data

Legion: A Simple Example in GameFAI

While not our main product, the Legion app offers a prime example of how these three elements can converge. Built to engage our community in a playful way, Legion showcases how user data and collective decision-making can become valuable inputs for AI training. By incorporating real-world information (such as market sentiment), Legion’s AI component continuously learns to make smarter and more accurate judgments to help the participants make better collective decisions.

Legion transforms the often intimidating world of Web3 into an engaging, game-like experience. Participants are motivated not only by the thrill of the game but also by tangible rewards. Participants have to work together is essential to achieve the best results, each collective insight strengthens Legion’s AI, and only collectively participants can ensure that there will be rewards.

AI is the catalyst that makes Legion both smart and adaptive. The app leverages AI to analyze user behavior and market trends to provide recommendations aimed at increasing user rewards and driving up the ROI for participation. This adaptive intelligence ensures that the platform continuously evolves in response to market changes and user input.

Why GameFAI is a Trend to Watch

The convergence of gamification, DeFi, and AI represents a paradigm shift in how digital platforms are designed and experienced. By merging financial empowerment with interactive experiences, GameFAI places the user, and the data they generate, at the center of its ecosystem, fueling the continuous improvement of AI agents. Gamified elements reduce the learning curve and boost the appeal of participation, making it accessible to a broader audience, increasing the value of the training data.

With AI that is continuously refined through community participation, users receive actionable insights that help them adapt to market changes and maximize their rewards.

Looking Forward

GameFAI is a natural evolution of how communities, technology, and finance can intersect. By fusing gaming mechanics with DeFi incentives and AI-driven insights, projects like Legion spotlight the kind of dynamic user engagement that GameFAI promises. Legion demonstrates that when users come together, contribute data, and make decisions collectively, they can help create smarter, more adaptive AI, while earning tangible rewards. As GameFAI continues to grow, expect more examples of this intersection, revealing a future where the lines between play, profit, and innovation blur into a truly collaborative and  empowering digital ecosystem.

const ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries";
const ApiKey = "[API_KEY]";
const DatasetId = "[DATASET_ID]";

const headers = {
  "Content-Type": "application/json",
  'authentication': ApiKey
}
ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries"
ApiKey = "[API_KEY]"
DatasetId = "[DATASET_ID]"

headers = {
  "Content-Type": "application/json",
  "authentication": ApiKey
}
$ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries";
$ApiKey = "[API_KEY]";
$DatasetId = "[DATASET_ID]";

$headers = [
  "Content-Type: application/json",
  "authentication: $ApiKey"
];
// @dataset represents your dataset rows as a table
const body = {
  sqlQuery: "select * from @dataset limit 5",
}
@dataset represents your dataset rows as a table
body = {
  "sqlQuery": "select * from @dataset limit 5"
}
// @dataset represents your dataset rows as a table
$body = [
  "sqlQuery" => "select * from @dataset limit 5"
];
const ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries";
const ApiKey = "[API_KEY]";
const DatasetId = "[DATASET_ID]";

const headers = {
  "Content-Type": "application/json",
  'authentication': ApiKey
}

// @dataset represents your dataset rows as a table
const body = {
  sqlQuery: "select * from @dataset limit 5",
}

// make request
fetch(ApiUrl.replace(':datasetId', DatasetId), {
  method: "POST",
  headers: headers,
  body: JSON.stringify(body), // convert to json object
})
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
import requests
import json

ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries"
ApiKey = "[API_KEY]"
DatasetId = "[DATASET_ID]"

headers = {
  "Content-Type": "application/json",
  "authentication": ApiKey
}

# @dataset represents your dataset rows as a table
body = {
  "sqlQuery": "select * from @dataset limit 5"
}

# make request
url = ApiUrl.replace(':datasetId', DatasetId)
try:
  response = requests.post(url, headers=headers, data=json.dumps(body))
  data = response.json()
  print(data)
except requests.RequestException as error:
  print(f"Error: {error}")
$ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries";
$ApiKey = "[API_KEY]";
$DatasetId = "[DATASET_ID]";

$headers = [
  "Content-Type: application/json",
  "authentication: $ApiKey"
];

// @dataset represents your dataset rows as a table
$body = [
  "sqlQuery" => "select * from @dataset limit 5"
];

// make request
$ch = curl_init(str_replace(':datasetId', $DatasetId, $ApiUrl));

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body)); // convert to json object
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

$result = curl_exec($ch);
curl_close($ch);

echo $result;
curl -X POST 'https://api.nukl.ai/api/public/v1/datasets/[DATASET_ID]/queries' \
  -H 'Content-Type: application/json' \
  -H 'authentication: [API_KEY]' \
  -d '{"sqlQuery":"select * from @dataset limit 5"}'
const ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries/:jobId";
const ApiKey = "[API_KEY]";
const DatasetId = "[DATASET_ID]";
const JobId = "[JOB_ID]"; // retrieved from /queries request

const headers = {
  "Content-Type": "application/json",
  'authentication': ApiKey
}

// make request
fetch(ApiUrl.replace(':datasetId', DatasetId).replace(':jobId', JobId), {
  method: "GET",
  headers: headers
})
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
import requests

ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries/:jobId"
ApiKey = "[API_KEY]"
DatasetId = "[DATASET_ID]"
JobId = "[JOB_ID]"  # retrieved from /queries request

headers = {
  "Content-Type": "application/json",
  "authentication": ApiKey
}

# make request
url = ApiUrl.replace(':datasetId', DatasetId).replace(':jobId', JobId)
try:
  response = requests.get(url, headers=headers)
  data = response.json()
  print(data)
except requests.RequestException as error:
  print(f"Error: {error}")
$ApiUrl = "https://api.nukl.ai/api/public/v1/datasets/:datasetId/queries/:jobId";
$ApiKey = "[API_KEY]";
$DatasetId = "[DATASET_ID]";
$JobId = "[JOB_ID]"; // retrieved from /queries request

$headers = [
  "Content-Type: application/json",
  "authentication: $ApiKey"
];

// @dataset represents your dataset rows as a table
$body = [
  "sqlQuery" => "select * from @dataset limit 5"
];

// make request
$ch = curl_init(str_replace(array(':datasetId', ':jobId'), array($DatasetId, $JobId), $ApiUrl));

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

$result = curl_exec($ch);
curl_close($ch);

echo $result;
curl 'https://api.nukl.ai/api/public/v1/datasets/[DATASET_ID]/queries/[JOB_ID]' \
  -H 'Content-Type: application/json' \
  -H 'authentication: [API_KEY]'