Sputnik DAO smart contracts analysis: Decentralization governance of the NEAR ecosystem from the proposal mechanism

robot
Abstract generation in progress

Rust smart contracts Development Diary: In-depth Analysis of Sputnik DAO Proposal Mechanism

Sputnik DAO, as the infrastructure of the NEAR ecosystem, is promoting NEAR projects towards decentralized autonomy. This article will delve into the core concepts of the Sputnik DAO smart contracts - the proposal mechanism (Proposal).

1. Proposal Initiation

Each member in the Sputnik DAO can initiate proposals to express opinions on project governance. From the contract perspective, members can call the add_proposal() method of the sputnikdaov2 contract to initiate a new proposal:

rust u64

The proposer needs to provide detailed information about the proposal, including:

  • Proposal Description
  • Proposal types ( such as FunctionCall, Transfer, etc. )

The contract will further process this information, generating a complete Proposal object and assigning a unique proposal_id.

It is worth noting that initiating a proposal requires staking a certain amount of NEAR tokens as collateral. This collateral will be refunded to the proposer after the proposal concludes normally.

2. Proposal Status

Proposals in the Sputnik DAO may go through various states:

  • InProgress: Initial state, voting in progress
  • Approved: Vote Passed
  • Rejected: Vote did not pass
  • Removed:被移除

The change in the proposal status is driven by the act_proposal() method. DAO members can call this method to vote on the proposal:

  • VoteApprove:Approve
  • VoteReject: Oppose
  • VoteRemove: Remove

After the voting ends, update the proposal status based on the voting results.

3. Proposal Execution

When the proposal status changes to Approved, the contract will call the internal_execute_proposal() function to execute the proposal content.

Sputnik DAO supports various types of proposals, this article focuses on two typical proposals:

( 3.1 Contract Function Execution Proposal

For proposals of the FunctionCall type, the contract will execute the function calls specified in the proposal. The proposal can contain multiple ActionCall objects, each specifying the contract method and parameters to be called.

![])https://img-cdn.gateio.im/webp-social/moments-eb73d5e15f6161f0a4b442cd4b99a91e.webp###

( 3.2 Fund Transfer Proposal for Smart Contracts

Transfer proposals are used to transfer tokens from the contract account to a specified account. The contract will perform the corresponding transfer operation based on the token type and the type of receiving account.

![])https://img-cdn.gateio.im/webp-social/moments-4aed25bcefecb3d554dbe01447d4a0e8.webp###

4. Summary

This article introduces the core concepts of the proposal mechanism in the Sputnik DAO smart contracts, including the creation, status changes, and execution process of proposals. This mechanism provides a flexible and efficient decentralized governance solution for the NEAR project.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 7
  • Share
Comment
0/400
SelfSovereignStevevip
· 10h ago
This proposal sounds more complex than ETH.
View OriginalReply0
TxFailedvip
· 10h ago
actually another dao that'll fail from voter apathy...been there done that
Reply0
AllInAlicevip
· 10h ago
Governance also emphasizes mechanism design.
View OriginalReply0
mev_me_maybevip
· 10h ago
Having money is the hard truth.
View OriginalReply0
GasFeeCryingvip
· 10h ago
Is the near mechanism adjusted again? It's time to pay the gas fees.
View OriginalReply0
ChainPoetvip
· 10h ago
Is voting really useful?
View OriginalReply0
SmartContractWorkervip
· 11h ago
near good material
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)