Platform ontology specification
A proposal for a complete ontology spec showing how every platform feature operates as smart contracts.
Core ontology files
Section titled “Core ontology files”ontology-futuresedge-core.yaml
Section titled “ontology-futuresedge-core.yaml”# ============================================================================# Future's Edge Core Ontology# ============================================================================
feature: futuresedge-coreextends: coreversion: 1.0.0description: Core entities and relationships for Future's Edge platformauthor: Pete Argent
# ============================================================================# Thing Types - Core Entities# ============================================================================
thingTypes: # Members and Identity - name: member description: Future's Edge member with trust score and progression properties: username: string displayName: string email: string bio: string avatar: string
# Progression rank: string # recruit, novice, member, senior, elder trustScore: number impactScore: number leadershipScore: number gratitudePoints: number
# Activity tracking activeMissions: number completedMissions: number activeContracts: number totalContractsCompleted: number
# Balances tokenBalance: number
# Skills skillBadges: string[] specializations: string[]
# Membership joinedAt: number initiatedAt: number status: string # active, probation, suspended, archived
# Web3 walletAddress: string
example: type: member name: "Alex Chen" properties: username: "alex_chen" displayName: "Alex Chen" rank: "member" trustScore: 250 impactScore: 100 tokenBalance: 1500 skillBadges: ["blockchain_basics", "design_thinking"]
# Field Offices (Maps to Groups) - name: field_office description: Regional or functional community hub properties: region: string capacity: number currentMembers: number meetingSchedule: string focusAreas: string[] performanceScore: number
# Leadership leaderId: string coLeaders: string[]
# Resources resourceAllocation: object
status: string # active, forming, dormant
# Divisions (Specialized groups) - name: division description: Specialized focus area or expertise domain properties: focusArea: string # sustainability, blockchain, policy, education expertise: string[] missionTypes: string[] memberCount: number
# Leadership headId: string councilMembers: string[]
status: string # active, incubating, archived
# Squads (Small teams) - name: squad description: Small self-organizing team for specific missions properties: missionId: string maxSize: number currentSize: number roles: object[]
status: string # forming, active, completed, disbanded
# ============================================================================# Connection Types - Core Relationships# ============================================================================
connectionTypes: # Membership - name: member_of description: Member belongs to field office fromType: member toType: field_office metadata: joinedAt: number role: string # member, lead, co-lead contribution_score: number
- name: belongs_to description: Member belongs to division fromType: member toType: division metadata: joinedAt: number specialization: string expertise_level: string
- name: in_squad description: Member is part of squad fromType: member toType: squad metadata: role: string joinedAt: number
# Leadership - name: leads description: Person leads group/office/division fromType: member toType: "*" metadata: appointed: number term_ends: number
- name: mentors description: Senior member mentors junior member fromType: member toType: member metadata: started: number focus_areas: string[]
# Social - name: connects_with description: Members have made a connection fromType: member toType: member metadata: connectedAt: number connectionStrength: number interactions: number
# ============================================================================# Event Types - Core Actions# ============================================================================
eventTypes: # Member lifecycle - name: member_registered description: New member registered interest thingType: member
- name: member_accepted description: Recruit accepted as probationary member thingType: member
- name: member_initiated description: Member completed initiation to full status thingType: member
- name: member_promoted description: Member rank increased thingType: member
# Activity - name: member_checked_in description: Member attended briefing thingType: member
- name: connection_made description: Two members connected thingType: member
# Scores - name: trust_score_updated description: Member trust score changed thingType: member
- name: impact_recorded description: Member created measurable impact thingType: memberontology-contracts.yaml
Section titled “ontology-contracts.yaml”# ============================================================================# Smart Contract System Ontology# ============================================================================
feature: contractsextends: futuresedge-coreversion: 1.0.0description: Smart contract-driven action and reward system
# ============================================================================# Thing Types - Contract Entities# ============================================================================
thingTypes: # Core contract entity - name: action_contract description: Smart contract defining an action, requirements, and rewards properties: # Contract identity contractType: string # mission, knowledge_contribution, governance, attendance, mentoring, connection title: string description: string category: string
# Eligibility - who can accept this contract eligibility: object # minTrustScore: number # maxTrustScore: number (for beginner-only missions) # requiredRank: string[] # requiredBadges: string[] # requiredDivision: string # maxActiveContracts: number # fieldOfficeId: string (location-specific)
# Requirements - what must be done requirements: object # action: string (description of work) # deliverables: string[] # constraints: object (time, resources, etc)
# Proof requirements - what evidence is needed requiredProof: object # proofTypes: string[] (document, attestation, blockchain_tx, peer_review) # minimumReviews: number # reviewerCriteria: object # reviewThreshold: number (average rating needed) # autoVerify: boolean # verificationLogic: object (for automated verification)
# Value generated by fulfilling contract valueGenerated: object # organizationalValue: # knowledgeAsset: boolean # communityGrowth: number # networkEffect: number # revenueImpact: number # individualValue: # trustPoints: number # impactScore: number # leadershipScore: number # gratitudePoints: number # tokens: number # skillBadges: string[]
# Reward distribution - how value splits rewardDistribution: object # actor: number (percentage as decimal, e.g., 0.80) # reviewers: number # mentor: number # fieldOffice: number # platform: number
# Validity period validityPeriod: object # startDate: number # endDate: number # maxFulfillments: number # currentFulfillments: number
# Contract state status: string # draft, active, paused, fulfilled, expired, cancelled createdBy: string createdAt: number
# Template reference templateId: string templateVersion: string
# Dependencies prerequisiteContracts: string[] unlocksContracts: string[]
example: type: action_contract name: "Complete Blockchain Basics Mission" properties: contractType: "mission" eligibility: minTrustScore: 0 requiredRank: ["recruit", "novice", "member"] maxActiveContracts: 3 requiredProof: proofTypes: ["submission_document", "peer_review"] minimumReviews: 2 reviewThreshold: 3.5 valueGenerated: individualValue: trustPoints: 50 tokens: 100 skillBadges: ["blockchain_basics"] rewardDistribution: actor: 0.80 reviewers: 0.15 platform: 0.05
# Contract template - reusable pattern - name: contract_template description: Template for creating multiple similar contracts properties: templateType: string category: string baseProperties: object variableFields: string[] scalingFactors: object # difficulty: { easy: 0.5, medium: 1.0, hard: 2.0 } # urgency: { standard: 1.0, urgent: 1.5 } defaultRewards: object version: string
example: type: contract_template name: "Standard Mission Template" properties: templateType: "mission" baseProperties: eligibility: maxActiveContracts: 3 scalingFactors: difficulty: { easy: 0.5, medium: 1.0, hard: 2.0, expert: 3.0 } defaultRewards: trustPoints: 50 tokens: 100
# Contract fulfillment record - name: contract_fulfillment description: Record of contract acceptance and completion properties: contractId: string actorId: string
# Acceptance acceptedAt: number estimatedCompletionDate: number
# Submission submittedAt: number proofSubmitted: object[] # proofId: string # proofType: string # submittedAt: number
# Verification verificationStatus: string # pending, under_review, approved, rejected, disputed verifiedBy: string verifiedAt: number verificationNotes: string
# Reviews reviews: object[] # reviewerId: string # rating: number # feedback: string # reviewedAt: number avgRating: number
# Rewards valueAwarded: object rewardsDistributed: boolean distributedAt: number
# Dispute disputed: boolean disputeReason: string disputeResolution: string
example: type: contract_fulfillment name: "Mission Completion: Blockchain Basics" properties: contractId: "contract_123" actorId: "member_456" acceptedAt: 1738800000000 submittedAt: 1739900000000 verificationStatus: "approved" avgRating: 4.5 valueAwarded: trustPoints: 50 tokens: 80 skillBadges: ["blockchain_basics"]
# Proof artifact - name: proof_artifact description: Evidence submitted to fulfill contract properties: fulfillmentId: string artifactType: string # document, image, video, code, attestation, blockchain_tx, peer_statement
# Content content: string # URL, IPFS hash, or inline data contentHash: string # SHA-256 hash for integrity title: string description: string
# Storage storageLocation: string # ipfs, s3, arweave, local storageUrl: string
# Metadata metadata: object # fileSize: number # mimeType: string # duration: number (for video/audio) # wordCount: number (for documents) # topics: string[]
# Attestations attestations: object[] # attesterId: string # attestationType: string (peer_review, expert_validation, automated_check) # result: string (pass, fail, needs_revision) # score: number # notes: string # timestamp: number # signature: string (cryptographic signature)
# Blockchain anchor (optional) blockchainProof: object # network: string # txHash: string # blockNumber: number # timestamp: number # explorerUrl: string
timestamp: number submittedBy: string
example: type: proof_artifact name: "Mission Report: Blockchain Basics" properties: artifactType: "document" content: "ipfs://QmX1234..." contentHash: "sha256:abc123..." attestations: - attesterId: "reviewer_789" score: 4.5 notes: "Excellent work" timestamp: 1739950000000
# Composite contract (mission with sub-tasks) - name: composite_contract description: Complex contract composed of multiple sub-contracts properties: title: string description: string subContracts: object[] # contractId: string # order: number # prerequisite: string (previous contractId) # optional: boolean
requiresSequential: boolean allowParallel: boolean
totalReward: object completionBonus: object
progressTracking: object # completed: number # total: number # percentage: number
status: string
# Contract dispute - name: contract_dispute description: Formal dispute regarding contract fulfillment properties: fulfillmentId: string contractId: string disputerId: string
disputeType: string # unfair_rejection, incorrect_verification, reward_calculation_error reason: string evidence: string[]
requestedAction: string # re_review, escalate_to_council, modify_contract
# Resolution status: string # open, under_review, resolved, closed assignedTo: string # council member or mediator resolution: string resolvedAt: number resolvedBy: string
# ============================================================================# Connection Types - Contract Relationships# ============================================================================
connectionTypes: # Contract lifecycle - name: created_contract description: Member created a contract fromType: member toType: action_contract metadata: createdAt: number role: string # creator, template_instantiator
- name: accepted_contract description: Member accepted/committed to contract fromType: member toType: action_contract metadata: acceptedAt: number estimatedCompletion: number priority: string
- name: fulfills description: Fulfillment record fulfills contract fromType: contract_fulfillment toType: action_contract metadata: acceptedAt: number submittedAt: number completionTime: number # days
- name: provides_proof description: Fulfillment includes proof artifact fromType: contract_fulfillment toType: proof_artifact metadata: proofOrder: number required: boolean
# Review and verification - name: reviewed_by description: Fulfillment was reviewed by member fromType: contract_fulfillment toType: member metadata: rating: number feedback: string reviewedAt: number reviewDuration: number # minutes spent reviewing
- name: verified_by description: Final verification by authorized person fromType: contract_fulfillment toType: member metadata: verifiedAt: number verificationNotes: string approved: boolean
- name: attested_by description: Proof was attested by reviewer fromType: proof_artifact toType: member metadata: attestationType: string score: number timestamp: number signature: string
# Rewards - name: awarded_to description: Rewards distributed to member fromType: contract_fulfillment toType: member metadata: trustPoints: number impactScore: number leadershipScore: number gratitudePoints: number tokens: number skillBadges: string[] distributedAt: number role: string # actor, reviewer, mentor
# Disputes - name: disputed_by description: Fulfillment was disputed by member fromType: contract_fulfillment toType: member metadata: disputedAt: number reason: string
- name: resolves_dispute description: Dispute resolution for fulfillment fromType: contract_dispute toType: contract_fulfillment metadata: resolvedAt: number outcome: string
# Templates - name: instantiated_from description: Contract created from template fromType: action_contract toType: contract_template metadata: instantiatedAt: number templateVersion: string customizations: object
# Composite relationships - name: part_of description: Sub-contract is part of composite contract fromType: action_contract toType: composite_contract metadata: order: number prerequisite: string optional: boolean
- name: prerequisite_for description: Contract must be completed before another fromType: action_contract toType: action_contract metadata: unlockConditions: object
# ============================================================================# Event Types - Contract Actions# ============================================================================
eventTypes: # Contract lifecycle - name: contract_created description: New contract was created thingType: action_contract
- name: contract_published description: Contract made available for acceptance thingType: action_contract
- name: contract_updated description: Contract terms were modified thingType: action_contract
- name: contract_paused description: Contract temporarily unavailable thingType: action_contract
- name: contract_cancelled description: Contract was cancelled thingType: action_contract
- name: contract_expired description: Contract validity period ended thingType: action_contract
# Acceptance and work - name: contract_accepted description: Member committed to fulfilling contract thingType: action_contract
- name: contract_abandoned description: Member gave up on contract thingType: action_contract
- name: work_progress_updated description: Member provided progress update thingType: contract_fulfillment
# Submission and proof - name: proof_submitted description: Evidence submitted for contract thingType: contract_fulfillment
- name: additional_proof_requested description: Reviewers need more evidence thingType: contract_fulfillment
- name: proof_updated description: Additional evidence provided thingType: contract_fulfillment
# Review and verification - name: review_requested description: Fulfillment ready for peer review thingType: contract_fulfillment
- name: review_completed description: Peer review submitted thingType: contract_fulfillment
- name: verification_completed description: Final verification done thingType: contract_fulfillment
- name: contract_fulfilled description: Contract successfully completed thingType: action_contract
- name: contract_rejected description: Fulfillment did not meet requirements thingType: contract_fulfillment
# Rewards - name: reward_calculated description: Rewards computed for fulfillment thingType: contract_fulfillment
- name: reward_distributed description: Value awarded to participant thingType: contract_fulfillment
# Disputes - name: contract_disputed description: Fulfillment or verification disputed thingType: contract_fulfillment
- name: dispute_escalated description: Dispute sent to council thingType: contract_dispute
- name: dispute_resolved description: Dispute outcome determined thingType: contract_dispute
# Analytics - name: contract_viewed description: Member viewed contract details thingType: action_contract
- name: contract_favorited description: Member bookmarked contract thingType: action_contractontology-missions.yaml
Section titled “ontology-missions.yaml”# ============================================================================# Missions System - Implemented as Smart Contracts# ============================================================================
feature: missionsextends: contractsversion: 1.0.0description: Mission system built on smart contract architecture
# ============================================================================# Thing Types - Mission-Specific Entities# ============================================================================
thingTypes: # Mission (extends action_contract) - name: mission description: Learning and contribution project as a smart contract properties: # Mission identity title: string description: string slug: string
# Mission type missionType: string # standard, specialized, advanced, daily, onboarding, impact, growth category: string # technical, governance, community, research, advocacy
# Difficulty difficulty: string # beginner, intermediate, advanced, expert estimatedHours: number complexity: string # simple, moderate, complex
# Learning outcomes skillsLearned: string[] skillProofsAwarded: string[] knowledge_areas: string[]
# Requirements (extends contract eligibility) prerequisites: string[] # mission IDs that must be completed first requiredSkills: string[] recommendedSkills: string[]
# Mission structure phases: object[] # phaseName: string # description: string # deliverables: string[] # estimatedHours: number # order: number
isSolo: boolean isCollaborative: boolean minTeamSize: number maxTeamSize: number
# Guidance resources: object[] # title: string # type: string (article, video, tool) # url: string instructions: string tips: string[] commonPitfalls: string[]
# Submission requirements submissionGuidelines: string deliverables: string[] exampleSubmissions: string[]
# Contract reference contractId: string # Links to action_contract
# Tracking totalEnrollments: number totalCompletions: number completionRate: number avgRating: number avgCompletionTime: number # hours
# Status status: string # draft, published, archived publishedAt: number createdBy: string
example: type: mission name: "Blockchain Basics" properties: missionType: "standard" difficulty: "beginner" estimatedHours: 8 skillProofsAwarded: ["blockchain_basics"] isSolo: true isCollaborative: false contractId: "contract_123" submissionGuidelines: "Submit a 1500-word report demonstrating understanding"
# Mission enrollment (links member to mission via contract) - name: mission_enrollment description: Member's enrollment and progress in a mission properties: memberId: string missionId: string contractFulfillmentId: string # Links to contract_fulfillment
# Progress enrolledAt: number startedAt: number targetCompletionDate: number actualCompletionDate: number
progressPercentage: number phasesCompleted: number[] checkpoints: object[] # checkpoint: string # completedAt: number # notes: string
# Collaboration (if team mission) teamId: string # squad ID roleInTeam: string
# Support mentorId: string buddyId: string
# Status status: string # enrolled, in_progress, submitted, completed, abandoned
# Time tracking hoursSpent: number lastActivityAt: number
# Daily mission (micro-learning) - name: daily_mission description: Quick daily learning challenge properties: title: string description: string missionType: string # quiz, challenge, reflection, survey, mini_task
# Content content: object # varies by type correctAnswer: string # for quizzes
# Scheduling availableDate: number expiresAt: number
# Rewards (small) trustPointsReward: number
# Tracking participantCount: number completionRate: number
example: type: daily_mission name: "Web3 Word of the Day" properties: missionType: "quiz" trustPointsReward: 5 availableDate: 1738800000000 expiresAt: 1738886400000
# Mission pathway (curated progression) - name: mission_pathway description: Curated sequence of missions for skill development properties: title: string description: string
# Progression missions: object[] # missionId: string # order: number # required: boolean
# Outcomes totalSkillProofs: string[] estimatedTotalHours: number
# Tracking enrolledMembers: number completedMembers: number
example: type: mission_pathway name: "Blockchain Developer Track" properties: missions: - { missionId: "mission_1", order: 1, required: true } - { missionId: "mission_2", order: 2, required: true } - { missionId: "mission_3", order: 3, required: false }
# ============================================================================# Connection Types - Mission Relationships# ============================================================================
connectionTypes: - name: enrolled_in description: Member enrolled in mission fromType: member toType: mission metadata: enrolledAt: number enrollmentId: string # mission_enrollment ID status: string
- name: completed_mission description: Member successfully completed mission fromType: member toType: mission metadata: completedAt: number rating: number hoursSpent: number fulfillmentId: string
- name: facilitates description: Member facilitates or mentors mission fromType: member toType: mission metadata: role: string # facilitator, mentor, reviewer
- name: mission_squad description: Squad formed for collaborative mission fromType: squad toType: mission metadata: formedAt: number
- name: follows_mission description: Next mission in pathway fromType: mission toType: mission metadata: order: number required: boolean
# ============================================================================# Event Types - Mission Actions# ============================================================================
eventTypes: - name: mission_created description: New mission designed thingType: mission
- name: mission_published description: Mission made available to members thingType: mission
- name: mission_enrolled description: Member enrolled in mission thingType: mission
- name: mission_started description: Member began work on mission thingType: mission
- name: mission_progress_updated description: Member updated progress thingType: mission_enrollment
- name: mission_phase_completed description: Member completed a mission phase thingType: mission_enrollment
- name: mission_submitted description: Member submitted mission for review thingType: mission
- name: mission_completed description: Mission successfully finished thingType: mission
- name: mission_abandoned description: Member gave up on mission thingType: mission
- name: daily_mission_completed description: Member completed daily challenge thingType: daily_mission
- name: pathway_started description: Member started mission pathway thingType: mission_pathway
- name: pathway_completed description: Member finished all pathway missions thingType: mission_pathwayontology-knowledge.yaml
Section titled “ontology-knowledge.yaml”# ============================================================================# KnowledgeBank - Implemented as Smart Contracts# ============================================================================
feature: knowledgeextends: contractsversion: 1.0.0description: Knowledge contribution and sharing system
# ============================================================================# Thing Types - Knowledge Entities# ============================================================================
thingTypes: # Knowledge article - name: knowledge_article description: Educational content in KnowledgeBank properties: title: string slug: string content: string # markdown or HTML summary: string
# Classification category: string # tutorial, guide, reference, case_study, research topics: string[] difficulty: string
# Content structure sections: object[] estimatedReadTime: number # minutes
# Authorship authorId: string contributors: string[]
# Contract reference (if incentivized contribution) contractFulfillmentId: string
# Versioning version: string previousVersionId: string changeLog: string
# Metadata viewCount: number helpfulCount: number references: string[] relatedArticles: string[]
# Status status: string # draft, published, under_review, archived publishedAt: number lastUpdatedAt: number
example: type: knowledge_article name: "Introduction to DAOs" properties: category: "guide" topics: ["governance", "web3", "dao"] difficulty: "beginner" estimatedReadTime: 10 contractFulfillmentId: "fulfillment_789"
# Knowledge contribution contract - name: knowledge_contribution_contract description: Contract for creating/improving knowledge articles properties: contributionType: string # create_new, improve_existing, translate, update targetArticleId: string # for improvements/updates requiredQuality: object # minimumWords: number # requiresCitation: boolean # requiresExamples: boolean # requiresDiagrams: boolean
# Rewards baseReward: object qualityBonus: object # excellentWriting: number # highEngagement: number (views/helpful clicks) # citedByOthers: number
example: type: knowledge_contribution_contract name: "Create Web3 Glossary Article" properties: contributionType: "create_new" requiredQuality: minimumWords: 1000 requiresCitation: true requiresExamples: true
# IdeaBank submission - name: idea description: Member's proposal or idea properties: title: string description: string ideaType: string # mission_proposal, governance_proposal, improvement, innovation
# Content problem: string solution: string benefits: object feasibility: object resources_needed: object
# Authorship proposerId: string coAuthors: string[]
# Community feedback votes: object # upvotes: number # downvotes: number comments: object[]
# Status status: string # submitted, under_discussion, approved, implemented, rejected submittedAt: number
# If approved, becomes contract implementationContractId: string
# Discussion thread - name: discussion description: Community discussion on topics/ideas properties: title: string content: string discussionType: string # question, debate, brainstorm, feedback
# Context relatedTo: string # article ID, idea ID, proposal ID relatedType: string
# Participants startedBy: string participantIds: string[]
# Activity replies: object[] resolvedAt: number resolution: string
status: string # open, resolved, archived
# ============================================================================# Connection Types - Knowledge Relationships# ============================================================================
connectionTypes: - name: authored description: Member created knowledge article fromType: member toType: knowledge_article metadata: role: string # primary_author, contributor, translator contributedAt: number
- name: improved description: Member improved existing article fromType: member toType: knowledge_article metadata: improvementType: string changesDescription: string approvedAt: number
- name: found_helpful description: Member found article useful fromType: member toType: knowledge_article metadata: markedAt: number
- name: cites description: Article references another article fromType: knowledge_article toType: knowledge_article metadata: citationType: string
- name: proposed_idea description: Member submitted idea fromType: member toType: idea metadata: proposedAt: number
- name: voted_on_idea description: Member voted on idea fromType: member toType: idea metadata: vote: string # upvote, downvote votedAt: number
- name: commented_on description: Member participated in discussion fromType: member toType: discussion metadata: commentCount: number lastCommentAt: number
# ============================================================================# Event Types - Knowledge Actions# ============================================================================
eventTypes: - name: article_created description: New knowledge article written thingType: knowledge_article
- name: article_published description: Article made public thingType: knowledge_article
- name: article_updated description: Article content improved thingType: knowledge_article
- name: article_viewed description: Member read article thingType: knowledge_article
- name: article_marked_helpful description: Member found article useful thingType: knowledge_article
- name: idea_submitted description: New idea proposed thingType: idea
- name: idea_discussed description: Community discussed idea thingType: idea
- name: idea_voted description: Member voted on idea thingType: idea
- name: idea_approved description: Idea accepted for implementation thingType: idea
- name: idea_implemented description: Approved idea became reality thingType: idea
- name: discussion_started description: New discussion thread created thingType: discussion
- name: discussion_replied description: Member added to discussion thingType: discussion
- name: discussion_resolved description: Discussion reached conclusion thingType: discussionontology-governance.yaml
Section titled “ontology-governance.yaml”# ============================================================================# Governance System - Implemented as Smart Contracts# ============================================================================
feature: governanceextends: contractsversion: 1.0.0description: Democratic governance and decision-making system
# ============================================================================# Thing Types - Governance Entities# ============================================================================
thingTypes: # Governance proposal - name: governance_proposal description: Formal proposal for community decision properties: title: string description: string proposalType: string # policy_change, resource_allocation, strategic_direction, council_election
# Content motivation: string # why this is needed specification: string # what exactly is proposed implementation: string # how it would be executed impact_analysis: object
# Authorship proposerId: string coSponsors: string[]
# Voting votingPeriod: object # startDate: number # endDate: number quorumRequired: number # percentage of eligible voters approvalThreshold: number # percentage of votes needed (e.g., 0.51, 0.67)
# Eligibility to vote voterEligibility: object # minTrustScore: number # requiredRank: string[] # fieldOfficeIds: string[] (if field-office specific)
# Results votes: object # for: number # against: number # abstain: number totalVotes: number quorumMet: boolean passed: boolean
# Contract reference (voting is a contract action) votingContractId: string
# Implementation implementationStatus: string # pending, in_progress, completed, failed implementedAt: number implementedBy: string
# Status status: string # draft, open_for_discussion, voting_active, passed, rejected, implemented createdAt: number
example: type: governance_proposal name: "Proposal: Increase Mission Completion Rewards" properties: proposalType: "policy_change" votingPeriod: startDate: 1738800000000 endDate: 1739400000000 quorumRequired: 0.20 approvalThreshold: 0.51 votingContractId: "contract_vote_123"
# Vote record - name: vote description: Individual member's vote on proposal properties: proposalId: string voterId: string
vote: string # for, against, abstain reason: string # optional explanation votingPower: number # based on trust score or governance weight
# Contract reference contractFulfillmentId: string # voting is fulfilling a contract
timestamp: number
example: type: vote name: "Vote on Proposal 123" properties: proposalId: "proposal_123" voterId: "member_456" vote: "for" votingPower: 1.5 contractFulfillmentId: "fulfillment_vote_789"
# Council / governance body - name: council description: Elected governance body for specific domain properties: name: string description: string domain: string # values, mission, strategy, technical, community
# Membership seats: number currentMembers: object[] # memberId: string # role: string (lead, member) # electedAt: number # termEnds: number
# Powers responsibilities: string[] decision_authority: string[] budget_control: number
# Meetings meeting_frequency: string nextMeetingDate: number
# Status status: string # active, forming, dissolved
# Voting contract (specific type of action_contract) - name: voting_contract description: Contract that rewards participation in governance properties: proposalId: string
# Eligibility to vote (who can fulfill this contract) eligibility: object # minTrustScore: number # requiredRank: string[]
# Rewards for voting valueGenerated: object # participationPoints: number (for any vote) # informedVoterBonus: number (if they attended discussions)
# Validity validityPeriod: object # startDate: number # endDate: number
# ============================================================================# Connection Types - Governance Relationships# ============================================================================
connectionTypes: - name: proposed_by description: Member proposed governance item fromType: member toType: governance_proposal metadata: proposedAt: number
- name: co_sponsored description: Member co-sponsored proposal fromType: member toType: governance_proposal metadata: sponsoredAt: number
- name: voted_on description: Member voted on proposal fromType: member toType: governance_proposal metadata: vote: string votingPower: number votedAt: number voteId: string
- name: council_member description: Member serves on council fromType: member toType: council metadata: role: string electedAt: number termEnds: number seat_number: number
- name: implements_proposal description: Proposal being implemented fromType: member toType: governance_proposal metadata: implementationStarted: number estimatedCompletion: number
# ============================================================================# Event Types - Governance Actions# ============================================================================
eventTypes: - name: proposal_created description: New governance proposal submitted thingType: governance_proposal
- name: proposal_discussion_started description: Community began discussing proposal thingType: governance_proposal
- name: proposal_voting_opened description: Voting period began thingType: governance_proposal
- name: vote_cast description: Member voted on proposal thingType: governance_proposal
- name: proposal_voting_closed description: Voting period ended thingType: governance_proposal
- name: proposal_passed description: Proposal approved by community thingType: governance_proposal
- name: proposal_rejected description: Proposal did not pass thingType: governance_proposal
- name: proposal_implemented description: Approved proposal executed thingType: governance_proposal
- name: council_election_held description: Council members elected thingType: council
- name: council_member_elected description: Member elected to council thingType: council
- name: council_meeting_held description: Council convened thingType: council
- name: council_decision_made description: Council made decision thingType: councilImplementation examples
Section titled “Implementation examples”Now let me show how these platform features work as smart contracts in practice:
Example 1: Mission completion workflow
Section titled “Example 1: Mission completion workflow”// ============================================================================// MISSION COMPLETION AS SMART CONTRACT WORKFLOW// ============================================================================
// Step 1: Create mission and its associated contractasync function createMission({ title, difficulty, estimatedHours, skillProofsAwarded}: MissionDetails) {
// Create the contract first const missionContract = await things.create({ groupId: "futures_edge_org", type: "action_contract", name: `Contract: ${title}`, properties: { contractType: "mission", title, description: `Complete mission: ${title}`,
// Who can accept this contract eligibility: { minTrustScore: 0, requiredRank: ["recruit", "novice", "member"], maxActiveContracts: 3 },
// What work must be done requirements: { action: `Complete ${title} mission`, deliverables: [ "Submission document (1500+ words)", "Practical examples or code samples", "Reflection on learnings" ], constraints: { maxDuration: estimatedHours * 2, // flexible deadline qualityStandards: "professional" } },
// What proof is required requiredProof: { proofTypes: ["submission_document", "peer_review"], minimumReviews: 2, reviewerCriteria: { minTrustScore: 100, // reviewers must be established requiredBadge: skillProofsAwarded[0] // or have completed this mission }, reviewThreshold: 3.5, // avg rating out of 5 autoVerify: false },
// What value is generated valueGenerated: { organizationalValue: { knowledgeAsset: true, // submission becomes knowledge article communityGrowth: 0, skillsDeveloped: 1 }, individualValue: { trustPoints: 50, impactScore: 10, tokens: 100, skillBadges: skillProofsAwarded } },
// How rewards split rewardDistribution: { actor: 0.75, // 75% to person completing mission reviewers: 0.20, // 20% split among peer reviewers platform: 0.05 // 5% to platform },
// When this contract is valid validityPeriod: { startDate: Date.now(), endDate: Date.now() + 90 * 24 * 60 * 60 * 1000, // 90 days maxFulfillments: 1000 // allow 1000 members to complete },
status: "active", createdBy: "system", createdAt: Date.now() } })
// Create the mission entity (references contract) const mission = await things.create({ groupId: "futures_edge_org", type: "mission", name: title, properties: { title, slug: slugify(title), description: `Learn about ${title}`,
missionType: "standard", category: "technical", difficulty, estimatedHours,
skillsLearned: skillProofsAwarded, skillProofsAwarded,
isSolo: true, isCollaborative: false,
contractId: missionContract._id, // Link to contract
deliverables: [ "Comprehensive submission document", "Practical examples", "Reflection essay" ], submissionGuidelines: ` Your submission should demonstrate: 1. Understanding of core concepts 2. Ability to apply knowledge practically 3. Critical thinking and reflection `,
status: "published", publishedAt: Date.now() } })
// Link mission to contract await connections.create({ fromEntityId: mission._id, toEntityId: missionContract._id, relationshipType: "backed_by_contract" })
// Log creation await events.log({ type: "mission_created", actorId: "system", targetId: mission._id, timestamp: Date.now(), metadata: { contractId: missionContract._id, difficulty, estimatedReward: 75 // tokens (actor's 75% share) } })
return { mission, missionContract }}
// Step 2: Member enrolls in mission (accepts contract)async function enrollInMission(memberId: string, missionId: string) {
// Get mission and its contract const mission = await things.get(missionId) const contract = await things.get(mission.properties.contractId)
// Verify eligibility const member = await things.get(memberId)
if (member.properties.trustScore < contract.properties.eligibility.minTrustScore) { throw new Error("Insufficient trust score") }
if (member.properties.activeContracts >= contract.properties.eligibility.maxActiveContracts) { throw new Error("Too many active contracts") }
// Create enrollment record const enrollment = await things.create({ groupId: member.groupId, type: "mission_enrollment", name: `${member.properties.displayName} → ${mission.name}`, properties: { memberId, missionId,
enrolledAt: Date.now(), targetCompletionDate: Date.now() + (mission.properties.estimatedHours * 60 * 60 * 1000),
progressPercentage: 0, phasesCompleted: [],
status: "enrolled" } })
// Accept contract (creates fulfillment record) const fulfillment = await things.create({ groupId: member.groupId, type: "contract_fulfillment", name: `Fulfillment: ${mission.name}`, properties: { contractId: contract._id, actorId: memberId,
acceptedAt: Date.now(), estimatedCompletionDate: Date.now() + (mission.properties.estimatedHours * 60 * 60 * 1000),
verificationStatus: "pending", reviews: [],
valueAwarded: null } })
// Link fulfillment to contract await connections.create({ fromEntityId: fulfillment._id, toEntityId: contract._id, relationshipType: "fulfills" })
// Link member to contract await connections.create({ fromEntityId: memberId, toEntityId: contract._id, relationshipType: "accepted_contract", metadata: { acceptedAt: Date.now(), fulfillmentId: fulfillment._id, priority: "normal" } })
// Link member to mission await connections.create({ fromEntityId: memberId, toEntityId: missionId, relationshipType: "enrolled_in", metadata: { enrolledAt: Date.now(), enrollmentId: enrollment._id, status: "enrolled" } })
// Update member's active contracts await things.update(memberId, { "properties.activeContracts": member.properties.activeContracts + 1 })
// Update contract fulfillment tracking await things.update(contract._id, { "properties.validityPeriod.currentFulfillments": (contract.properties.validityPeriod.currentFulfillments || 0) + 1 })
// Log events await events.log({ type: "contract_accepted", actorId: memberId, targetId: contract._id, timestamp: Date.now(), metadata: { missionId, enrollmentId: enrollment._id, fulfillmentId: fulfillment._id, expectedReward: 75 // tokens } })
await events.log({ type: "mission_enrolled", actorId: memberId, targetId: missionId, timestamp: Date.now(), metadata: { enrollmentId: enrollment._id } })
return { enrollment, fulfillment }}
// Step 3: Member submits mission (provides proof)async function submitMission( memberId: string, missionId: string, submission: { documentUrl: string, documentHash: string, reflection: string }) {
// Get enrollment and fulfillment const enrollment = await db.query("things") .filter(q => q.eq(q.field("type"), "mission_enrollment") && q.eq(q.field("properties.memberId"), memberId) && q.eq(q.field("properties.missionId"), missionId) ) .first()
const fulfillment = await things.get(enrollment.properties.contractFulfillmentId) const mission = await things.get(missionId) const contract = await things.get(mission.properties.contractId)
// Create proof artifact const proof = await things.create({ groupId: enrollment.groupId, type: "proof_artifact", name: `Submission: ${mission.name}`, properties: { fulfillmentId: fulfillment._id, artifactType: "submission_document",
content: submission.documentUrl, // IPFS hash or S3 URL contentHash: submission.documentHash, title: `${mission.name} Submission`, description: submission.reflection,
storageLocation: "ipfs", storageUrl: submission.documentUrl,
metadata: { mimeType: "application/pdf", submittedFor: "mission_completion" },
attestations: [], // Will be populated by reviewers
timestamp: Date.now(), submittedBy: memberId } })
// Link proof to fulfillment await connections.create({ fromEntityId: fulfillment._id, toEntityId: proof._id, relationshipType: "provides_proof", metadata: { proofOrder: 1, required: true } })
// Update fulfillment record await things.update(fulfillment._id, { "properties.submittedAt": Date.now(), "properties.proofSubmitted": [{ proofId: proof._id, proofType: "submission_document", submittedAt: Date.now() }], "properties.verificationStatus": "under_review" })
// Update enrollment await things.update(enrollment._id, { "properties.status": "submitted", "properties.progressPercentage": 100 })
// Log events await events.log({ type: "proof_submitted", actorId: memberId, targetId: fulfillment._id, timestamp: Date.now(), metadata: { proofId: proof._id, missionId, contractId: contract._id, requiresReview: true, minimumReviews: contract.properties.requiredProof.minimumReviews } })
await events.log({ type: "mission_submitted", actorId: memberId, targetId: missionId, timestamp: Date.now(), metadata: { enrollmentId: enrollment._id, fulfillmentId: fulfillment._id } })
// Trigger review requests to eligible peers await requestPeerReviews(fulfillment._id, contract.properties.requiredProof)
return { proof, fulfillment }}
// Step 4: Peer review (verifies proof)async function submitPeerReview( reviewerId: string, fulfillmentId: string, review: { rating: number, // 1-5 feedback: string, strengths: string[], improvements: string[] }) {
const fulfillment = await things.get(fulfillmentId) const contract = await things.get(fulfillment.properties.contractId) const proof = await getProofForFulfillment(fulfillmentId)
// Verify reviewer eligibility const reviewer = await things.get(reviewerId) const criteria = contract.properties.requiredProof.reviewerCriteria
if (reviewer.properties.trustScore < criteria.minTrustScore) { throw new Error("Insufficient trust score to review") }
// Add attestation to proof const attestation = { attesterId: reviewerId, attestationType: "peer_review", result: review.rating >= 3 ? "pass" : "needs_revision", score: review.rating, notes: review.feedback, timestamp: Date.now(), signature: await signAttestation(reviewerId, proof._id, review.rating) }
await things.update(proof._id, { "properties.attestations": [ ...proof.properties.attestations, attestation ] })
// Add review to fulfillment const reviewRecord = { reviewerId, rating: review.rating, feedback: review.feedback, strengths: review.strengths, improvements: review.improvements, reviewedAt: Date.now() }
await things.update(fulfillment._id, { "properties.reviews": [ ...fulfillment.properties.reviews, reviewRecord ] })
// Link reviewer to fulfillment await connections.create({ fromEntityId: fulfillment._id, toEntityId: reviewerId, relationshipType: "reviewed_by", metadata: { rating: review.rating, feedback: review.feedback, reviewedAt: Date.now(), reviewDuration: 30 // minutes } })
// Log review event await events.log({ type: "review_completed", actorId: reviewerId, targetId: fulfillment._id, timestamp: Date.now(), metadata: { rating: review.rating, proofId: proof._id } })
// Check if verification threshold met const allReviews = fulfillment.properties.reviews const avgRating = allReviews.reduce((sum, r) => sum + r.rating, 0) / allReviews.length
const meetsThreshold = allReviews.length >= contract.properties.requiredProof.minimumReviews && avgRating >= contract.properties.requiredProof.reviewThreshold
if (meetsThreshold) { // Automatically approve fulfillment await approveFulfillment(fulfillment._id, avgRating) }
return { attestation, avgRating, reviewsComplete: meetsThreshold }}
// Step 5: Approve and distribute rewardsasync function approveFulfillment(fulfillmentId: string, avgRating: number) {
const fulfillment = await things.get(fulfillmentId) const contract = await things.get(fulfillment.properties.contractId) const actorId = fulfillment.properties.actorId const reviewers = fulfillment.properties.reviews
// Calculate actual rewards (can include quality bonuses) const qualityMultiplier = avgRating >= 4.5 ? 1.2 : 1.0 const baseRewards = contract.properties.valueGenerated.individualValue
const actualRewards = { trustPoints: Math.floor(baseRewards.trustPoints * qualityMultiplier), impactScore: baseRewards.impactScore, tokens: Math.floor(baseRewards.tokens * qualityMultiplier), skillBadges: baseRewards.skillBadges }
// Update fulfillment await things.update(fulfillment._id, { "properties.verificationStatus": "approved", "properties.verifiedAt": Date.now(), "properties.avgRating": avgRating, "properties.valueAwarded": actualRewards, "properties.rewardsDistributed": false })
// Log verification await events.log({ type: "verification_completed", actorId: "system", targetId: fulfillment._id, timestamp: Date.now(), metadata: { avgRating, qualityMultiplier, valueAwarded: actualRewards } })
// Distribute rewards to actor const actorShare = actualRewards.tokens * contract.properties.rewardDistribution.actor
await connections.create({ fromEntityId: fulfillment._id, toEntityId: actorId, relationshipType: "awarded_to", metadata: { trustPoints: actualRewards.trustPoints, impactScore: actualRewards.impactScore, tokens: Math.floor(actorShare), skillBadges: actualRewards.skillBadges, role: "actor", distributedAt: Date.now() } })
// Update actor's totals const actor = await things.get(actorId) await things.update(actorId, { "properties.trustScore": actor.properties.trustScore + actualRewards.trustPoints, "properties.impactScore": actor.properties.impactScore + actualRewards.impactScore, "properties.tokenBalance": actor.properties.tokenBalance + Math.floor(actorShare), "properties.skillBadges": [...new Set([ ...actor.properties.skillBadges, ...actualRewards.skillBadges ])], "properties.completedMissions": actor.properties.completedMissions + 1, "properties.activeContracts": actor.properties.activeContracts - 1, "properties.totalContractsCompleted": actor.properties.totalContractsCompleted + 1 })
await events.log({ type: "reward_distributed", actorId: "system", targetId: actorId, timestamp: Date.now(), metadata: { amount: Math.floor(actorShare), trustPoints: actualRewards.trustPoints, impactScore: actualRewards.impactScore, skillBadges: actualRewards.skillBadges, reason: "mission_completion", fulfillmentId: fulfillment._id } })
// Distribute rewards to reviewers const reviewerShare = actualRewards.tokens * contract.properties.rewardDistribution.reviewers const perReviewer = Math.floor(reviewerShare / reviewers.length)
for (const review of reviewers) { await connections.create({ fromEntityId: fulfillment._id, toEntityId: review.reviewerId, relationshipType: "awarded_to", metadata: { tokens: perReviewer, gratitudePoints: 10, role: "peer_reviewer", distributedAt: Date.now() } })
const reviewer = await things.get(review.reviewerId) await things.update(review.reviewerId, { "properties.tokenBalance": reviewer.properties.tokenBalance + perReviewer, "properties.gratitudePoints": reviewer.properties.gratitudePoints + 10 })
await events.log({ type: "reward_distributed", actorId: "system", targetId: review.reviewerId, timestamp: Date.now(), metadata: { amount: perReviewer, gratitudePoints: 10, reason: "peer_review", fulfillmentId: fulfillment._id } }) }
// Platform fee const platformFee = actualRewards.tokens * contract.properties.rewardDistribution.platform await events.log({ type: "reward_distributed", actorId: "system", targetId: "platform_treasury", timestamp: Date.now(), metadata: { amount: Math.floor(platformFee), reason: "platform_fee", fulfillmentId: fulfillment._id } })
// Mark rewards as distributed await things.update(fulfillment._id, { "properties.rewardsDistributed": true, "properties.distributedAt": Date.now() })
// Log final contract fulfillment await events.log({ type: "contract_fulfilled", actorId: actorId, targetId: contract._id, timestamp: Date.now(), metadata: { fulfillmentId: fulfillment._id, avgRating, reviewCount: reviewers.length, totalValueDistributed: actualRewards.tokens } })
// Update mission tracking const missionId = fulfillment.properties.missionId await events.log({ type: "mission_completed", actorId: actorId, targetId: missionId, timestamp: Date.now(), metadata: { fulfillmentId: fulfillment._id, rating: avgRating } })
return { actualRewards, actorShare, reviewerShare: perReviewer }}Example 2: Governance voting as smart contracts
Section titled “Example 2: Governance voting as smart contracts”// ============================================================================// GOVERNANCE VOTING AS SMART CONTRACT WORKFLOW// ============================================================================
// Step 1: Create proposal and voting contractasync function createGovernanceProposal({ title, description, proposalType, motivation, specification}: ProposalDetails) {
// Create voting contract const votingContract = await things.create({ groupId: "futures_edge_org", type: "action_contract", name: `Vote on: ${title}`, properties: { contractType: "governance_vote", title: `Cast vote on "${title}"`, description: "Participate in democratic decision-making",
// Who can vote eligibility: { minTrustScore: 50, // Must be established member requiredRank: ["member", "senior", "elder"], // Not recruits maxActiveContracts: 999 // No limit on voting },
// What "work" is required (reading and voting) requirements: { action: "Read proposal and cast informed vote", deliverables: ["Vote (for/against/abstain)", "Optional: Reasoning"], constraints: { mustReadProposal: true, oneVoteOnly: true } },
// Proof is automatic (vote record) requiredProof: { proofTypes: ["vote_record"], autoVerify: true },
// Value of participating in governance valueGenerated: { organizationalValue: { democraticParticipation: 1, governanceEngagement: 1 }, individualValue: { gratitudePoints: 5, // Base participation reward trustPoints: 2, // Small trust boost for civic duty leadershipScore: 1 } },
// All rewards go to voters rewardDistribution: { actor: 1.0 // 100% to voter },
// Voting window validityPeriod: { startDate: Date.now() + 24 * 60 * 60 * 1000, // Starts in 24h (discussion period) endDate: Date.now() + 8 * 24 * 60 * 60 * 1000, // Ends in 8 days (7-day voting) maxFulfillments: 10000 // All eligible members can vote },
status: "active", createdBy: "proposer_id" } })
// Create governance proposal const proposal = await things.create({ groupId: "futures_edge_org", type: "governance_proposal", name: title, properties: { title, description, proposalType,
motivation, specification, implementation: "", // To be filled in if passed
proposerId: "proposer_id", coSponsors: [],
votingPeriod: { startDate: votingContract.properties.validityPeriod.startDate, endDate: votingContract.properties.validityPeriod.endDate },
quorumRequired: 0.20, // 20% of eligible voters must participate approvalThreshold: 0.51, // 51% approval needed
voterEligibility: votingContract.properties.eligibility,
votes: { for: 0, against: 0, abstain: 0 }, totalVotes: 0, quorumMet: false, passed: null,
votingContractId: votingContract._id,
implementationStatus: "pending",
status: "open_for_discussion", createdAt: Date.now() } })
// Link proposal to contract await connections.create({ fromEntityId: proposal._id, toEntityId: votingContract._id, relationshipType: "backed_by_contract" })
// Log creation await events.log({ type: "proposal_created", actorId: "proposer_id", targetId: proposal._id, timestamp: Date.now(), metadata: { proposalType, votingContractId: votingContract._id, discussionPeriodDays: 1, votingPeriodDays: 7 } })
return { proposal, votingContract }}
// Step 2: Member votes on proposal (fulfills voting contract)async function castVote( memberId: string, proposalId: string, voteChoice: "for" | "against" | "abstain", reason?: string) {
const proposal = await things.get(proposalId) const votingContract = await things.get(proposal.properties.votingContractId) const member = await things.get(memberId)
// Check if voting is open if (Date.now() < votingContract.properties.validityPeriod.startDate) { throw new Error("Voting has not started yet") } if (Date.now() > votingContract.properties.validityPeriod.endDate) { throw new Error("Voting period has ended") }
// Check eligibility if (member.properties.trustScore < votingContract.properties.eligibility.minTrustScore) { throw new Error("Insufficient trust score to vote") }
// Check if already voted const existingVote = await db.query("things") .filter(q => q.eq(q.field("type"), "vote") && q.eq(q.field("properties.proposalId"), proposalId) && q.eq(q.field("properties.voterId"), memberId) ) .first()
if (existingVote) { throw new Error("Already voted on this proposal") }
// Calculate voting power (could be based on trust score) const votingPower = calculateVotingPower(member)
// Create vote record (serves as proof) const vote = await things.create({ groupId: member.groupId, type: "vote", name: `Vote: ${member.properties.displayName} on ${proposal.name}`, properties: { proposalId, voterId: memberId,
vote: voteChoice, reason: reason || "", votingPower,
timestamp: Date.now() } })
// Create contract fulfillment const fulfillment = await things.create({ groupId: member.groupId, type: "contract_fulfillment", name: `Voted on: ${proposal.name}`, properties: { contractId: votingContract._id, actorId: memberId,
acceptedAt: Date.now(), submittedAt: Date.now(), // Instant
proofSubmitted: [{ proofId: vote._id, proofType: "vote_record", submittedAt: Date.now() }],
verificationStatus: "approved", // Auto-approved verifiedAt: Date.now(),
valueAwarded: votingContract.properties.valueGenerated.individualValue, rewardsDistributed: false } })
// Link fulfillment to contract await connections.create({ fromEntityId: fulfillment._id, toEntityId: votingContract._id, relationshipType: "fulfills" })
// Link vote to proposal await connections.create({ fromEntityId: memberId, toEntityId: proposalId, relationshipType: "voted_on", metadata: { vote: voteChoice, votingPower, votedAt: Date.now(), voteId: vote._id } })
// Update proposal vote counts await things.update(proposalId, { [`properties.votes.${voteChoice}`]: proposal.properties.votes[voteChoice] + votingPower, "properties.totalVotes": proposal.properties.totalVotes + votingPower })
// Distribute rewards immediately await connections.create({ fromEntityId: fulfillment._id, toEntityId: memberId, relationshipType: "awarded_to", metadata: { gratitudePoints: 5, trustPoints: 2, leadershipScore: 1, role: "voter", distributedAt: Date.now() } })
await things.update(memberId, { "properties.gratitudePoints": member.properties.gratitudePoints + 5, "properties.trustScore": member.properties.trustScore + 2, "properties.leadershipScore": member.properties.leadershipScore + 1 })
await things.update(fulfillment._id, { "properties.rewardsDistributed": true, "properties.distributedAt": Date.now() })
// Log events await events.log({ type: "vote_cast", actorId: memberId, targetId: proposalId, timestamp: Date.now(), metadata: { vote: voteChoice, votingPower, voteId: vote._id, fulfillmentId: fulfillment._id } })
await events.log({ type: "reward_distributed", actorId: "system", targetId: memberId, timestamp: Date.now(), metadata: { gratitudePoints: 5, trustPoints: 2, leadershipScore: 1, reason: "governance_participation", proposalId } })
// Check if quorum reached and voting period ended await checkProposalOutcome(proposalId)
return { vote, fulfillment, votingPower }}
// Step 3: Finalize proposal when voting endsasync function checkProposalOutcome(proposalId: string) {
const proposal = await things.get(proposalId) const votingContract = await things.get(proposal.properties.votingContractId)
// Check if voting period ended if (Date.now() < votingContract.properties.validityPeriod.endDate) { return { status: "voting_ongoing" } }
// Calculate outcome const totalEligibleVoters = await countEligibleVoters(votingContract.properties.eligibility) const turnoutPercentage = proposal.properties.totalVotes / totalEligibleVoters const quorumMet = turnoutPercentage >= proposal.properties.quorumRequired
const approvalPercentage = proposal.properties.votes.for / (proposal.properties.votes.for + proposal.properties.votes.against)
const passed = quorumMet && (approvalPercentage >= proposal.properties.approvalThreshold)
// Update proposal await things.update(proposalId, { "properties.quorumMet": quorumMet, "properties.passed": passed, "properties.status": passed ? "passed" : "rejected" })
// Log outcome await events.log({ type: passed ? "proposal_passed" : "proposal_rejected", actorId: "system", targetId: proposalId, timestamp: Date.now(), metadata: { turnoutPercentage, approvalPercentage, quorumMet, totalVotes: proposal.properties.totalVotes, votesFor: proposal.properties.votes.for, votesAgainst: proposal.properties.votes.against, votesAbstain: proposal.properties.votes.abstain } })
// Close voting contract await things.update(votingContract._id, { "properties.status": "fulfilled" })
return { passed, quorumMet, turnoutPercentage, approvalPercentage }}Example 3: Knowledge contribution as smart contracts
Section titled “Example 3: Knowledge contribution as smart contracts”// ============================================================================// KNOWLEDGE CONTRIBUTION AS SMART CONTRACT WORKFLOW// ============================================================================
// Step 1: Create knowledge contribution contractasync function requestKnowledgeArticle(topic: string, details: any) {
// Create contract const knowledgeContract = await things.create({ groupId: "futures_edge_org", type: "action_contract", name: `Write Article: ${topic}`, properties: { contractType: "knowledge_contribution", title: `Create knowledge article on ${topic}`, description: `Contribute educational content to KnowledgeBank`,
eligibility: { minTrustScore: 100, // Must be established requiredRank: ["member", "senior", "elder"], maxActiveContracts: 5 },
requirements: { action: `Research and write comprehensive article`, deliverables: [ "Well-researched article (1500+ words)", "Citations and references", "Practical examples", "Diagrams or visuals (optional)" ], constraints: { minimumWords: 1500, requiresCitations: true, requiresExamples: true } },
requiredProof: { proofTypes: ["knowledge_article", "peer_review"], minimumReviews: 2, reviewThreshold: 4.0, // High quality bar autoVerify: false },
valueGenerated: { organizationalValue: { knowledgeAsset: true, communityGrowth: 0, educationalValue: 1 }, individualValue: { trustPoints: 75, // Higher than missions impactScore: 20, tokens: 150, skillBadges: ["knowledge_contributor"] } },
rewardDistribution: { actor: 0.85, // 85% to author reviewers: 0.10, platform: 0.05 },
validityPeriod: { startDate: Date.now(), endDate: Date.now() + 60 * 24 * 60 * 60 * 1000, // 60 days maxFulfillments: 1 // Only one article needed on this topic },
status: "active" } })
// Log contract creation await events.log({ type: "contract_created", actorId: "system", targetId: knowledgeContract._id, timestamp: Date.now(), metadata: { contractType: "knowledge_contribution", topic, expectedReward: 127.5 // tokens (85% of 150) } })
return knowledgeContract}
// Step 2: Member writes and submits articleasync function submitKnowledgeArticle( memberId: string, contractId: string, article: { title: string, content: string, // Markdown summary: string, topics: string[], references: string[] }) {
const contract = await things.get(contractId) const member = await things.get(memberId)
// Verify eligibility if (member.properties.trustScore < contract.properties.eligibility.minTrustScore) { throw new Error("Insufficient trust score") }
// Create knowledge article (serves as proof) const knowledgeArticle = await things.create({ groupId: member.groupId, type: "knowledge_article", name: article.title, properties: { title: article.title, slug: slugify(article.title), content: article.content, summary: article.summary,
category: "guide", topics: article.topics, difficulty: "intermediate",
sections: extractSections(article.content), estimatedReadTime: calculateReadTime(article.content),
authorId: memberId, contributors: [],
version: "1.0.0", previousVersionId: null,
viewCount: 0, helpfulCount: 0, references: article.references,
status: "under_review", publishedAt: null, lastUpdatedAt: Date.now() } })
// Create contract fulfillment const fulfillment = await things.create({ groupId: member.groupId, type: "contract_fulfillment", name: `Knowledge Contribution: ${article.title}`, properties: { contractId: contract._id, actorId: memberId,
acceptedAt: Date.now(), submittedAt: Date.now(),
proofSubmitted: [{ proofId: knowledgeArticle._id, proofType: "knowledge_article", submittedAt: Date.now() }],
verificationStatus: "under_review", reviews: [],
valueAwarded: null } })
// Link article to member (authorship) await connections.create({ fromEntityId: memberId, toEntityId: knowledgeArticle._id, relationshipType: "authored", metadata: { role: "primary_author", contributedAt: Date.now() } })
// Link fulfillment to contract await connections.create({ fromEntityId: fulfillment._id, toEntityId: contract._id, relationshipType: "fulfills" })
// Link fulfillment to article (proof) await connections.create({ fromEntityId: fulfillment._id, toEntityId: knowledgeArticle._id, relationshipType: "provides_proof" })
// Log events await events.log({ type: "article_created", actorId: memberId, targetId: knowledgeArticle._id, timestamp: Date.now(), metadata: { wordCount: article.content.split(/\s+/).length, topics: article.topics } })
await events.log({ type: "proof_submitted", actorId: memberId, targetId: fulfillment._id, timestamp: Date.now(), metadata: { contractId: contract._id, proofType: "knowledge_article", articleId: knowledgeArticle._id } })
// Request expert reviews await requestExpertReviews(fulfillment._id, article.topics)
return { knowledgeArticle, fulfillment }}
// Step 3: Article approved and published (rewards distributed)async function approveKnowledgeArticle( fulfillmentId: string, avgRating: number) {
const fulfillment = await things.get(fulfillmentId) const contract = await things.get(fulfillment.properties.contractId) const article = await getArticleForFulfillment(fulfillmentId) const authorId = fulfillment.properties.actorId
// Calculate rewards (with quality bonus for excellent articles) const qualityMultiplier = avgRating >= 4.5 ? 1.3 : 1.0 const baseRewards = contract.properties.valueGenerated.individualValue
const actualRewards = { trustPoints: Math.floor(baseRewards.trustPoints * qualityMultiplier), impactScore: Math.floor(baseRewards.impactScore * qualityMultiplier), tokens: Math.floor(baseRewards.tokens * qualityMultiplier), skillBadges: baseRewards.skillBadges }
// Update fulfillment await things.update(fulfillment._id, { "properties.verificationStatus": "approved", "properties.verifiedAt": Date.now(), "properties.avgRating": avgRating, "properties.valueAwarded": actualRewards })
// Publish article await things.update(article._id, { "properties.status": "published", "properties.publishedAt": Date.now() })
// Distribute rewards to author const authorShare = actualRewards.tokens * contract.properties.rewardDistribution.actor
await connections.create({ fromEntityId: fulfillment._id, toEntityId: authorId, relationshipType: "awarded_to", metadata: { trustPoints: actualRewards.trustPoints, impactScore: actualRewards.impactScore, tokens: Math.floor(authorShare), skillBadges: actualRewards.skillBadges, role: "author", distributedAt: Date.now() } })
// Update author const author = await things.get(authorId) await things.update(authorId, { "properties.trustScore": author.properties.trustScore + actualRewards.trustPoints, "properties.impactScore": author.properties.impactScore + actualRewards.impactScore, "properties.tokenBalance": author.properties.tokenBalance + Math.floor(authorShare), "properties.skillBadges": [...new Set([ ...author.properties.skillBadges, ...actualRewards.skillBadges ])] })
// Log events await events.log({ type: "article_published", actorId: authorId, targetId: article._id, timestamp: Date.now(), metadata: { avgRating, fulfillmentId: fulfillment._id } })
await events.log({ type: "contract_fulfilled", actorId: authorId, targetId: contract._id, timestamp: Date.now(), metadata: { fulfillmentId: fulfillment._id, articleId: article._id, qualityRating: avgRating, valueDistributed: actualRewards } })
await events.log({ type: "reward_distributed", actorId: "system", targetId: authorId, timestamp: Date.now(), metadata: { amount: Math.floor(authorShare), trustPoints: actualRewards.trustPoints, impactScore: actualRewards.impactScore, reason: "knowledge_contribution", articleId: article._id } })
// Ongoing rewards: Every time someone finds article helpful // Create passive income contract for author await createArticleEngagementContract(article._id, authorId)
return { actualRewards, authorShare }}Summary
Section titled “Summary”This ontology specification creates a complete smart contract-driven architecture for Future’s Edge where:
- Every action has value - Contracts explicitly define organizational and individual value generated
- No action without a contract - Members browse available contracts, accept them, fulfill requirements, submit proof
- Immutable audit trail - Events table logs every step of every contract lifecycle
- Provable completion - Proof artifacts with attestations create verifiable evidence
- Automated reward distribution - Connections track value awarded, updating member scores/balances
- Transparent and fair - All contract terms, reviews, and rewards visible to community
- Composable and extensible - New platform features simply add new contract types
The system naturally incentivizes:
- Mission completion (learning and growth)
- Knowledge sharing (building organizational assets)
- Peer review (quality assurance)
- Governance participation (democratic engagement)
- Mentoring (community support)
- Connection-making (network effects)
Every interaction creates value, proves completion, and rewards participants fairly. Would you like me to create additional contract types for attendance tracking, mentoring, or other platform features?