A public, educational showcase of the core ideas behind Decentralized Education Development (DED):
- On-chain learning session artifacts (videos, comments, etc.)
- Simple threaded discussions using parent/child relationships
- Lightweight voting & reputation for evaluating learning outcomes
⚠️ This repo is intentionally simplified and omits production logic, economics, and advanced arbitration mechanisms.
It is meant as a conceptual & technical demo, not the full DED protocol.
DED explores how to represent learning sessions and their outputs as on-chain artifacts:
- A Student completes a learning session and uploads an artifact (usually a video, or a reference to one).
- Comments can be attached to that artifact in a tree/thread structure.
- Arbitrators / peers can vote on artifacts to signal whether the learning goals were met.
- A simple reputation score is derived from votes across artifacts.
This repo shows a minimal smart contract expressing those ideas in Solidity, without revealing deeper protocol mechanics.
The core contract in this showcase:
- Stores artifacts (videos, comments) with:
idparentIdauthorcreatedAtBlocktype(VIDEO or COMMENT)CID(content identifier for off-chain content, e.g. IPFS/Filecoin)
- Allows users to:
- Create artifacts (
createArtifact) - Read artifacts (
getArtifact)
- Create artifacts (
- Allows voters to:
- Vote +1 / -1 / 0 on artifacts (
vote) - Query aggregated scores for an artifact (
getArtifactScore) - Query author reputation across their artifacts (
getAuthorReputation)
- Vote +1 / -1 / 0 on artifacts (
All content payloads (video, text, etc.) are expected to be stored off-chain (e.g. IPFS, Filecoin, Web3.Storage) and referenced via the CID string.
Key features:
- Simple enum for artifact type (
VIDEO,COMMENT) Artifactstruct with parent/child linking for threading- Vote tracking per
(artifactId, voter)using abytes32voterId abstraction - No token economics, no payouts, no access control beyond basic checks
📄 See src/LearningSession.sol for full details.
- Solidity
^0.8.20 - Foundry (forge / cast)
- Minimal, framework-agnostic interface (no direct dependency on any frontend)
curl -L https://foundry.paradigm.xyz | bash
foundryup- This contract is intentionally minimal:
- No roles, no economics, no complex arbitration
- No assumptions about frontend, storage layer, or identity system
- The pattern is versatile and can be adapted to:
- Peer review systems
- Reputation-based knowledge networks
- Educational DAOs
- Content validation mechanisms
- This code is not audited
- It is for educational & demonstration purposes only
- Do not use as-is in production
Feel free to:
- Fork the repo
- Add your own storage layer (IPFS, Filecoin, Web3.Storage, etc.)
- Integrate with a frontend (React, Next.js, etc.)
- Extend the reputation system with:
- roles
- staking
- slashing
- more advanced arbitration logic (off-chain or on-chain)
If you build something cool on top, consider opening an issue or PR!
This section covers the full workflow for running the DED Learning Session showcase repo locally using Foundry.
git clone https://github.com/<your-username>/ded-learning-session-showcase.git
cd ded-learning-session-showcaseIf using Foundry for the first time:
curl -L https://foundry.paradigm.xyz | bash
foundryupInstall git submodules (if needed later):
git submodule update --init --recursiveCompile the project:
forge buildExpected output:
Compiling...
No errors or warnings
Once tests are added in the test/ directory, run:
forge testThis will:
- Execute unit tests
- Show traces/logs
- Display gas usage
Start a local Ethereum node:
anvilCopy one of the private keys Anvil generates.
Deploy the contract:
RPC_URL=http://127.0.0.1:8545
PRIVATE_KEY=<paste-private-key>
forge script script/LearningSession.s.sol:LearningSessionScript \
--fork-url $RPC_URL \
--private-key $PRIVATE_KEY \
--broadcastThis will output:
- Contract address
- Gas report
- Transaction hash
Deploy to a testnet or EVM-compatible network:
RPC_URL=<https-or-ws-rpc-url>
PRIVATE_KEY=<your-private-key>
forge script script/LearningSession.s.sol:LearningSessionScript \
--rpc-url $RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast
⚠️ Never hardcode private keys.
Use environment variables or.envfiles.