Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosGoogle Cloud Tech: Gemini is coming to your city(24.09.2026 um 15:00 Uhr)
AI & KI NachrichtenGoogle’s latest moonshot to put machine learning in space(24.09.2026 um 15:12 Uhr)
Windows Tipps & SecurityPoll: What's your favorite Surface of 2026?(24.09.2026 um 14:58 Uhr)
Sichere ProgrammierungStreaming Materialized Views for Live Read Models (2026)(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA Day Is Not 86400 Seconds: The DST Bug in Your Date Math(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungSetting up Traefik: reverse proxy with automatic HTTPS(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA 200 OK response does not prove a secret leak(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungHow hot do you like it?(24.09.2026 um 15:05 Uhr)
YouTube Security VideosGoogle Cloud Tech: Gemini is coming to your city(24.09.2026 um 15:00 Uhr)
AI & KI NachrichtenGoogle’s latest moonshot to put machine learning in space(24.09.2026 um 15:12 Uhr)
Windows Tipps & SecurityPoll: What's your favorite Surface of 2026?(24.09.2026 um 14:58 Uhr)
Sichere ProgrammierungStreaming Materialized Views for Live Read Models (2026)(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA Day Is Not 86400 Seconds: The DST Bug in Your Date Math(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungSetting up Traefik: reverse proxy with automatic HTTPS(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA 200 OK response does not prove a secret leak(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungHow hot do you like it?(24.09.2026 um 15:05 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

🏋️ Day 10 of #30DaysOfSolidity — Building a Decentralized Fitness Tracker with Events & Milestones

Introduction Today we’re building FitTrack, a decentralized fitness tracker on Ethereum! 🏃‍♂️💪 The goal: allow users to log workouts, track progress, and unlock on-chain milestones like “10 workouts in a week” or “500 total minutes exerc…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Introduction



Today we’re building FitTrack, a decentralized fitness tracker on Ethereum! 🏃‍♂️💪



The goal: allow users to log workouts, track progress, and unlock on-chain milestones like “10 workouts in a week” or “500 total minutes exercised.”



This project demonstrates how to use:





  • Events to log activity


  • Indexed parameters for efficient off-chain filtering


  • Structs and mappings for user data


  • Emitting events to notify milestones



Think of it as a backend for a decentralized fitness app, fully on-chain.









Key Concepts





  1. Events – Log important actions on the blockchain for transparency.


  2. Logging Data – Track user workouts with type, duration, calories, and timestamp.


  3. Indexed Parameters – Make events filterable by user for frontends or analytics tools.


  4. Emitting Events – Notify when users reach milestones.









Source Code






// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

/// @title FitTrack - A Decentralized Fitness Tracker
/// @author Saurav
/// @notice Log your workouts and unlock fitness milestones on-chain
/// @dev Demonstrates event indexing, mappings, and user data tracking
contract FitTrack {
struct Workout {
string workoutType;
uint256 duration; // in minutes
uint256 calories;
uint256 timestamp;
}

struct UserStats {
uint256 totalWorkouts;
uint256 totalMinutes;
uint256 totalCalories;
uint256 lastWeekWorkouts;
uint256 lastWeekStart;
}

mapping(address => Workout[]) private workouts;
mapping(address => UserStats) public userStats;

/// @notice Emitted when a workout is logged
event WorkoutLogged(address indexed user, string workoutType, uint256 duration, uint256 calories);

/// @notice Emitted when user reaches 10 workouts in a week
event WeeklyGoalReached(address indexed user, uint256 workoutsCount);

/// @notice Emitted when user reaches 500 total minutes milestone
event TotalMinutesMilestone(address indexed user, uint256 totalMinutes);

/// @dev Log a workout session
function logWorkout(string memory _type, uint256 _duration, uint256 _calories) external {
require(_duration > 0, "Duration must be greater than 0");

Workout memory newWorkout = Workout({
workoutType: _type,
duration: _duration,
calories: _calories,
timestamp: block.timestamp
});

workouts[msg.sender].push(newWorkout);
UserStats storage stats = userStats[msg.sender];

stats.totalWorkouts += 1;
stats.totalMinutes += _duration;
stats.totalCalories += _calories;

// Weekly logic
if (block.timestamp > stats.lastWeekStart + 7 days) {
stats.lastWeekStart = block.timestamp;
stats.lastWeekWorkouts = 0;
}

stats.lastWeekWorkouts += 1;

emit WorkoutLogged(msg.sender, _type, _duration, _calories);

// Check milestones
if (stats.lastWeekWorkouts == 10) {
emit WeeklyGoalReached(msg.sender, stats.lastWeekWorkouts);
}

if (stats.totalMinutes >= 500 && (stats.totalMinutes - _duration) < 500) {
emit TotalMinutesMilestone(msg.sender, stats.totalMinutes);
}
}

/// @notice Get all workouts of a user
function getWorkouts(address _user) external view returns (Workout[] memory) {
return workouts[_user];
}

/// @notice Get user's current stats
function getUserStats(address _user) external view returns (UserStats memory) {
return userStats[_user];
}
}












How It Works




  1. Users call logWorkout() with:





  • workoutType (e.g., Running, Yoga)


  • duration in minutes


  • calories burned




  1. The contract updates UserStats (total workouts, minutes, calories).


  2. Events are emitted:






  • WorkoutLogged → every workout


  • WeeklyGoalReached → 10 workouts in a week


  • TotalMinutesMilestone → when total minutes reach 500




  1. Frontends or analytics tools can filter events by user using the indexed parameters for dashboards or notifications.









Key Learnings




  • How to structure user data with structs and mappings.

  • Implement time-based logic (weekly progress).

  • Create on-chain achievement systems.

  • Use events with indexed parameters for real-time tracking.









Next Steps




  • Integrate a frontend DApp to visualize workouts and achievements.

  • Mint NFT badges for milestones.

  • Add reward tokens for consistency.

  • Create leaderboards for global competition.






💡 Takeaway: Solidity isn’t just for finance — you can build fitness trackers, games, and lifestyle apps on-chain using the same principles.

SOC Incident Playbook: Remote Code Execution (RCE) Defense
title: Detect Exploitation - 🏋️ Day 10 of #30DaysOfSolidity — Building a Decentralized Fitness Tracker with Events & Milestones
id: c5ba9ef9-ee69-4c63-ba34-5899f449d7e5
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "🏋️ Day 10 of #30DaysOfSolidity" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich 🏋️ Day 10 of #30DaysOfSolidity — Buildin.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten 🏋️ Day 10 of #30DaysOfSolidity — Building a Decentralized Fitness Tracker with Events & Milestones

Thematisch verwandte Begriffe: 30DaysOfSolidity, Building, Decentralized, Fitness · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97152 | Nanomsg versions 0.5-beta through 1.x before 1.2.3 has a remotely exploi…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick