Sui.

Post

Share your knowledge.

BigSneh.
Jul 24, 2025
Discussion

The Anatomy of a Secure DAO on Sui: Voting, Roles, and Objects

Designing governance using Move objects instead of storage mappings—how to manage proposals, votes, and execution powers in a gas-efficient and secure way. Sample code included for role-based access and vote tallying.

  • Sui
  • Move
4
6
Share
Comments
.

Answers

6
290697tz.
Jul 24 2025, 15:20

Core components:

Governance Object: Shared object that tracks proposals and manages role access.

Proposal Object: Each proposal is a distinct object with vote counters.

Capabilities: Role-based access is granted using capability objects like ProposerCap.

Highlights:

Uses capabilities instead of address checks for role control.

Enforces strict proposal ownership and lifecycle.

Stores proposals in a vector within the governance object.

Includes sample Move code for proposal submission, voting, and finalization.

Emphasizes gas-efficiency by limiting state size and batching actions.

Security Tips:

Avoid global address lists—stick to capabilities.

Cap vector growth to prevent gas bloat.

Keep vote casting and finalization logic separate and auditable.

Forum Questions:

How are others handling delegate voting or quorum checks?

Any ideas for upgradeable governance logic on Sui?

Should vote metadata be stored off-chain and verified via proofs?

Let me know if you'd like a CLI test suite or a factory contract pattern to spin up DAOs dynamically.

3
Best Answer
Comments
.
harry phan.
Jul 26 2025, 11:18

This DAO design on Sui uses objects—not mappings—for clean, gas-efficient governance. Proposals are standalone objects tracked inside a shared Governance object. Role access is enforced through capability objects like ProposerCap, avoiding global address checks. Includes sample Move code for submitting, voting, and finalizing proposals.

11
Comments
.
HaGiang.
Jul 26 2025, 11:22

It replaces address checks with capability-based role control, ensures each proposal has a clear owner and lifecycle, and stores proposals in a vector inside the governance object. Sample Move code covers submitting, voting, and finalizing proposals. The whole design is optimized for gas-efficiency by minimizing state size and batching logic where possible.

9
Comments
.
Meaning.Sui.
Jul 26 2025, 11:20

It focuses on strict ownership, minimal state growth, and clear separation between vote casting and execution. Security tips: avoid address lists, cap vector size, and keep logic modular.

Curious about delegate voting, upgradeable logic, or off-chain vote metadata?

8
Comments
.
MoonBags.
Jul 26 2025, 11:21

It’s all about strict proposal ownership, lean state management, and keeping vote casting separate from execution logic for better auditability. For security, ditch global address lists, limit vector growth, and keep things modular.

8
Comments
.
0xduckmove.
Jul 26 2025, 11:17

A deep dive into building secure, gas-efficient DAOs on Sui using objects instead of storage mappings—covering proposal flow, role management, and vote execution. Includes sample code for roles and tallying.

4
Comments
.

Do you know the answer?

Please log in and share it.