Live voting for pools BTC/bnUSD and ETH/bnUSD

Live voting is hopefully launching soon. But to be able to delegate some liquidity to the pairs BTC/bnUSD and ETH/bnUSD they need to be added.

I added initial liquidity to get pool ids.

Pool ID BTCB/bnUSD : 58
Pool ID ETH/bnUSD : 59

I propose to add both pools as Community pools in rewards. Actions and parameters are:

StakedLP Contract:
addDataSource(58,  BTCB/bnUSD)
addDataSource(59,  ETH/bnUSD)

Rewards Contract:
createDataSource(BTCB/bnUSD, cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f, 2)
createDataSource(ETH/bnUSD, cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f, 2)

I hope to also add ETH/BTC in the future but we then need to approve BTC as a quote token first. Which we could do in this proposal as well.

Below will be a thorough walk through on how to structure this type of Vote.
This method of creating votes is only when not going through the frontend. So in the future hopefully only for complex votes. But its good the display the inner workings.

To add these pools we have to interact both with the rewards contract and the stakedLp contract.

The stakedLP contract is a data provider contract, which has many datasources, which in this case are LP pools.
So first to be able to stake pool 58 and 59 we need to call

@External
void addDataSource(BigInteger id, String name) 

Where id is the pool id and name is the name. The current naming standard is baseSymbol/qouteSymbol and i suggest we stick with that.
So the calls would be

addDataSource(58,  BTCB/bnUSD)
addDataSource(59,  ETH/bnUSD)

Then we need to add these to rewards with the function:

@External
void createDataSource(String _name, Address _address, int sourceType)

Where _name is the name we decided above, _address is the dataProvider which is the stakedLP contract, and sourceType we choose Community Pools Which is id 1.

createDataSource(BTCB/bnUSD, cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f, 2)
createDataSource(ETH/bnUSD, cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f, 2)

If we want to add BTC as a quote token we need to call the Dex with:

addQuoteCoin(cx5b5a03cb525a1845d0af3a872d525b18a810acb0)

Finally we need to construct the JSON actions of the above described actions:


[
  {
    "address": "cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f",
    "method": "addDataSource",
    "parameters": [
      {
        "type": "int",
        "value": "58"
      },
      {
        "type": "String",
        "value": "BTCB/bnUSD"
      }
    ]
  },
  {
    "address": "cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f",
    "method": "addDataSource",
    "parameters": [
      {
        "type": "int",
        "value": "59"
      },
      {
        "type": "String",
        "value": "ETH/bnUSD"
      }
    ]
  },
  {
    "address": "cx10d59e8103ab44635190bd4139dbfd682fa2d07e",
    "method": "createDataSource",
    "parameters": [
      {
        "type": "String",
        "value": "BTCB/bnUSD"
      },
      {
        "type": "Address",
        "value": "cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f"
      },
      {
        "type": "int",
        "value": "1"
      }
    ]
  },
  {
    "address": "cx10d59e8103ab44635190bd4139dbfd682fa2d07e",
    "method": "createDataSource",
    "parameters": [
      {
        "type": "String",
        "value": "ETH/bnUSD"
      },
      {
        "type": "Address",
        "value": "cx8dc674ce709c518bf1a6058a2722a59f94b6fb7f"
      },
      {
        "type": "int",
        "value": "1"
      }
    ]
  }
]
5 Likes

100% agree. please go ahead asap for voting.

1 Like