Menu

1 / 2

A .NET Dinosaur in Web3. #3

DEV Community·Alena·6 months ago
#PXVwRwLA
#web3#solidity#learning#software#contract
Reading 0:00
15s threshold

Day 3: Voting, Sybil Attacks and Identity

Day 3 was the first day that felt like actual software engineering rather than syntax tourism. The task: write a voting contract. Simple enough on the surface - until you start poking at the security model and realize the whole thing has serious gaps in its logic.

What looked like a toy example turned out to be a good proxy for real system design problems.

The Contract

Instead of dumping a wall of code here, I moved the full contract and instructions to GitHub. This post is about what actually matters - how it works.

GitHub: github.com/alena-dev-soft/solidity-learn/contracts/03day/

What Actually Clicked

struct → record in C#

Not a class. No methods, no behavior - pure data container. Closer to record

in C# than anything else.

mapping(address => bool) → Dictionary<address, bool>

Exact mental model. The key is a wallet address, the value is whether they've

voted.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.