Finalized Votes4LPs

Name of Project: Finalized Votes4LPs

Proposal in one sentence: Allow Uniswap V2, Uniswap V3 and Bancor stakers vote in OCEANDAO

Description of the project and what problem is it solving: Users that have staked their OCEAN in AMM pools like Bancor or Uniswap cannot vote with those tokens on snapshot.org.

Grant Deliverables:

This proposal is asking for payment in retrospect. All work had already been completed.

Which category best describes your project? Pick one.

  • Improvements to OceanDAO

Which Fundamental Metric best describes your project? Pick one.

  • Improving the oceanDAO voting process

What is the final product?: oceanDAO team has to take the JSON files provided and input them as described on the snapshot org settings page. Then Bancor and Uniswap OCEAN stakers should be able to vote next round.

Funding Requested: 2796.6 USD

Proposal Wallet Address: 0x005241438cAF3eaCb05bB6543151f7AF894C5B58

Have you previously received an OceanDAO Grant (Y/N)? not with this project

Project lead Contact Email: tim (at) daubenschuetz (dot) de

Country of Residence: Germany

At OCEANDAO team: I’d be cool if you could verify my work before this proposal is up for voting, such that the community knows that they’re voting on something that works or doesn’t. Thanks!

6 Likes

Hey @TimDaub,

unfortunately this does not fully solve the issue of adding this strategy to Ocean Protocol’s Snapshot so that it is useable.
To do that you have to integrate your proposed strategies into Snapshot (here is a page that explains how this works: https://docs.snapshot.org/strategies)
The goal of all of your strategies is to create a list of all the wallets and their amounts of Ocean Protocol when Snapshot is executed with the Ocean Protocol space.

As an example I created the one for the Ocean marketplace. You can find it here: https://github.com/w1kke/snapshot.js/tree/master/src/strategies/ocean-marketplace
I also added a README to explain how it works.

It is very important that your output list is in the right format otherwise Snapshot will not be able to handle it. The second important factor is that the sum of the Ocean tokens in your list exactly matches the amount of tokens staked in the liquidity pool (you can check that via the liquidity pool websites).

If this is the case and you can show this to @idiom-bytes then he can test the strategies on Ocean Protocol’s Snapshot page with demo votes. If that part is successful then you can make a pull request in Snapshot’s repository on GitHub to get your strategies merged into the core repository. Then your strategies are usable by Ocean Protocol’s votes for the OceanDAO.

From my experience this process took significantly more time than creating the first prototype to get numbers out.

Best of luck and thank you so much for stepping in here to solve this important problem for the community.

I know what I’m doing. I’m using already existing strategies. They all have an options JSON to make them applicable for any e.g. uniswap pool. Their names: “uniswap”, “uniswap-v3” and “contract-call” (for bancor). The solutions I’m providing allow the oceandao team to configure these in their snapshot settings with the appropriate options (check the JSON files) I’ve provided. If they do as I specified, next round Uniswap v2 v3 and bancor stakers will be able to vote. My solution satisfies the problem. I ran the tests. Please do your homework before posting false statements here, thanks.

I am just explaining to you what I did for the OceanDAO team in the past. It is not their job to include these snippets somewhere, that is the job of the person that creates the Snapshot strategy.
These are just facts about how things were done to get the first strategy to run and to be used. What you are providing here is not the final solution. But you have to provide that.

They have to copy a JSON and paste it in a box, yes. I’m not an admin in their snapshot space. Anyways, two ways to verify:

  • clone https://github.com/snapshot-labs/snapshot-strategies
  • find folder with strategy to test and modify in examples.json the params object with the JSON I provided
  • modify the snapshot prop with a block number of your choice
  • Add an address that has stake in the pool to addresses array
  • call npm run test --strategy=uniswap or whatever yours is
  • see tests green

For bancor, I even provided a git remote with a valid examples.json to test. I know from a bancor staker that the provided test address contains around 49k OCEAN.

If you have a snapshot space, go to /settings, add the preexisting strategies with the JSONs I provided and - if you have stake - vote to test. I’ve done this here with my 3 OCEAN in uniswap v2: https://snapshot.org/#/rugpullindex.eth/proposal/QmWGwzPtBsKPc62qdzcYVmyPKDuDPeDfAHkrz1Y1pV3UT9

In the end I am not the product owner for this - this is @idiom-bytes as he is responsible for this part of the OceanDAO stack.
I just wanted to tell you what @idiom-bytes wanted as a result from me.
And I think he should take over to specify more deeply what is expected from the strategy point of view.

@idiom-bytes Shall we add Sushiswap too?
Pool: https://decentyields.com/liquidity-pool/sushiswap-ocean-eth

Hi Tim, I believe we have a 5-strategy limit in Snapshot (up from the original 3). I’ll ping Snapshot about when this limit may increase.

The original intention was to wrap multiple strategies into a single “Master-Ocean” strategy so we could execute all voting power calculations together.

If we’re able to generate a “Master-Ocean” strategy, then this could be leveraged across multiple Voting Power systems: “Master-Ocean-Log”, “Master-Ocean-QV”, etc… which would then allow us to quickly configure multiple Snapshot Spaces to handle parallel DAO funding streams.

Although Snapshot supports a native-QV implementation (Strategy/FE level), we may need to do some wrapping to get our final voting strategies in place.

Wanted to share some intuition about voting strategies in a forward-looking manner.

To complete this proposal I’d recommend us trying to use:

  • ERC20 Ocean
  • Ocean-Market LP
  • Bancor
  • UniV2 (~3m LP)
  • Sushiswap (~1m LP)

This would get us to the 5-Strat limit, and have updated vote access for R9.

Uniswap V3 LP has roughly ~0.6m and should perhaps be delayed until we can expand the strat count.

Cheers!

1 Like

Hi @TimDaub, I have updated the officialoceandao.eth space, and am just looking for you to “verify my PR”. In particular, I want to make sure the bancor contract-call strategy is correct.

I used your modified strategy submitted to snapshot which included modifications to the params: address, args, symbol, and inputs.

I’ll deploy a test proposal right away so we can test it live.

[{
“strategy”: “erc20-balance-of”,
“params”: {
“symbol”: “OCEAN”,
“address”: “0x967da4048cD07aB37855c090aAF366e4ce1b9F48”,
“decimals”: 18
}
}, {
“strategy”: “ocean-marketplace”,
“params”: {
“symbol”: “OCEAN”,
“address”: “0x967da4048cD07aB37855c090aAF366e4ce1b9F48”,
“decimals”: 18
}
}, {
“strategy”: “sushiswap”,
“params”: {
“symbol”: “OCEAN”,
“address”: “0x967da4048cD07aB37855c090aAF366e4ce1b9F48”,
“decimals”: 18
}
}, {
“strategy”: “uniswap”,
“params”: {
“symbol”: “OCEAN”,
“address”: “0x967da4048cD07aB37855c090aAF366e4ce1b9F48”,
“decimals”: 18
}
}, {
“strategy”: “contract-call”,
“params”: {
“address”: “0x9712Bb50DC6Efb8a3d7D12cEA500a50967d2d471”,
“args”: [
“%{address}”,
“0xCDfF066eDf8a770E9b6A7aE12F7CFD3DbA0011B5”,
“0x967da4048cD07aB37855c090aAF366e4ce1b9F48”
],
“decimals”: 18,
“symbol”: “OCEAN”,
“methodABI”: {
“inputs”: [{
“internalType”: “address”,
“name”: “provider”,
“type”: “address”
},
{
“internalType”: “address”,
“name”: “poolToken”,
“type”: “address”
},
{
“internalType”: “address”,
“name”: “reserveToken”,
“type”: “address”
}
],
“name”: “totalProviderAmount”,
“outputs”: [{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}],
“stateMutability”: “view”,
“type”: “function”
}
}
}]

1 Like

@TimDaub Updating this grant to be category improvements to the DAO in the project dashboard (it covers a lot of categories though). Please update when you have a moment. Thank you very much.

1 Like

It’s updated now. [filling up for 20 words post]

Interesting that they have a 5 strategy limit. We should inquire why that is. Because in case they’re concerned about the number of requests to validate per vote, there’d be no difference between a master strategy and individual ones. These requests would have to be made no matter what. Then a solution e.g. could be to build a custom voter subgraph…

Ok, I reviewed Bancor related voting strategy details, and it seems like the params as described above should work. I have deployed a test vote with the configurations mentioned above.

# Vote strategy test #1
This test was setup to help OceanDAO verify voting power from each strategy. The easiest way to test, is to vote with separate wallets, each one containing a single Token/LP from the following list.

Snapshot block height: 13060882
Start Time: Aug 19 23:59 GMT
End Time: Aug 20 23:59 GMT

After voting, please respond below with your Protocol Name (strategy) + 0x.
Example:
Bancor LP - 0x00000000000000000000000000000
UniswapV2 LP - 0x00000000000000000000000000000
Sushiswap LP - 0x00000000000000000000000000000

We’ll take a look at addresses/tokens to double check voting power.

Hi @TimDaub @Robin,

I thought I’d tag both of you for visibility, and to provide an update re: Votes4LP.

I have forked the snapshot-strategies repo from Snapshot, and pushed it to the OPF GH.

Basically in the future, whoever wants to develop/test new strategies for Votes4LP, should update the Repo + Tests above. They should pull the latest version of the snapshot-strategies repo from Snapshot, update the following test, and push a PR that includes the new tests/strategy/validations.

The test above will thus allow anyone to verify that the strategy configuration is yielding the right scores based on the addresses provided.

We should not need to deploy a test proposal, do any manual checks, or move money to wallets in order to verify things are working.

I hope this allows us to increase confidence before any larger scale tests.

Here are the final scores based on the addresses provided:

const addresses = [
// ERC-20 - 325.9642552813115
// Uniswap LP - 2.5914096066900663
‘0x005241438cAF3eaCb05bB6543151f7AF894C5B58’,

// ERC-20 - 5695.410954916474
// Ocean Marketplace LP - 4164.931866504933
// Bancor LP - 49267.088663994866
‘0x5D2B315C465e133a346C960F46f5AA1ED88a3179’,

// ERC-20 - 0
// Sushiswap LP - 963.8962295973731
// Bancor LP - 0
‘0x477336e94655a1fd0b0aa3945f26236f7555fa28’
];

1 Like

Absolutely going to support this proposal. Voting is crucial and every step in this direction counts. Thank you!

Worked like a charm in the testing @TimDaub - awesome work! Thank you so much for taking this to the next level. You have my votes for sure.

1 Like

great… important addition being brought to fruition (idioms-rock) - thanks from ResilientML.

1 Like