Hysen Labs
Open-source project
Virtual-Protocol/protocol-contracts avatar
Virtual-Protocol

protocol-contracts

This repository contains the Virtual governance ecosystem for Virtual DAO and Virtual-specific DAO Governance part. It also covers how Contribution is being recorded and rewarded.

100 stars62 forksSolidityLicense varies
01
DEEP OPEN-SOURCE ANALYSIS

protocol-contracts: Virtual's governance layer

The smart contracts behind Virtual DAO and Virtual-specific DAO governance, showing how contribution gets recorded and rewarded. A contract table maps each contract to its purpose, access control, and upgradability.

02
DEEP OPEN-SOURCE ANALYSIS

The contract map

This repository contains the Virtual governance contracts for Virtual DAO and Virtual-specific DAO governance, and covers how contribution is recorded and rewarded. A contract table lists each contract with its purpose, access control, and upgradability. One entry stands out: veVirtualToken, described as a non-transferrable voting token used to vote on the Virtual Protocol DAO and the Virtual Genesis DAO.

03
DEEP OPEN-SOURCE ANALYSIS

Genesis and contributions

The Virtual Genesis flow is documented step by step. A new application is submitted at the AgentFactory, which transfers VIRTUAL to the factory. Then a proposal is made at the VirtualGenesisDAO with an action of executing the application. Voting starts at the DAO, and the proposal is executed at the DAO afterward. Contributions follow a similar path: submit a proposal at the AgentDAO with an action of minting a ContributionNft, and the mint authenticates by checking whether the sender is the proposal's proposer. That ties the contribution record to the governance proposal that created it.

04
DEEP OPEN-SOURCE ANALYSIS

Core upgrades and daily rewards

Upgrading core services starts with a validator vote for a contribution proposal at the AgentDAO. Executing the proposal mints a ServiceNft and triggers actions including updating the maturity score and the VIRTUAL core service ID. Rewards are distributed daily when the protocol backend concludes daily profits into a single amount and calls a distribute function on AgentReward.

05
DEEP OPEN-SOURCE ANALYSIS

Staking and claiming

Claiming rewards is split in two. The protocol calls a withdraw function, while stakers, validators, and dataset and model contributors call a claim function. Staking VIRTUAL means calling a stake function on AgentToken and passing in the validator to delegate voting power to. The stake takes in sVIRTUAL and mints a PERSONA token, and a withdraw function burns the PERSONA token.

06
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The flows are layered. A proposal starts a contribution, minting ties it to the proposer, core upgrades go through validator votes, and rewards land daily from the protocol backend.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes