KyberSwap Docs
  • Introduction to KyberSwap
  • Getting Started
    • Quickstart
      • FAQ
    • Supported Exchanges And Networks
    • Foundational Topics
      • Decentralized Finance
        • Tokens
        • Stablecoins
        • DEX/DeFi Aggregator
        • Slippage
        • Price Impact
        • Zap
        • Maximal Extractable Value (MEV)
      • Decentralized Technologies
        • Wallets
        • Dapps
        • RPC
        • Oracles
        • On-Chain vs Off-Chain Data
      • Other Valuable Resources
  • KyberSwap Solutions
    • KyberSwap Interface
      • User Guides
        • Connect Your Wallet
        • Switching Networks
        • Instantly Swap At Superior Rates
        • Swap At Your Preferred Rates
        • Cross-chain Swap
        • Add Your Favourite Tokens
        • Get Crypto With Fiat
        • Bridge Your Assets Across Multiple Chains
      • Profiles
        • Profile Creation
        • Profile Customization
        • Sync Profile Across Devices
      • Notifications
        • Notification Center
    • KyberSwap Aggregator
      • Concepts
        • Dynamic Trade Routing
      • User Guides
        • Instantly Swap At Superior Rates
      • Developer Guides
        • Execute A Swap With The Aggregator API
        • Upgrading To APIv1
      • Aggregator API Specification
        • EVM Swaps
        • Permit
      • Contracts
        • Aggregator Contract Addresses
      • DEX IDs
      • Subgraphs
      • FAQ
    • KyberSwap Zap as a Service
      • KyberSwap Zap as a Service (ZaaS) API
        • ZaaS HTTP API
        • ZaaS GRPC API
      • KyberSwap Zap Liquidity Widget
      • Zap Fee Model
      • Zap's Supported Chains/Dexes
      • Zap's Deployed Contract Addresses
      • Zap's DEX IDs
    • KyberSwap Widget
      • Developer Guides
        • Integrating The KyberSwap Widget
        • Customizing The KyberSwap Widget
      • iFrame Alternative
      • Widget/iFrame Fee
    • KyberSwap Liquidity Widget
      • Integrating The KyberSwap Liquidity Widget
    • Limit Order
      • Concepts
        • Off-Chain Relay, On-Chain Settlement
        • Gasless Cancellation
      • User Guides
        • Swap At Your Preferred Rates
        • Update Limit Orders
        • Cancel Limit Orders
      • Developer Guides
        • Create Limit Order
        • Gasless Cancel
        • Hard Cancel
        • Fill Limit Order
      • Contracts
        • Limit Order Contract Addresses
      • Limit Order API Specification
        • General APIs
        • Maker APIs
        • Taker APIs
      • FAQ
    • KyberSwap OnChain Price Service
    • Fee Schedule
  • Governance
    • KyberDAO
      • User Guides
        • Participating in KyberDAO
        • Staking
        • Voting
        • Stake KNC And Enjoy Gas Savings
      • Fees to KyberDAO
      • KyberDAO Operator MultiSig
      • Contracts
        • KyberDAO Contract Repo
        • KyberDAO Contract Addresses
      • FAQ - Others
    • KNC Token
      • KNC Tokenomics & Utility
      • Gas Refund Program
      • KNC Contract Addresses
  • Security
    • Audits
  • Reference
    • Legacy
      • KyberSwap Classic
        • Concepts
          • Programmable Pricing Curves
          • Dynamic Auto-Adjusting Fees
          • Virtual Balances
          • Protocol Fees
        • Contracts
          • Classic Contract Repo
          • Classic Contract Addresses
          • Classic Contract Farming Addresses
      • KyberSwap Elastic
        • Concepts
          • Concentrated Liquidity
          • Reinvestment Curve
          • Tick-Range Mechanism
          • Pool Process Flows
          • Anti-Sniping Mechanism
          • Tick-Based Farming
          • Elastic Zap
          • TWAP Oracle
          • Elastic APR Calculations
        • Contracts
          • Elastic Contract Repo
          • Elastic Contract Addresses
          • Elastic Farming Contract Addresses
          • Elastic Zap Contract Addresses
          • Elastic Core Contracts
          • Elastic Core Libraries
          • Elastic Periphery Core Contracts
          • Elastic Peripheral Library Contracts
          • Elastic Peripheral Base Contracts
        • Subgraphs
      • Whitepapers
      • Audits
      • KyberAI
        • KyberScore
        • Concepts
        • On-Chain Indicators
          • Number Of Trades
          • Trading Volume
          • Netflow To Whale Wallets
          • Netflow To CEX
          • Number Of Transfers
          • Volume Of Transfers
          • Number Of Holders
          • Top Holders
        • Technical Indicators
          • Live Charts
          • Support & Resistance Levels
          • Live Trades
          • Funding Rate On CEX
          • Liquidations On CEX
        • Liquidity Analysis
      • Elastic Legacy
        • Elastic Legacy Contract Repo
        • Elastic Legacy Contract Addresses
        • Elastic Legacy Farming Contract Addresses
        • Remove Elastic Legacy Liquidity
      • Protocol
        • Overview
        • Smart Contract Architecture
        • Trust and Security Model
      • Integrations
        • Getting Started
        • Use Cases
        • Integration Types
        • Smart Contracts
        • Ethers JS
        • RESTful API
        • Slippage Rate Protection
        • Price Feed Security
        • Contract Events
        • Platform Fees
      • Reserves
        • Getting Started
          • Overview
          • Why Develop On Kyber
          • Create New Reserve
          • Existing Reserves
          • Customising Existing Reserves
        • Development Guides
          • Fed Price Reserve
          • Automated Price Reserve
          • Reserves with Ganache
          • Orderbook Reserve
        • Operations
          • Listing Policies
          • Reserve IDs
          • Reserve Rebates
          • Sanity Rates
      • Addresses
        • Introduction
        • Mainnet
        • Kovan
        • Rinkeby
        • Ropsten
      • API/ABI
        • Introduction
        • RESTful API
          • RESTful API Overview
          • RESTful API
        • Core Smart Contracts
          • IKyberNetworkProxy
          • KyberNetworkProxy
          • IKyberNetwork
          • ISimpleKyberProxy
          • IKyberMatchingEngine
          • KyberMatchingEngine
          • IKyberHint
          • KyberHintHandler
          • IKyberHintHandler
          • IKyberFeeHandler
          • IKyberStaking
          • KyberStaking
          • IKyberDao
          • KyberDao
          • IKyberStorage
          • KyberStorage
          • IKyberHistory
          • KyberHistory
          • IKyberReserve
          • KyberReserve
          • ConversionRates
          • LiquidityConversionRates
          • EpochUtils
          • IEpochUtils
          • KyberFeeHandler
        • Contract ABIs
          • ABIs
        • Code Snippets
          • Token Quantity Conversion
        • Misc Contracts
          • KyberNetwork
          • ConversionRatesInterface
          • PermissionGroups
          • SanityRates
          • Withdrawable
          • OrderbookReserveInterface
          • OrderbookReserveLister
    • KyberSwap Operator MultiSig
    • Permitable Tokens
    • Third-Party Integrations
    • KyberSwap Analytics
    • KyberSwap App
    • GitHub
    • KyberSwap Analytics
    • KyberSwap Blog
    • Kyber Network Press Kit
  • Socials
    • X
    • Discord
    • Telegram
    • LinkedIn
    • Reddit
    • Instagram
    • Tik Tok
  • Support
    • KyberSwap Help Center
    • Complaints Handling Process
Powered by GitBook
On this page
  • contract KyberDao
  • INDEX​
  • REFERENCE​

Was this helpful?

  1. Reference
  2. Legacy
  3. API/ABI
  4. Core Smart Contracts

KyberDao

PreviousIKyberDaoNextIKyberStorage

Last updated 2 years ago

Was this helpful?

You are referring to the Legacy version of KyberSwap docs.

For the most updated information, please refer to:

contract KyberDao

is , , ReentrancyGuard, Utils5, DaoOperator\ imports , DaoOperator, , IERC20, , ReentrancyGuard, Utils5

Source:


INDEX

<AUTOGENERATED_TABLE_OF_CONTENTS>

REFERENCE

Events

NewCampaignCreated

Event for logging the creation of a new campaign.


event NewCampaignCreated(CampaignType campaignType, uint256 campaignID, uint256 startTimestamp, uint256 endTimestamp, uint256 minPercentageInPrecision, uint256 cInPrecision, uint256 tInPrecision, uint256[] options, bytes link) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | campaignType | CampaignType | type of campaign (General, NetworkFee, FeeHandlerBRR) | | campaignID | uint256 | ID of the campaign | | startTimestamp | uint256 | timestamp to start the new campaign | | endTimestamp | uint256 | timestamp to end the campaign | | minPercentageInPrecision | uint256 | min percentage (in precision) for formula to conclude campaign | | cInPrecision | uint256 | c value (in precision) for formula to conclude campaign | | tInPrecision | uint256 | t value (in precision) for formula to conclude campaign | | options | uint256[] | list values of options to vote for the campaign | | link | bytes | additional data for the campaign | Signature: 0x16cd0674a0f54c4895f5973a1f8f1be4b653af6c2436052d529fd3d0e5def391

\

Event for logging the cancellation of a campaign.


event CancelledCampaign(uint256 campaignID) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | campaignID | uint256 | ID of the campaign | Signature: 0xef29bb5bcfd2b2ff4bc50d710898467757ff87aad1031fc953907b65127f86fc

\

Votes for an option of a campaign, where options are indexed from 1 to N number of options.


function vote(uint256 campaignID, uint256 option) external override | Parameter | Type | Description | | --------- |:-----:|:-----------:| | campaignID | uint256 | ID of campaign | | option | uint256 | ID of option |

### `shouldBurnRewardForEpoch` Since some epochs have rewards but no one can claim it, return true if those rewards should be burned. ___ function __shouldBurnRewardForEpoch__(uint256 epoch) external view override returns (bool) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `epoch` | uint256 | epoch number to check | **Returns:**\ `true` if rewards should be burned for the epoch, `false` otherwise ### `getListCampaignIDs` Returns a list of campaign IDs for a given epoch. ___ function __getListCampaignIDs__(uint256 epoch) external view returns (uint256[] campaignIDs) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `epoch` | uint256 | epoch number to query | **Returns:**\ campaignIDs - list of campaign IDs for a given epoch ### `getTotalEpochPoints` Returns the total epoch points of a given epoch ___ function __getTotalEpochPoints__(uint256 epoch) external view override returns (uint256) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `epoch` | uint256 | epoch number to query | **Returns:**\ Total epoch points ### `getCampaignDetails` Returns the campaign details given a campaign ID. ___ function __getCampaignDetails__(uint256 campaignID) external view returns (enum KyberDao.CampaignType campaignType, uint256 startTimestamp, uint256 endTimestamp, uint256 totalKNCSupply, uint256 minPercentageInPrecision, uint256 cInPrecision, uint256 tInPrecision, bytes link, uint256[] options) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `campaignID` | uint256 | ID of campaign to query | **Returns:**\ campaignType - type of campaign (General, NetworkFee, FeeHandlerBRR) startTimestamp - timestamp of the start the campaign endTimestamp - timestamp to the end the campaign totalKNCSupply - total supply of the KNC token minPercentageInPrecision - min percentage (in precision) for formula to conclude campaign cInPrecision -c value (in precision) for formula to conclude campaign tInPrecision -t value (in precision) for formula to conclude campaign link - list values of options to vote for the campaign options - additional data for the campaign ### `getCampaignVoteCountData` Returns the number of vote data for a campaign. ___ function __getCampaignVoteCountData__(uint256 campaignID) external view returns (uint256[] voteCounts, uint256 totalVoteCount) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `campaignID` | uint256 | ID of campaign to query | **Returns:**\ voteCounts - array showing the number of votes per option totalVoteCount - total number of votes in the campaign ### `getPastEpochRewardPercentageInPrecision` Returns the staker's reward percentage in precision for a past epoch only. ___ function __getPastEpochRewardPercentageInPrecision__(address staker, uint256 epoch) external view override returns (uint256) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `staker` | address | staker's address | | `epoch` | uint256 | past epoch number | **Returns:**\ Past epoch reward percentage in precision for the staker ### `getCurrentEpochRewardPercentageInPrecision` Returns the staker's reward percentage in precision for the current epoch. Reward percentage is not finalized until the current epoch has ended. ___ function __getCurrentEpochRewardPercentageInPrecision__(address staker) external returns (uint256) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `staker` | address | staker's address | **Returns:**\ Current epoch reward percentage in precision for the staker ### `getCampaignWinningOptionAndValue` Returns the campaign winning option and its value. Returns (0, 0) if the campaign does not exist, the campaign has not ended yet, or the campaign has no winning option based on the formula. ___ function __getCampaignWinningOptionAndValue__(uint256 campaignID) public view returns (uint256 optionID, uint256 value) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `campaignID` | uint256 | ID of campaign to query | **Returns:**\ optionID - the winning option ID value - the value of the winning option ### `getLatestNetworkFeeData` Return the latest network fee and expiry timestamp. ___ function __getLatestNetworkFeeData__() public returns (uint256 feeInBps, uint256 expiryTimestamp)\ **Returns:**\ feeInBps - network fee in BPS expiryTimestamp - the timestamp when the fee will expire and needs to be updated ### `getLatestBRRData` Returns the latest BRR result. ___ function __getLatestBRRData__() public view returns (uint256 burnInBps, uint256 rewardInBps, uint256 rebateInBps, uint256 epoch, uint256 expiryTimestamp)\ **Returns:**\ burnInBps - burn ratio in BPS rewardInBps - rewards ratio in BPS rebateInBps - reabtes ratio in BPS epoch - latest epoch expiryTimestamp - the timestamp when BRR values will expire and needs to be updated

CancelledCampaign

Functions

vote

Classic
Elastic
Limit Order
Aggregator
IKyberDao
EpochUtils
EpochUtils
KyberStaking
IKyberDao
KyberDao.sol
​
​
​
​
​
​
​