TLDR
- In V3 we introduced a data contract where people post candidates onchain (using events).
- There’s a minor bug where we charge the candidate creation fee in case of an update to a live proposal.
- There’s also a minor UX issue where the data contract allows candidates with more than 10 txs, while the DAO has a hard limit at 10.
- This proposal upgrades the data contract with minor fixes for both issues.
- This version is not audited; This side contract is not part of the core nouns contract, hence the risk is very low.
Fix summary
In V3 we introduced a data contract where people post candidates onchain (using events). Accounts with zero votes need to pay a small spam-protection fee to create a candidate.
We use the create candidate function also as part of the flow of updating an onchain proposal that was created with signatures, as a means of collecting signatures again for the update.
The primary bug is that we charge the candidate creation fee in this proposal update flow, when in fact we don’t want to charge it. The fix is not charging the candidate creation fee when the candidate is explicitly created in order to update an existing proposal, and the proposal meets certain conditions: it’s in the Updatable state, the candidate creator and the proposal proposer are the same account, and the proposal has at least one signer.
The secondary issue is that candidates can be created with an invalid amount of transactions, leading to bad UX when people try to convert these candidates to proposals. The DAO’s rules for transactions are: (1) there must be at least one transaction, and (2) there must be at most ten transactions. With this fix the data contract enforces the same rules so users get pushback early on.
Exact changes can be seen in this pull request.
Because this change is for a side contract, which doesn’t have any access to the core nouns contracts,, we're not going through an official audit process. This change has been reviewed by solimander.
Transaction
The transaction sets the data contract proxy implementation to be the fixed version deployed here.
Thanks,
the verbs ⌐◨-◨