👩‍💻
Builder Portal
  • Sovryn Builder Portal
    • Contribution
  • Design System
    • Design principles
    • Structure
    • Usage by Sovryn
  • UI Library
    • Overview
    • Getting Started
    • Atoms
      • Accordion
      • Badge
      • HealthBar
      • Button
      • DynamicValue
      • Heading
      • ErrorBadge
      • Icon
      • Input
      • Lottie
      • Paragraph
      • Toggle
      • Link
      • Checkbox
    • Molecules
      • AmountInput
      • ContextLink
      • Dialog
      • Dropdown
      • ErrorList
      • Footer
      • FormGroup
      • Header
      • HelperButton
      • Menu
      • NavMenuItem
      • Notification
      • Overlay
      • Pagination
      • RadioButton
      • RadioButtonGroup
      • Select
      • SimpleTable
      • StatusItem
      • Table
      • TableBase
      • Tabs
      • Tooltip
      • TransactionId
      • VerticalTabs
      • VerticalTabsMobile
      • WalletContainer
      • WalletIdentity
    • Working with Components
    • Links
    • Contribution
  • Sovryn SDK
    • Smart Router
      • Creating a New Swap Route
      • Available routes
        • AMM
        • MoC integration
        • MYNT bAsset
        • MYNT fixed rate
    • Sovryn Onboard
      • Installation
      • Usage
      • Custom Connectors
      • Custom UI
      • Contribution
    • The Graph
      • Overview
      • Usage
      • Sovryn Subgraphs
      • Advanced Usage
  • sovryn.app
    • Overview
    • Sovryn UI Library Usage
    • The Graph Usage
    • Links
    • Contribution
    • Dapp specific components
      • MaxButton
  • Smart Contracts
    • Overview
    • AMM
      • Liquidity
        • V1 Converters
        • V2 Converters
      • Conversion
      • Wrapper
        • V1 liquidity
        • V2 liquidity
        • Swaps
    • Sovryn Protocol
      • Lending
        • Mint
        • Burn
      • Borrowing
        • Borrow
        • Repay
      • Margin Trading
        • Open
        • Close
      • Collateral Management
    • Liquidity Mining
      • Deposit
      • Withdraw
      • Rewards
    • FastBTC
      • RSK->BTC
    • Bitocracy
      • Staking
      • Governor
      • Fee Sharing
      • Vesting
    • Zero
      • Borrower operations
      • Trove Manager
      • Satability Pool
      • Rewards
    • Mynt & DLLR
      • Basset to Masset Conversion
      • Masset to Basset Conversion
      • MOC Integration Conversion
Powered by GitBook
On this page
  • MAKING A PROPOSAL
  • VOTING A PROPOSAL
  • QUEUEING A PROPOSAL
  • EXECUTING A PROPOSAL
  1. Smart Contracts
  2. Bitocracy

Governor

The GovernorAlpha contract is an adapted clone of Compound’s governance model.

The GovernorAlpha contract has two instances:

  • The GovernorOwner: Which is the one authorized to perform changes in the code of the Sovryn's protocol.

  • The GovernorAdmin: Which is the one authorized to perform settings in parameters of the code of the Sovryn's protocol, and make movement of funds.

MAKING A PROPOSAL

Stakers can make (executable) proposals if they possess enough voting power, currently above the 1% of the total voting power.

The execution of the GovernorAlpha.propose returns the number ID of the proposal.

function propose(
        address[] memory targets,
        uint256[] memory values,
        string[] memory signatures,
        bytes[] memory calldatas,
        string memory description
    ) public returns (uint256) 

Arguments

Name
Type
Description

targets

address[]

Array of contract addresses to perform proposal execution

values

uint256[]

Array of rBTC amounts to send on proposal execution

signatures

string[]

Array of function signatures to call on proposal execution

calldatas

bytes[]

Array of payloads for the calls on proposal execution

description

string

Text describing the purpose of the proposal

VOTING A PROPOSAL

Once a proposal is successfully deployed, it has a window to be voted of 2880 blocks in RSK blockchain, which is around 24 hours. Only stakers will have voting power. The execution of the former function does not revert if you are not a staker user: it just add zero voting weight to the proposal, and spends the needed gas.

castVote(uint256 proposalId, bool support) public

Arguments

Name
Type
Description

proposalId

uint256

Proposal index to access the list proposals[] from storage

support

bool

Vote value, yes or no: whether you support or not the proposal

QUEUEING A PROPOSAL

If a proposal earns enough voting power in favor, the proposal must be put in a queue of 48 hours: this allow users that do not agree with the results to withdraw their funds from Sovryn protocol. Anybody can put in que an approved proposal.

function queue(uint256 proposalId) public 

Arguments

Name
Type
Description

proposalId

uint256

Proposal index to access the list proposals[] from storage

EXECUTING A PROPOSAL

After the minimum queue time windows is done, anybody can execute an approved proposal.

function execute(uint256 proposalId) public payable 

Arguments

Name
Type
Description

proposalId

uint256

Proposal index to access the list proposals[] from storage

PreviousStakingNextFee Sharing

Last updated 9 months ago