diff --git a/contracts/treasury/CHANGELOG.json b/contracts/treasury/CHANGELOG.json
index 7bf259c885..c011dbea79 100644
--- a/contracts/treasury/CHANGELOG.json
+++ b/contracts/treasury/CHANGELOG.json
@@ -1,4 +1,13 @@
[
+ {
+ "version": "1.3.0",
+ "changes": [
+ {
+ "note": "Added proposal 1 params and test",
+ "pr": 298
+ }
+ ]
+ },
{
"timestamp": 1624356181,
"version": "1.2.3",
diff --git a/contracts/treasury/src/proposals.ts b/contracts/treasury/src/proposals.ts
index 93a4ab56a2..3ee1163cfd 100644
--- a/contracts/treasury/src/proposals.ts
+++ b/contracts/treasury/src/proposals.ts
@@ -17,6 +17,8 @@ interface Proposal {
const { zrxToken } = getContractAddressesForChainOrThrow(1);
const zrx = new ERC20TokenContract(zrxToken, new Web3ProviderEngine());
+const maticToken = '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0';
+const matic = new ERC20TokenContract(maticToken, new Web3ProviderEngine());
export const proposals: Proposal[] = [
{
@@ -32,4 +34,24 @@ export const proposals: Proposal[] = [
description:
'# [Proposal] Z-1 Community Treasury Ecosystem Value Experiment\n\n## TL;DR\n\nWe propose an operations model, team, and budget for a six-month, experimental initiative funded by the community treasury. The overall goal is to actively drive value creation and capture for the 0x protocol. We explain our thinking behind the proposal and why we think the community and broader 0x ecosystem will quickly and sustainably benefit from the initiative.\n\n_Note: This proposal is an updated version of the draft [published in the 0x Governance and Research forum](https://gov.0x.org/t/0xdao-community-treasury-proposal-1/883) and incorporates revisions based on feedback received. Notably, we have updated the budget to reflect more recent cost projections using industry-standard, publicly referenceable price data pulled on 5/23/2021 (original projections were done using price data pulled on 4/26/2021)._\n\n## Introduction\n\nRecognizing the ever-changing dynamics and increasing competitiveness of the broader cryptocurrency environment, the 0x community ambassadors propose an ambitious, six-month (26 weeks), experimental initiative focused on value creation and capture for the 0x protocol and its broader ecosystem. We’re confident that taking a bold approach to treasury management will create an immediate source of differentiation for 0x and enable us to most efficiently and effectively allocate community treasury funds at this stage in our growth. More importantly, if successful, we envision this initiative will turn into a sustainable source of meaningful, long-term value that will accelerate the flywheel of reflexivity and help to manifest the larger vision for the 0x ecosystem.\n\n## Background\n\nThe 0x protocol’s mission is to create a tokenized world where all value flows freely. After years of development and cultivation, it is clear that the protocol has achieved significant product-market fit. We explicitly adopt the protocol’s mission as our own for the duration of this experiment.\n\nRecently, the protocol began to actualize a phased approach for evolving into a multi-chain, crypto-economic primitive. As the prime developer of the protocol, 0x Labs has positioned itself well to drive and execute this technological maturation. In parallel, with the establishment of the 0xDAO and the community treasury, the 0x community is now positioned to take a more active and accountable role in protocol development.\n\n## Purpose\n\nLeveraging the 0xDAO community treasury, best practices from strategic innovation methodologies and frameworks (such as Jobs To Be Done, Design Thinking, Lean Startup, etc.), and a scrappy team of community members, we aim to deliberately – and with rigor – begin the process of direct community governance with an initial focus on ecosystem value creation and capture. Passage of this proposal will formally authorize the initiative and provide funding for operations.\n\n## Scope\n\nUsing the contextual framework described above, we have loosely categorized potential areas of experimentation below. Initial prioritization will be determined by the team and the strategy they develop once the effort is formally established. We welcome and will continue to actively seek out community input. It’s important to note that this list is meant to be illustrative in nature, and not meant to be all-encompassing or presented in any sort of priority order.\n- Adding features and improving protocol functionality\n- Performing tokenomics review, optimization, and potential revamp\n- Incentivizing and improving support for new and existing market makers\n- Providing liquidity to select ZRX pairs\n- Incentivizing order flow and trading volume, including via relayers, dApps, etc.\n- Improving the user experience for staking\n- Building and updating developer and user tools, including documentation refresh\n- Developing more sophisticated research and analytics capabilities\n- Assisting with dApps and new integrations, especially projects using order books\n- Experimenting with new business models and monetization paths, including new use cases for Mesh\n- Strengthening our community through outreach and rewards\n- Ramping up marketing\n- Driving support for strategic initiatives\n- Conceptualizing and executing social media campaigns\n- Hosting and advertising 0x hackathons\n- Engaging with emerging developer communities, such as BSC, Polygon, Solana, etc.\n\n## Operations\n\nIn considering the scope and how to best execute to achieve our intended goals, we [sought input from the community](https://gov.0x.org/t/request-for-input-and-feedback-0xdao-grant-program/853) regarding operations models. Augmenting the feedback we received with our own research and observations, experience, and vision of what this optimally could be, we’ve landed on a model that has a full-time lead who will be responsible and accountable for overall administration and day-to-day management; a core team who will drive strategy development, execution, and decision-making in their areas of expertise; and a council who will assist as needed and approve the disbursement of funds (most likely via Gnosis Safe multisig). Like many successful funds, we also plan to enlist a small group of external advisors to provide a more expansive perspective and to perform oversight.\n\nUsing this model to jumpstart our efforts does not mean that the community will take a back seat – quite the opposite, in fact. We’re hoping this approach enables us to proactively create opportunities for the discovery, acceleration, and synthesis of pathways to high-impact outcomes, while also expanding the opportunities for our growing community to be active participants.\n\nTo get started, the team will identify our most immediate needs, gaps, goals, and opportunities and create a strategic plan and roadmap that’s aligned with 0xLabs and the broader 0x ecosystem. We expect this process to take no longer than 2-3 weeks. Then, using proven innovation strategies and techniques, we will begin executing on the plan. As a preview, our discussions to date have uncovered opportunities in marketing, integration, trading/liquidity incentives, and other areas that we expect to include in our strategy and execution planning.\n\nPart of our ethos in establishing this effort is to empower community members who have demonstrated operational capabilities, maintained a sustained commitment to growing the ecosystem, have demonstrated a willingness to dedicate the time required, and have expertise in domains that are critical to our desired outcomes. Initially these consist of innovation strategy and execution, marketing, finance, and engineering.\n\nWith that in mind, we propose the following:\n\nLead: [@nikita](https://gov.0x.org/u/nikita) (full-time, 1040 hours) \\\nCore Team: [@SonOfPegasus](https://gov.0x.org/u/sonofpegasus), [@0xSHA](https://gov.0x.org/u/0xsha) (part-time, 182 hours each) \\\nCouncil: [@JoaoCampos89](https://gov.0x.org/u/joaocampos89), [@gabririgo](https://gov.0x.org/u/gabririgo) (part-time, 26 hours each) \\\nAdvisors: [@mintcloud](https://gov.0x.org/u/mintcloud) + others TBD\n\nIn the spirit of bold experimentation, we propose that compensation should maximize skin-in-the-game incentives through the use of crypto-native constructs wherever possible. To this end, we propose basing compensation in the protocol’s native token (ZRX), and we are exploring a streaming distribution mechanic (such as Sablier or Superfluid) to facilitate compensation payments. While we acknowledge that using a native token for baseline values is somewhat provocative and may result in significant swings in USD value – both to the upside and the downside – we feel strongly that this type of experimentation is crucial for learning and informing future efforts. Importantly, crypto-native funds and projects that have implemented a similar approach of compensating directly in a native token have had early success.\n\n## Budget\n\nIn determining an appropriate budget, we reviewed the budgets and best practices of other projects and considered our unique needs and goals. As a result, we feel we’ve landed in a place that feels “right” for us, and is the best balance of short-term aggressiveness and long-term prudence.\n\nCurrently, the community treasury holds 2m ZRX and the external development pool holds 103m ZRX. While 0x Labs has indicated an openness to allocating additional funds to the community treasury from the development pool in the future, we intend to operate this initiative with the goal of becoming self-sustaining, rather than a cost center.\n\nWe propose an overall budget for this experiment of 400k ZRX. We feel this will provide enough runway to conceptualize, articulate, and execute on a strategy with a responsible, risk/reward ratio, keeping in mind that the overall goal of the initiative is to accelerate value creation and capture. We leave open the possibility of requesting supplemental treasury funds for opportunities that may be developed during the experiment which require -- or could be optimized with -- additional capital (for example, liquidity provision). Any funds not spent will be returned to the treasury.\n\nFor budgetary planning purposes, we are setting the cost basis reference in our budget in ZRX (1 ZRX = 1 ZRX). This enables us to plan using a fixed, capital expense cost basis, rather than one that is continuously fluctuating, particularly for compensation. Using this approach, we need to set a conversion rate to calculate known costs.\n\nFor compensation (recurring costs to attract, retain, and reward work performance), we are referencing the Coinbase 200-day EMA ZRX/USD price (sourced from [Trading View](https://www.tradingview.com/symbols/ZRXUSD/technicals/)). This normalizes the cost basis to align with the period of performance and incentivizes the team to deliver sustainable results. As of 5/23/2021, the 200-day EMA is 1 ZRX = $1.22. All things considered, we believe the 200-day EMA is a more appropriate reference than the 200-day SMA ($1.08) or the market closing price ($.80). Using an hourly rate comparable to other protocols ($100/hr) this equates to 82 ZRX/hr. This rate will be set for the duration of the six-month experiment and will be the same for all team members. Because this is not an employer/employee arrangement, compensation does not include any benefits, tax withholding, etc.\n\nFor expenses (short-term, discrete costs paid in return for goods and services), we are referencing the Coinbase 30-day EMA ZRX/USD price (sourced from [Trading View](https://www.tradingview.com/symbols/ZRXUSD/technicals/)) to estimate costs. We expect the bulk of the expense cost (legal services) will likely be initiated soon after we begin operations, and this price best informs a near-term budgetary outlay. As of 5/23/2021, the 30-day EMA is 1 ZRX = $1.47. In addition to legal services, we expect to incur costs associated with general admin (including setup costs), compliance (including grantee verification), gas, etc. Using estimated costs incurred by other protocols ($50k), this equates to ~34k ZRX. If the price of ZRX remains under $1.47 for an extended period of time, the expense costs (in ZRX) will be higher and the deficit will come from the funding category. Conversely, if we have overestimated the cost of expenses, any surplus will be allocated to the funding category.\n\n| **Cost in ZRX** | **Category** |\n|----------------:|------------------------------------------|\n| 246,594 | Funding opportunities (including grants) |\n| 119,392 | Team compensation (1456 hours * 82) |\n| 34,014 | Expenses ($50k / $1.47) |\n| **400,000** | **Total budget** |\n\n## Timeline\n\nIf approved, the effort will begin operating shortly after the proposal passes and will run for a period of six months (26 weeks), at which time it may be extended or modified by a community vote, or will simply expire, depending on learnings and results. If warranted, interim adjustments may be made prior to the end of the six-month period via the on-chain governance process. Progress, operational, and outcome metrics will be reported to the community on a regular basis.\n\n## Success Metrics\n\nWe expect success to be measured objectively and subjectively. Specific metrics will be developed as part of the strategy formulation process. The lists below are notional, but objective success metrics could include:\n- Level of community engagement\n- Performance against metrics for workstreams\n- Number of ecosystem partners\n- Number of engaged external developers\n- ZRX trading volume\n\nAdditionally, subjective success metrics could include:\n- Improved sentiment and goodwill within the community and broader ecosystem\n- Improvement in 0x’s brand and positioning in the market\n\n## Conclusion\n\nThe DAO as a concept is still nascent and rapidly evolving. We’re in an ideal position to capitalize on the learnings, successes, and failures of others while still being early enough to shape what “best-in-class” looks like. While lofty and aspirational, our desire for this initiative to explore the true potential of a community-run DAO aligns well with the ambitious vision set forth by 0x Labs. They’ve done an incredible job laying the foundation; it’s time for us to help blaze the path forward.\n\nWe anticipate that the community and broader 0x ecosystem will quickly benefit from this initiative. Even though it may feel like we’re “building the airplane while in flight,” we’re confident there’s plenty we can do that will add noticeable, high-impact value for 0x stakeholders, even as we iterate, experiment, test, and learn. We hope all stakeholders are as excited as we are for this next step in our shared journey.\n\n### References:\n\n[1] [draft proposal discussion in forum](https://gov.0x.org/t/0xdao-community-treasury-proposal-1/883) \\\n[2] [discussion on operations model in forum](https://gov.0x.org/t/request-for-input-and-feedback-0xdao-grant-program/853) \\\n[3] [ZRX price analysis at Trading View](https://www.tradingview.com/symbols/ZRXUSD/technicals/)\n\n### Forum Profile Links:\n\n[@nikita](https://gov.0x.org/u/nikita) \\\n[@SonOfPegasus](https://gov.0x.org/u/sonofpegasus) \\\n[@0xSHA](https://gov.0x.org/u/0xsha) \\\n[@JoaoCampos89](https://gov.0x.org/u/joaocampos89) \\\n[@gabririgo](https://gov.0x.org/u/gabririgo) \\\n[@mintcloud](https://gov.0x.org/u/mintcloud)\n\n### Fund Receiving Address:\n\nGnosis Multisig Safe [0xf9347f751a6a1467Abc722eC7d80bA2698dd9d6c](https://etherscan.io/address/0xf9347f751a6a1467Abc722eC7d80bA2698dd9d6c)\n',
},
+ {
+ actions: [
+ {
+ target: zrxToken,
+ data: zrx
+ .transfer('0xab66cc8fd10457ebc9d13b9760c835f0a4cbc487', new BigNumber('330813e18'))
+ .getABIEncodedTransactionData(),
+ value: new BigNumber(0),
+ },
+ {
+ target: maticToken,
+ data: matic
+ .transfer('0xab66cc8fd10457ebc9d13b9760c835f0a4cbc487', new BigNumber('420000e18'))
+ .getABIEncodedTransactionData(),
+ value: new BigNumber(0),
+ },
+ ],
+ description:
+ '# Z-2 0x/Polygon Grant Budget for 0xEVE\n\n## Summary\n\nWe propose to transfer 10% of the new Treasury allocation from the recently announced 0x/Polygon initiative to the 0x Ecosystem Value Experiment (0xEVE). The purpose is not so much to increase the budget as it is to enable access to the MATIC that was allocated to the Treasury after 0xEVE was established and to expand the original goals to include use cases on the Polygon Network. A snapshot vote was held to gauge community sentiment with 100% in favor https://snapshot.org/#/0xgov.eth/proposal/QmdcZAAcmNgM3R6CVY586G4sSoPwm6T3CS39DCQ4gPDPB4.\n\n## Background\n\nA proposal to establish the 0x Ecosystem Value Experiment (0xEVE) was passed in early June with a budget of 400K ZRX, which was then transferred to the 0xEVE multisig to fund operations. Shortly afterwards, 0xLabs and 0xPolygon allocated 3.3M ZRX and 4.2M MATIC to the 0xDAO Treasury with the shared goal of bringing 1M new users to the Polygon Network via 0x-powered applications.
\nSince that time, 0xEVE has established a grant program and published a framework for projects seeking support from the 0xDAO. However, because 0xEVE has no access to these new funds, it will be extremely difficult given the current market conditions (and the commensurate devaluation of our operating budget in USD terms) for us to incorporate this new goal into the grant program in any meaningful way, particularly because we are not able to spend any of the MATIC in the Treasury.\n\n## Request for Approval\n\nIn keeping with the original structure of the budget where ~10% of the Treasury was allocated to 0xEVE to fund opportunities such as grants, we propose that 10% of the new funding (ZRX and MATIC) be allocated to 0xEVE to fund activities associated with this new initiative. A separate multisig has been set up to manage and track these expenditures.
\nCompensation will remain as authorized in the original budget, and the new funding will be allocated 100% to grants and other operational activities specific to Polygon. In accordance with the grant program framework, this will enable 0xEVE to fast track grants under $50k using its own budget, while larger grants will require an onchain community vote and will be awarded from Treasury funds.
\nAdditionally, as 0x protocol deploys to additional chains, for any future allocations from similar joint initiatives, we recommend that they be structured the same way (90/10 split between the Treasury and 0xEVE) so that 0xEVE can actively participate in evaluating, distributing, and managing grants and other associated efforts designed to accelerate adoption and ecosystem value capture on those networks.
\nAs stipulated in Z-1, 0xEVE is a limited-duration experiment (26 weeks) and any funds not used will be returned to the Treasury when the experiment concludes.\n\n## Action Required\n\nTransfer 330,813 ZRX and 420,000 MATIC to 0xEVE gnosis safe multisig 0xAB66CC8FD10457ebC9D13B9760C835F0a4CbC487',
+ },
];
diff --git a/contracts/treasury/test/proposal_test.ts b/contracts/treasury/test/proposal_test.ts
index 278cbf74a9..f2ce15d2f9 100644
--- a/contracts/treasury/test/proposal_test.ts
+++ b/contracts/treasury/test/proposal_test.ts
@@ -151,4 +151,72 @@ blockchainTests.fork.skip('Treasury proposal mainnet fork tests', env => {
);
});
});
+ describe('Proposal 1', () => {
+ it('works', async () => {
+ const proposal = proposals[1];
+ let executionEpoch: BigNumber;
+ if (proposal.executionEpoch) {
+ executionEpoch = proposal.executionEpoch;
+ } else {
+ const currentEpoch = await staking.currentEpoch().callAsync();
+ executionEpoch = currentEpoch.plus(2);
+ }
+ const pools = await querySubgraphAsync(PROPOSER);
+ const proposeTx = treasury.propose(proposal.actions, executionEpoch, proposal.description, pools);
+
+ const calldata = proposeTx.getABIEncodedTransactionData();
+ logUtils.log('ZrxTreasury.propose calldata:');
+ logUtils.log(calldata);
+
+ const proposalId = await proposeTx.callAsync({ from: PROPOSER });
+ const receipt = await proposeTx.awaitTransactionSuccessAsync({ from: PROPOSER });
+ verifyEventsFromLogs(
+ receipt.logs,
+ [
+ {
+ ...proposal,
+ proposalId,
+ executionEpoch,
+ proposer: PROPOSER,
+ operatedPoolIds: pools,
+ },
+ ],
+ ZrxTreasuryEvents.ProposalCreated,
+ );
+ await fastForwardToNextEpochAsync();
+ await fastForwardToNextEpochAsync();
+ await treasury
+ .castVote(proposalId, true, VOTER_OPERATED_POOLS)
+ .awaitTransactionSuccessAsync({ from: VOTER });
+ await env.web3Wrapper.increaseTimeAsync(votingPeriod.plus(1).toNumber());
+ await env.web3Wrapper.mineBlockAsync();
+ const executeTx = await treasury.execute(proposalId, proposal.actions).awaitTransactionSuccessAsync();
+ verifyEventsFromLogs(
+ executeTx.logs,
+ [
+ {
+ proposalId,
+ },
+ ],
+ ZrxTreasuryEvents.ProposalExecuted,
+ );
+ const recipient = '0xab66cc8fd10457ebc9d13b9760c835f0a4cbc487';
+ verifyEventsFromLogs(
+ executeTx.logs,
+ [
+ {
+ _from: TREASURY_ADDRESS,
+ _to: recipient,
+ _value: new BigNumber(330_813).times('1e18'),
+ },
+ {
+ _from: TREASURY_ADDRESS,
+ _to: recipient,
+ _value: new BigNumber(420000).times('1e18'),
+ },
+ ],
+ ERC20TokenEvents.Transfer,
+ );
+ });
+ });
});