AIP-276: Implementing oSnap for Optimistic Governance in ApeCoin DAO

Proposal Name: Implementing oSnap for Optimistic Governance in ApeCoin DAO

Proposal Category: Process

Abstract: This proposal aims to integrate oSnap, an optimistic governance tool developed by UMA, into ApeCoin DAO’s governance system. By leveraging oSnap, ApeCoin DAO can execute the results of Snapshot votes on-chain, eliminating reliance on multi-signature wallets and promoting a more decentralized and efficient execution process.

Author Description: I am a smart contract engineer at UMA and the creator of oSnap. At UMA, I’ve also worked on insurance, prediction market, and KPI option integrations. Prior to UMA, I wrote smart contracts at Ernst & Young for several years, and prior to that I’ve been involved in off-chain consensus driven organizations. I am deeply committed to decentralization and empowering regular people and build tools to advance those goals.

Team Description: The proposal is backed by Risk Labs, the dynamic and experienced team behind the development of the UMA and Across protocols. We are doxxed, well funded, and have a high bar for all of our code. Our oracle smart contracts have been audited by Open Zeppelin and secure over $100 million in value.

Motivation: The motivation for this proposal is to enhance ApeCoin DAO’s governance system by making it more efficient, secure, and decentralized. Current DAO governance models often rely on multi-signature wallets for the execution of proposals, which can lead to delays and potential security vulnerabilities. Implementing oSnap, which allows for on-chain execution of off-chain votes, would eliminate the dependency on multi-sig wallets and the associated issues. Furthermore, oSnap’s dispute mechanism and incentives for correct submissions help maintain the integrity and accuracy of the decision-making process. By adopting oSnap, ApeCoin DAO can streamline its governance process and empower its token holders, thereby upholding the true spirit of decentralization.

I’ve discussed oSnap before with @Amplify, who thought it would be a good fit since it enables gasless voting and broader DAO participation without relying on a multi-sig to execute. As ApeCoin DAO charts the course for its future governance, and all eyes are on elections and the governance process, I thought this was a good time to bring oSnap to the broader community for feedback.

Rationale: The integration of oSnap into ApeCoin DAO’s governance aligns with the DAO’s mission of decentralization and community involvement. Implementing oSnap will not only streamline the governance process but also eliminate the need for reliance on multi-signature wallets, thereby promoting more direct community control. This approach aligns with the DAO’s guiding value of decentralization by reducing the need for intermediaries and giving more power to the token holders. Moreover, oSnap’s dispute mechanism provides an extra layer of security, ensuring that the outcomes of governance votes accurately reflect what was approved on Snapshot and that the transaction payload matches what was described in plain English. Finally, the integration of oSnap is free and easy, making it a practical choice for enhancing ApeCoin DAO’s governance.

Since its launch earlier this year, oSnap has been adopted by Across, BarnBridge, and ShapeShift to control their on-chain treasuries, securing over $40 million in value. oSnap is also being used by Lossless Protocol to secure their next generation of wrapped tokens. There are a few other deployments that haven’t been announced yet.

Key Terms:

  1. oSnap: A tool developed by UMA that allows for on-chain execution of off-chain votes, streamlining the governance process of DAOs.
  2. Optimistic Governance: A governance method where anyone can submit transactions to implement a proposal. If no dispute about the proposal’s accuracy arises during a dispute window, the transactions will go through.
  3. On-chain Execution: The process of implementing the results of governance votes directly on the blockchain, enhancing transparency and efficiency.
  4. Off-chain Votes: Votes on Snapshot that occur outside the blockchain but whose results can be implemented on-chain.
  5. Multi-signature Wallets: Digital wallets that require multiple signatures to execute a transaction, often used in DAOs for executing proposals, raising centralization risks.
  6. Dispute Mechanism: A system within UMA that allows for disputes over the accuracy of a proposal. In the event of a dispute, the transactions are not executed and need to be re-proposed. UMA’s voting system identifies the correct party in the dispute (the proposer or the disputer) and rewards them with the losing party’s bond.
  7. Optimistic Oracle: A decentralized on-chain oracle for resolving flexible data requests. UMA’s optimistic oracle can handle natural language questions, like whether a set of transactions were approved on Snapshot and match what was described in the Snapshot vote.

Specifications:
UMA’s oSnap is a tool for making on-chain transactions based on off-chain voting decisions. After integration of oSnap, the flow works like this:

  • A Snapshot proposal can include a transaction payload that is executable if the proposal is approved by the DAO.
  • After a vote completes, any address can post a bond and propose to execute the transactions on-chain by clicking a button on Snapshot.
  • If no dispute arises about the proposal’s accuracy during the dispute window, the transactions are executed.
  • In case of a dispute, the proposal is not executed and needs to be re-submitted. UMA token holders will determine who was correct in the dispute, with the correct party rewarded from the opposing party’s bond.

Steps to Implement:

  1. Deploy a Safe to hold ApeCoin DAO assets.
  2. Install the Zodiac app.
  3. Deploy an oSnap module through the Zodiac app.
  4. Add oSnap to the ApeCoin Snapshot space through the SafeSnap plug-in.

Timeline: This process can be implemented in a single afternoon, given the straightforward nature of the setup process.

Overall Cost: There are no fees associated with the implementation of oSnap, and it does not require any additional manpower beyond the existing governance working group. There are also no fees to use UMA’s oracle to verify oSnap requests. Therefore, the overall cost of implementation is zero.

2 Likes

The proposed steps to implement oSnap, including deploying a Safe, installing the Zodiac app, deploying an oSnap module, and adding oSnap to the ApeCoin Snapshot space, seem straightforward once I understand the context you provided. Thank you, and as you mentioned, extremely feasible.

While reading through, I had some thoughts about the dispute mechanism offered by oSnap. The dispute resolution process, involving UMA token holders determining the correct party and rewarding them from the opposing party’s bond, may introduce subjective judgments and disputes that could create delays or contentious situations within the governance process.

3 Likes

Hi @jensensharp.eth, thanks for the great comments. I should clarify a couple of aspects of oSnap designed to address what you pointed out.

First, the DAO doesn’t have to wait for the dispute to be resolved by UMA’s voting system in the case of an invalid dispute, which may have been made by accident or to attempt to slow down execution. The proposal can be made again immediately after the dispute, while the bonds are settled in the background by UMA’s voting system, which takes 48 to 92 hours. We designed it this way to avoid slowing down execution unnecessarily.

Second, there should not be much subjectivity involved in dispute resolution, since the exact transaction payload to be executed is attached to the Snapshot vote. The main thing UMA has to verify is that the transaction proposed on-chain matches what was proposed on Snapshot, and that the vote approved the transactions with the minimum voting period and quorum.

There could be some subjectivity if the transactions don’t match the text description, but that’s a bonus feature: Disputers who identify a malicious payload, or one that contains a bug, or targets a contract or address that is compromised after the Snapshot vote is complete, can block execution even if the transactions were technically approved on Snapshot. That means that the burden of review doesn’t fall 100% on the proposer, or on a group of multi-sig signers. It would be better if we could identify faulty payloads before the Snapshot vote is complete, and we’re working on some tooling that will try to do this automatically and warn voters in the Snapshot interface itself. We expect those semi-subjective dispute to be rare, however, especially once we add new features to the Snapshot interface for simulating and otherwise checking transactions.

In the “griefing” case where a malicious disputer blocks clearly valid proposals to slow them down, they can only continue for as long as they are willing to waste their money, since the DVM can easily verify that the proposal is correct and every disputed proposal can be immediately re-proposed.

To deal with griefing, we recommend a fallback governance mechanism whose existence should serve to prevent griefing in the first place, since the griefer can not expect to delay governance for very long.

So far, DAOs have opted for a high-threshold multi-sig that is not expected to be used but could be activated in emergencies to increase the bond amounts to make griefing more expensive.

A purer option, from a decentralization standpoint, would be to have a Governor module attached to the Safe that allows for on-chain $APE voting as a fallback mechanism. Since on-chain voting is very expensive, it seriously reduces participation and tends to lead to more centralization through delegation schemes. But that is not a big problem if it’s only expected to be used in rare cases to halt griefing of optimistic governance.

4 Likes

Hello @jdshutt welcome!

Glad to see you here, and I’m excited to discuss this proposal with the community. I’ve been excited about oSnap since it was announced in February as a potential means to streamline our governance process.

There is a Treasury Working Group in review with a mandate of deploying an on-chain Treasury for the ApeCoin DAO, so I think it’s worth noting that we can do a soft-run / pilot implementation of this before deciding if we want to fully integrate it into our governance process.

Maybe deploy a Safe and allocate a 1 year budget from the Ecosystem Fund specifically for this initiative? :slight_smile:

Anyway, I think it’s really cool how we can opt in for middle-ground governance whereby we have off-chain governance, with on-chain execution. I think this is critical for a DAO like ours where proposals are more so “suggestions” or instructions for a team to perform some task, vs. a txn payload to execute a function on a smart contract like adding support for collateral or adjusting a parameter of some protocol.

In the future, this can serve as a meaningful stepping stone towards a full on-chain deployment of our DAO, subDAOs, or other initiatives like the Ape Assembly. :fire:

Thank you for the proposal! :pray:

7 Likes

Thanks for the welcome and feedback @Amplify! A pilot implementation to allow ApeCoin DAO members to try oSnap out is a good idea. Our early users like Across and BarnBridge appreciate how it has streamlined their workflow for paying regular and one-off expenses, since they don’t have to chase down multi-sig signers for transactions that were already approved by a DAO vote.

2 Likes

I can see potential attack vector.
Good thing we don’t need any layers implementations because voting never requires gas anywhere.
It should never ever require gas or secondary entities .

1 Like

What potential attack vector can you see @TheFatherOfAllStorms?

Hi @jdshutt,

Your topic will be moving to the AIP Draft phase in less than 24 hours. Are you content with the feedback received or do you wish to extend community discussion for another 7 days?

If we do not hear from you within 48 hours after your topic closes, your topic will be moved straight to the AIP Draft process.

We look forward to hearing from you.

-Chris

I’m content with the feedback and ready to move to the AIP Draft phase.

1 Like

This topic was automatically closed after 7 days. New replies are no longer allowed.

Hi @jdshutt,

Thank you for your ideas [and the ApeCoin DAO community for the thoughtful discussions]. A moderator will get in touch with the author to draft the AIP in the appropriate template. Once the AIP is drafted and meets all the DAO-approved guidelines, the proposal will be posted on Snapshot for live official voting at: Snapshot

Follow this Topic as further updates will be posted here in the comments. @jdshutt please see your messages for the next steps.

-Chris

1 Like

Hi ApeCoin DAO Community,

@jdshutt has completed editing their AIP Idea to be their AIP Draft.

Follow this Topic as further updates will be posted here in the comments.

Kind Regards,

-Chris

2 Likes

Hi ApeCoin DAO Community,

Our team has reviewed and discussed @jdshutt’s AIP Draft and have sent a list of initial questions. We await answers.

Follow this Topic as further updates will be posted here in the comments.

Kind Regards,

-Chris

1 Like

By implementing oSnap, the DAO can streamline its governance process, promote decentralization, and uphold the true spirit of community driven decision making. I know that other parties have already successfully adopted oSnap. I love that it comes at ZERO cost :wink:

2 Likes

Hi ApeCoin DAO Community,

We have sent a list of follow up questions to the author.

Follow this Topic as further updates will be posted here in the comments.

Kind Regards,

-Chris

Hi ApeCoin DAO Community,

@jdshutt has responded to our questions and they are in our review once again.

Follow this Topic as further updates will be posted here in the comments.

Kind Regards,

-Chris

Hi ApeCoin DAO Community,

@jdshutt has responded to our questions and has provided consent to share them in this forum for the community.

  1. Is the expectation that the required funds for every proposal will be transferred to the multisig, which would be established upon the approval of this proposal, prior to each voting phase? If this is not the case, please provide more details regarding the funding expectations for the multisig.

The bond for the proposal is posted by whoever makes the proposal, so it does not need to come from the multi-sig. Any address can make a proposal after the Snapshot vote is finished. This could be a multi-sig signer, or a regular DAO member, or an unrelated third party.

  1. Please elaborate on your expectations for the bond amounts which would be required to either execute, or dispute, a transaction. What would the bond amount be for each function?

The bond amount are up to ApeCoin DAO, and would be the same for every proposal. As an example, if the bond amount was 1 WETH, a proposer would need to post a 1 WETH bond, and the disputer, if any, would also need to post a 1 WETH bond.

  1. a. Will oSnap (or any other accompanying platforms set forth in this proposal) require periodic bug fixes or updates?

We make frequent updates to the Snapshot front-end and bot and oracle interface infrastructure. We don’t have any immediate updates planned for the smart contracts.

b. If so, will the team at UMA be needed to address these issues or can fixes be addressed in-house?

UMA (Risk Labs) will be making these updates in the background and you will not need to do anything to benefit from new features. If there is an updated version of the Optimistic Governor contract, you could simply attach it as a new module on your Safe and disable the existing one. Or you could continue to use the older version without any problems.

c. If UMA’s team will be needed, what would the material cost to the DAO be for any foreseeable services?

No cost to the DAO is expected for any foreseeable updates. We are aggressively investing in product improvements that benefit all oSnap users and are interested in any features you would like to see.

  1. You’ve mentioned that oSnap has been adopted by Across, BarnBridge, ShapeShift and Lossless Protocol. What issues/problems/challenges have arisen from oSnap during your partnership with these entities, if any, and how has UMA addressed them?

We have found a few areas to improve in the Snapshot interface from our early deployments. In particular, Snapshot had trouble detecting transactions further back in the block history for BarnBridge, or had slow load times from looking at so many blocks. We’re greatly improved our indexing and performance and are working on caching now.

As another example, we have gotten a lot of feedback about how to make the transaction builder more usable, and how to make our monitoring systems more robust. Based on Across DAO feedback, we created a monitor bot and have begun work on a bot that can actually propose automatically when a Snapshot vote passes or dispute automatically if a faulty proposal is made.

We are highly committed to making oSnap as good as possible and will give ApeCoin DAO feedback high priority.

  1. Is there a security audit plan in place, and will you share the audit report with the ApeCoin DAO?

All of our contracts have been audited by OpenZeppelin and we are happy to share them. I noticed that our latest Optimistic Governor audit from three months ago was not posted publicly, but I’ve asked OZ to go ahead and release it.

The audit for an earlier version, which was the basis of the new version, is available here: UMA Optimistic Governor Audit - OpenZeppelin blog

The audit for the Optimistic Asserter, renamed to Optimistic Oracle V3, is available here: UMA Optimistic Asserter Audit - OpenZeppelin blog

  1. Your proposal states that “A Snapshot proposal can include a transaction payload that is executable if the proposal is approved by the DAO.” Please elaborate on the expected steps for including such a payload.

Our Snapshot tutorial docs have a detailed description of the steps involved. We are working to improve the docs, as well. In short, the creator of a proposal can either use Snapshot’s web interface based transaction builder to create the transaction payload, specifying token transfers or contract interactions, or upload a JSON with raw transaction data they created somewhere else. These transactions will then be visible to voters on the proposal.

  1. We would like to clarify one of our previous questions regarding funding of the multisig, or the “Safe to hold ApeCoin DAO assets”.

a. Who would fund the Safe?

It is expected that the ApeCoin DAO itself would fund the Safe with funds brought on-chain from the treasury at some point in the future. Amplify suggested a pilot program that would bring one year’s worth of DAO funding on-chain to be directly managed by the DAO through oSnap, but I am not proposing a specific funding plan. This proposal is to create an oSnap-enabled Safe and integrate oSnap with Snapshot, with the Safe to be funded later at the DAO’s discretion.

b. At what point would the funding be sent to the Safe?

That is up to the DAO. This proposal would create an oSnap deployment as a new decentralized governance tool for ApeCoin DAO but is agnostic about when, how, or how much DAO assets would be placed in the Safe.

c. What is the total expectation for funding any approved transactions for AIPs which are approved to receive funding?

There is no funding needed or expected for this proposal specifically. In the future, if the DAO places funds in an oSnap controlled Safe, it will make it easier for the DAO to fund future AIPs in a decentralized and efficient way once they are approved by a Snapshot vote.

  1. Do you provide consent to share these questions and answers with the community in this forum?

Feel free to share all of these questions and answers with the community!

A DAR package is being worked on and upon completion this AIP will move into Administrative Review. Follow this Topic as further updates will be posted here in the comments.

Kind Regards,

-Chris

3 Likes

Re: #5, here’s the audit for the latest version of the Optimistic Governor: UMA Optimistic Governor Incremental Audit

2 Likes

Hi ApeCoin DAO Community,

We have no further questions for @jdshutt. This AIP is now under Administrative Review.

Follow this Topic as further updates will be posted here in the comments.

Kind Regards,

-Chris

1 Like