👩‍💻
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
  • VESTING CONTRACTS PURPOSE
  • VESTING CREATION
  • VESTING FUNDING
  • VESTING WITHDRAWALS
  1. Smart Contracts
  2. Bitocracy

Vesting

Vesting contracts allows contributors and users that participate in certain programs like farming, to earn SOV assets in a programmed way.

PreviousFee SharingNextZero

Last updated 9 months ago

Vesting contracts allows contributors and users that participate in certain programs like farming, to earn SOV assets in a programmed way, avoiding a negative impact in the circulating supply economy of the token -or tokenomics-.

VESTING CONTRACTS PURPOSE

Vesting contracts allows distribute rewards in a time windows minimizing the impact of additional available liquidity to the SOV price. Vesting contract owners, or tokenOwners are awarded with voting power, but not with claiming rights to the fee sharing contract.

Stakings must be "voluntary" or non related to vestings in order to qualify to rewards from fee distributions.

VESTING CREATION

Vestings can only be created by TimelockOwner contract (by the means of a proposal through GovernorOwner and NOT GovernorAdmin) or the admins designated by a former SIP.

The first step is the creation of the vesting contract through the call VestingRegistry.createVestingAddr.

function createVestingAddr(
        address _tokenOwner,
        uint256 _amount,
        uint256 _cliff,
        uint256 _duration,
        uint256 _vestingCreationType
    ) public onlyAuthorized

Arguments

Name
Type
Description

_tokenOwner

address

the future owner of the vested assets .

_amount

uint256

the net amount to be staked -blockchain format- indicating the date until which to stake

_cliff

uint256

the cliff time window in seconds .

_duration

uint256

the total duration of the vesting in seconds

_vestingCreationType

uint256

the type of vesting contracts to be created(e.g. Origin, Bug Bounty etc.)

VESTING FUNDING

Once the vesting has been created, the admin must first approve the handling of the SOV assets to VestingRegistry. Then the funds can be staked through: VestingRegistry.stakeTokens.

function stakeTokens(address _vesting, uint256 _amount) external onlyAuthorized 

Arguments

Name
Type
Description

_vesting

address

the address of Vesting contract

_amount

uint256

the amount of tokens to stake

VESTING WITHDRAWALS

By default, the staked assets are released to the tokenOwner each two periods of unlock staking checkpoints. When the tokenOwner has available assets to withdraw, they can perform Vesting.withdrawTokens where "Vesting" is the instance of the vesting contract specially created for this user.

function withdrawTokens(address receiver) public onlyOwners 

Arguments

Name
Type
Description

receiver

address

The receiving address

Vesting Contracts Protocol