# Bitocracy question - how executing vote into code?

**URL:** <https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167>\
**Category:** Bitocracy\
**Created:** [February 15, 2021, 7:18am UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167 "2021-02-15T07:18:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![TM1](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/tm1/32/126_2.png) [@TM1](https://forum.sovryn.com/u/TM1)\
**Post date:** [February 15, 2021, 7:18am UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/1 "2021-02-15T07:18:02Z")

</div>

In relation to:

> [@What's a Bitocracy?](https://forum.sovryn.com/t/whats-a-bitocracy/25):
>
> A Bitocracy encompasses a self-running, decentralized business where users interact with the Bitcoin blockchain with complete financial sovereignty, enjoying Bitcoin-class security and long term incentives to act in beneficial ways towards the protocol. The elements of the Sovryn Bitocracy Voting rights Sovryn uses a quadratic equation with a mapping system to measure the total amounts of tokens that are unstaked on any given day (stakedUntil). This enables the protocol to compute the voting p…

"…

1. Participant(s) make a **Sovryn Improvement Proposal (SIP)** , which is written here and iterated in code if approved by the community.  
…"

How is this iteration to code working in detail? (After SIP is voted to approval)

Personally, I really like the ability for non-developers to engage and submitt SIPs.  
It also makes voting easier, or let’s say possible for all kinds of stakers, cause of human readability.

As much as I like that approach, doesn’t it open doors to individual (or group) decisions of “how to implement” a SIP?

I don’t mean the nitty gritty technical details but the full transfer of SIP text and context of “what should happen” into “that’s the code for it”.

I guess the implementation opens a lot of freedom on interpretation? (And more of that if developers votes are opposed by majority).

Not that I insinuate such behaviour, but just interested in the process of it.

---

<div class="post-metadata">

**Author:** ![light](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/light/32/11_2.png) [@light](https://forum.sovryn.com/u/light)\
**Post date:** [February 16, 2021, 5:11pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/2 "2021-02-16T17:11:16Z")

</div>

Someone who has an idea for a SIP that requires a code change (e.g. smart contract addition/update) will either have to write the code themselves or find a competent Solidity developer to write the code for them.

---

<div class="post-metadata">

**Author:** ![TM1](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/tm1/32/126_2.png) [@TM1](https://forum.sovryn.com/u/TM1)\
**Post date:** [February 16, 2021, 7:41pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/3 "2021-02-16T19:41:21Z")

</div>

Right.

But what about all last SIPs?  
They were human readable, still someone had to put them into code.

Exactly such transfer I meant.

I guess right now it’s rather easy… but we’re growing fast.

If you (as in: we all) don’t see any future issues on that, or have more knowledge; no problem. Just shared an (to me unclear) point for discussion.

---

<div class="post-metadata">

**Author:** ![light](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/light/32/11_2.png) [@light](https://forum.sovryn.com/u/light)\
**Post date:** [February 18, 2021, 10:15pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/4 "2021-02-18T22:15:41Z")

</div>

> But what about all last SIPs?  
> They were human readable, still someone had to put them into code.

Yes, if the authors themselves weren’t coders then they found a coder who was willing to implement any code needed.

I do think that going forward it will be necessary to see how the human-readable proposals are translated into code. So far I do not think this is clear in the governance interface and should be improved if such improvements are not already in the works. See for example how code-based changes are presented in the Aragon Voting app: [https://client.aragon.org/#/network/0x240b4de6000b4ad52ceaa1057c2647bfc24ce697/vote/13/](https://client.aragon.org/#/network/0x240b4de6000b4ad52ceaa1057c2647bfc24ce697/vote/13/)

 ![Screenshot_2021-02-18 Aragon](https://europe1.discourse-cdn.com/flex017/uploads/sovryn1/original/1X/89af54d17eca5f056d289e5c50d8f874021369ba.png)

---

<div class="post-metadata">

**Author:** ![yago](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/yago/32/124_2.png) [@yago](https://forum.sovryn.com/u/yago)\
**Post date:** [February 19, 2021, 1:29pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/5 "2021-02-19T13:29:18Z")

</div>

When a SIP changes code, we try to link to the proposed code.

---

<div class="post-metadata">

**Author:** ![Ororo](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/ororo/32/352_2.png) [@Ororo](https://forum.sovryn.com/u/Ororo)\
**Post date:** [February 22, 2021, 3:14pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/6 "2021-02-22T15:14:11Z")

</div>

![Bildschirmfoto 2021-02-22 um 16.10.51](https://europe1.discourse-cdn.com/flex017/uploads/sovryn1/original/1X/c73a963c48e1899ca459acf8a400e05fc6e91196.png)

Currently, the code which is executed on a proposal is shown below the description. We should decode the ABI-encoded parameters to make them more readable, but in general, the information is there, already.

In case that the SIP does update a smart contract logic, the contract which will be replacing the existing one, will be visible as parameter. This contract has to be verified on the explorers, so anybody can investigate.

---

<div class="post-metadata">

**Author:** ![powerhousefrank](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/powerhousefrank/32/95_2.png) [@powerhousefrank](https://forum.sovryn.com/u/powerhousefrank)\
**Post date:** [February 22, 2021, 4:16pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/7 "2021-02-22T16:16:05Z")

</div>

> [@TM1](#):
>
> How is this iteration to code working in detail? (After SIP is voted to approval)

Suppose we have to call the function `deposit` in `Contract A` with the parameter `100`.

Then in the proposal, it will be mentioned:  
Which contract to call: Contract A Address  
Which function to call: deposit  
Any parameters: 100

Once the SIP is approved from majority, these parameters are sent to a protocol contract, and there it calls the `deposit` function in `Contract A` with `100` as the parameter.

The exact function of the protocol which makes these possible is mentioned here: [https://github.com/DistributedCollective/Sovryn-smart-contracts/blob/development/contracts/governance/Timelock.sol#L126](https://github.com/DistributedCollective/Sovryn-smart-contracts/blob/development/contracts/governance/Timelock.sol#L126)

> [@TM1](#):
>
> Personally, I really like the ability for non-developers to engage and submitt SIPs.  
> It also makes voting easier, or let’s say possible for all kinds of stakers, cause of human readability.

At the moment Sovryn does not have it in the frontend, but surely you can create an SIP, and the Sovryn Team can either make the code call part for you, or can verify the part which some other community member created (we have really active community).

You could also check out a website like these: [https://abi.hashex.org/](https://abi.hashex.org/) to create the code to be executed. Though that might also need some level of Technical knowledge.

> [@TM1](#):
>
> I don’t mean the nitty gritty technical details but the full transfer of SIP text and context of “what should happen” into “that’s the code for it”.

As @Ororo said, at the moment we have the details shown under the proposal. Some of these values might see gibberish, because it is made such that it is easy for the machine to read it, even though it makes us look confused. Those are encoded forms of the data we wanted to send.

Let’s go back to the earlier example, if we use the hashex website mentioned earlier, we can see that, the transaction detail will be as below for the `deposit()` with parameter `100`:

`b6b55f250000000000000000000000000000000000000000000000000000000000000064`

Where the first 8 letters tells us the function we would be calling, i.e. the `deposit` function

And the rest of the value `000...0064` mentions the parameter `100` (It is encoded in hex, `6`\*16^1 + `4`\*16^0 = 96 + 4 = `100`)

> [@TM1](#):
>
> I don’t mean the nitty gritty technical details but the full transfer of SIP text and context of “what should happen” into “that’s the code for it”.

Sorry for the detail above 😅 But I believe all our SIP’s currently contain the details of what will happen on approval of the SIP, and what would be the after effects of it.

---

<div class="post-metadata">

**Author:** ![TM1](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/tm1/32/126_2.png) [@TM1](https://forum.sovryn.com/u/TM1)\
**Post date:** [February 22, 2021, 6:18pm UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/8 "2021-02-22T18:18:58Z")

</div>

Thank you very much for that detailed answer! Greatly appreciated!

Then I maybe got it wrong in the first place already.

I thought that, for example, when Yago proposes a SIP (it’s nicely written, well thought out, etc…) and it passes voting… that THEN someone from the team goes ahead and implements changes… according to what’s written in that nicely readable doc.

Exactly that transfer from doc to code (who makes it, oversees if all details from doc are exactly like they should be/voted for, etc…)

But your explanation (and the ones before) makes much more sense now to me now.

Thanks again!

---

<div class="post-metadata">

**Author:** ![powerhousefrank](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.sovryn.com/powerhousefrank/32/95_2.png) [@powerhousefrank](https://forum.sovryn.com/u/powerhousefrank)\
**Post date:** [February 23, 2021, 8:00am UTC](https://forum.sovryn.com/t/bitocracy-question-how-executing-vote-into-code/167/9 "2021-02-23T08:00:41Z")

</div>

Glad to help 🙂
