Skip to main content

Governance

Savitri Network features on-chain governance enabling token holders to propose, vote on, and execute network changes.

Overview

The governance system supports:

  • Proposal creation with title, description, and voting period
  • Token-weighted voting (support/oppose)
  • Automatic execution of approved proposals
  • Federated Learning (FL) proposals for AI model governance
  • Vote token rewards based on PoU tier

Proposal Lifecycle

1. Create Proposal

2. Voting Period (configurable, e.g., 7 days)

3. Tally Votes

├── Approved (majority support) → 4. Execute
└── Rejected → Archived

Creating a Proposal

Via SDK

use savitri_sdk::{ContractClient, Wallet};

let contract = ContractClient::from_url_and_wallet(url, wallet)?;
let gov = contract.governance();

let tx = gov.create_proposal(
&governance_address,
"Increase block size",
"Proposal to increase max block transactions from 32 to 64",
604800, // 7-day voting period (seconds)
).await?;

Via TransactionBuilder

use savitri_sdk::{TransactionBuilder, GovernanceAction};

let tx = TransactionBuilder::new()
.create_fl_proposal(
"governance_contract_address",
"Deploy model v2",
"Replace current FL model with GPT-4 fine-tuned variant",
604800,
)
.nonce(nonce)
.fee(5_000_000_000_000_000)
.build_and_sign(&wallet)?;

Voting

// Vote in favor
let tx = gov.vote(&governance_address, proposal_id, true).await?;

// Vote against
let tx = gov.vote(&governance_address, proposal_id, false).await?;

// Via TransactionBuilder
let tx = TransactionBuilder::new()
.governance_call(
"governance_address",
proposal_id,
GovernanceAction::Vote(true),
)
.nonce(nonce)
.build_and_sign(&wallet)?;

Executing Proposals

Approved proposals can be executed by any participant:

let tx = gov.execute(&governance_address, proposal_id).await?;

Checking Status

let status = gov.get_proposal_status(&governance_address, proposal_id).await?;

println!("Title: {}", status.title);
println!("Status: {}", status.status); // "active", "passed", "rejected", "executed"
println!("Votes: {} for / {} against", status.votes_for, status.votes_against);
println!("Executed: {}", status.executed);

Vote Tokens

Validators earn vote tokens based on their PoU tier:

TierPoU ScoreVote Tokens per Epoch
Bronze300-49910
Silver500-69925
Gold700-89950
Platinum900-1000100

Vote tokens determine voting weight in governance proposals.

Governance Contracts

The governance system consists of several on-chain modules:

ModuleFilePurpose
Proposalsgovernance/proposals.rsProposal creation and management
Votinggovernance/voting.rsVote casting and tallying
Executiongovernance/execution.rsApproved proposal execution
Depositgovernance/deposit.rsProposal deposits (anti-spam)
Vote Tokengovernance/vote_token.rsVote token issuance and tracking
FL Proposalsgovernance/fl_proposals.rsFederated Learning-specific proposals

FL Governance

Federated Learning proposals are specialized governance actions for managing distributed AI training:

  • Model registry: Propose new models for training
  • Job lifecycle: Create, manage, and finalize FL jobs
  • Model updates: Vote on model version upgrades
  • Resource allocation: Allocate compute resources via governance