KyberDeveloper · Powering Liquidity for the Ecosystem

KyberDeveloper · Powering Liquidity for the Ecosystem

  • Home
  • Integrations
  • Reserves
  • Environments
  • API/ABI
  • Trade Debugger
  • GitHub

›Miscellaneous

Getting Started

  • Introduction

Use Cases

  • DApps
  • Vendors
  • Wallets

Guides

  • Types Of Integration
  • Smart Contract
  • Web3
  • RESTful API

Widgets & Plugins

  • Overview
  • KyberWidget Guide
  • Sign In Widget Guide
  • WooCommerce Plugin Guide
  • KyberWidget Generator

Risk Mitigation

  • Slippage Rates Protection
  • Price Feed Security

Miscellaneous

  • Contract Events
  • Fee Sharing Program
  • Getting Help

Contract Events

Introduction

Ethereum allows smart contracts to emit events during the execution of a function. Your application can track these events to find information such as trades, fee burning, reserves listed etc. Using these events, you will be able to calculate other important information such as overall volume, volume per token, volume per reserve, and more. Our in-house built tracker uses the events emitted to track these statistics.

Tracking Guide

For the different information needed, a link to the relevant event is given.

Events to track volume and trade history

  • ExecuteTrade
  • KyberTrade

Events to track Price Feed Reserve (PFR) and Automated Price Reserve (APR) statistics

  • TradeExecute
  • DepositToken
  • WithdrawFunds

Events to track Permissionless Orderbook Reserve (POR) statistics

  • OrderbookReserveTrade
  • NewLimitOrder
  • OrderCanceled
  • FullOrderTaken
  • PartialOrderTaken

Events to track fees

  • AssignBurnFees
  • AssignFeeToWallet
  • BurnAssignedFees
  • SendWalletFees

Events

KyberNetworkProxy

Contract Address: 0x818E6FECD516Ecc3849DAf6845e3EC868087B755
Source: KyberNetworkProxy.sol

ExecuteTrade

Event is emitted when a trade is executed.


event ExecuteTrade(address indexed sender, ERC20 src, ERC20 dest, uint actualSrcAmount, uint actualDestAmount)

ParameterTypeIndexedDescription
senderaddressYESsender's address
srcERC20NOsource ERC20 token contract address
destERC20NOdestination ERC20 Token contract address
actualSrcAmountuintNOsource ERC20 token amount in wei
actualDestAmountuintNOdestination ERC20 token amount in wei

Event Signature: 0x1849bd6a030a1bca28b83437fd3de96f3d27a5d172fa7e9c78e7b61468928a39

KyberNetwork

Contract Address: 0x65bF64Ff5f51272f729BDcD7AcFB00677ced86Cd
Past Contract Addresses:
v3 - 0x9ae49C0d7F8F9EF4B864e004FE86Ac8294E20950,
v2 - 0x91a502C678605fbCe581eae053319747482276b9,
v1 - 0x964F35fAe36d75B1e72770e244F6595B68508CF5
Source: KyberNetwork.sol

AddReserveToNetwork

Event is emitted when a reserve is added to the network.


event AddReserveToNetwork(KyberReserveInterface indexed reserve, bool add, bool isPermissionless)

ParameterTypeIndexedDescription
reserveKyberReserveInterfaceYESreserve's contract address
addboolNOtrue if reserve was successfully added, false otherwise
isPermissionlessboolNOtrue if reserve was permissionlessly added, falseotherwise

Event Signature: 0x97c85c355415dd5f652ce2c1193f2ff9e7fa9bed8fe5619c7b10ef8b8780357f

KyberNetworkSetEnable

Event is emitted when the network is enabled or disabled.


event KyberNetworkSetEnable(bool isEnabled)

ParameterTypeIndexedDescription
isEnabledboolNOtrue if network is enabled, false if it is disabled

Event Signature: 0x8a846a525e22497042ee2f99423a8ff8bbb831d3ae5384692bf6040f591c1eba

KyberTrade

Emitted when a trade is executed in the internal network.


event KyberTrade(address indexed trader, ERC20 src, ERC20 dest, uint srcAmount, uint dstAmount, address destAddress, uint ethWeiValue, address reserve1, address reserve2, bytes hint)

ParameterTypeIndexedDescription
traderaddressYEStrader's address
srcERC20NOsource ERC20 token contract address
destERC20NOdestination ERC20 token contract address
srcAmountuintNOsource ERC20 token amount
dstAmountuintNOdestination ERC20 token amount
destAddressERC20NOrecipient address for destination ERC20 token
ethWeiValueuintNOEther wei value of the trade
reserve1addressNOaddress of reserve selected for source token to Ether trade
reserve2addressNOaddress of reserve selected for source token to Ether trade
hintbytesNOused to determine if permissionless reserves are to be used

Event Signature: 0xc703a55592b46364d149bd9ee9d59e08774a51cb38b46db03c48c35d609de891

ListReservePairs

Event is emitted when a token pair is listed for a reserve.


event ListReservePairs(address reserve, ERC20 src, ERC20 dest, bool add)

ParameterTypeIndexedDescription
reserveaddressNOreserve's contract address
srcERC20NOsource ERC20 token contract address
destERC20NOdestination ERC20 token contract address
addboolNOtrue if token pair is listed, false otherwise

Event Signature: 0x2dfce48e0e90a69a2044596f70be4cf5e451551a7fd18923e7032698c576a481

RemoveReserveFromNetwork

Event is emitted when a reserve has been removed from the network.


event RemoveReserveFromNetwork(KyberReserveInterface reserve)

ParameterTypeIndexedDescription
reserveKyberReserveInterfaceNOreserve's contract address

Event Signature: 0xd55b897e097ceaa20b9ce761af21fcc289b41a6449c116b5852b43dc7a7b1d9e

KyberReserve

Contract Address: 0x63825c174ab367968EC60f061753D3bbD36A0D8F
Other Reserves: Visit our tracker to see other reserve addresses.
Source: KyberReserve.sol

DepositToken

Event is emitted when the contract receives the token deposit.


event DepositToken(ERC20 token, uint amount)

ParameterTypeIndexedDescription
tokenERC20NOERC20 token contract address
amountuintNOERC20 token amount in wei

Event Signature: 0x4657b0051454ee8dd3ec9b6fe102b331eedeff7bb901973f7c1fce5a063be38d

TradeEnabled

Event is emitted when trading is enabled for the reserve.


event TradeEnabled(bool enable)

ParameterTypeIndexedDescription
enableboolNOtrue if reserve is enabled, otherwise false if disabled

Event Signature: 0x7d7f00509dd73ac4449f698ae75ccc797895eff5fa9d446d3df387598a26e735

TradeExecute

Event is emitted when the reserve has executed a trade.


event TradeExecute(address indexed origin, address src, uint srcAmount, address destToken, uint destAmount, address destAddress)

ParameterTypeIndexedDescription
originaddressYESsender's address
srcaddressNOsource ERC20 token contract address
srcAmountuintNOwei amount of source ERC20 tokens
destTokenaddressNOdestination ERC20 token contract address
destAmountuintNOwei amount of destination ERC20 tokens
destAddressaddressNOrecipient address for destination ERC20 tokens

Event Signature: 0x17c18c623efd0b73eacfa87d8afe39aa7c60b07d9e8bade6a436cd0d2db227bc

WithdrawFunds

Event is emitted with funds are withdrawn from the reserve.


event WithdrawFunds(ERC20 token, uint amount, address destination)

ParameterTypeIndexedDescription
tokenERC20NOERC20 token contract address
amountuintNOwei amount of tokens that was withdrawn
destinationaddressNOrecipient address of withdrawn funds

Event Signature: 0x2810ccd05e0b14eda28bdc2f92ed6827c094784658981adfbd24b84a7a1232b6

OrderbookReserve

Contract Address: 0x9D27a2D71Ac44E075f764d5612581E9Afc1964fd
Other Reserves: Check the KyberNetwork contract to see other OR addresses.
Source: OrderbookReserve.sol

OrderbookReserveTrade

Event is emitted when a trade is executed on this orderbook reserve.


event OrderbookReserveTrade(ERC20 srcToken, ERC20 dstToken, uint srcAmount, uint dstAmount)

ParameterTypeIndexedDescription
srcTokenERC20NOsource ERC20 token contract address
dstTokenERC20NOdestination ERC20 token contract address
srcAmountuintNOsource ERC20 token amount in its token decimals
dstAmountuintNOdestination ERC20 token amount in its token decimals

Event Signature: 0xcdc27ac99feb78c4be95e090e9630950d315ab88bc119a0b24c3510a4aeed5aa

NewLimitOrder

Event is emitted when a limit order is submitted.


event NewLimitOrder(address indexed maker, uint32 orderId, bool isEthToToken, uint128 srcAmount, uint128 dstAmount, bool addedWithHint)

ParameterTypeIndexedDescription
makeraddressYESmaker wallet or contract address
orderIduint32NOorder ID
isEthToTokenboolNOtrue if Ether to token order submitted, false otherwise
srcAmountuint128NOsource ERC20 token amount in its token decimals
dstAmountuint128NOdestination ERC20 token amount in its token decimals
addedWithHintboolNOtrue if order was added with a hint, false otherwise

Event Signature: 0x2fb3fe66d41cb2d1b0d335656d86e7c779ebdc34c6f6fc806d35790a30be0e6d

OrderCanceled

Event is emitted when an existing order is cancelled.


event OrderCanceled(address indexed maker, bool isEthToToken, uint32 orderId, uint128 srcAmount, uint dstAmount)

ParameterTypeIndexedDescription
makeraddressYESmaker wallet or contract address
isEthToTokenboolNOrrue if Ether to token order submitted, false otherwise
orderIduint32NOorder ID
srcAmountuint128NOupdated source ERC20 token amount in its token decimals
dstAmountuintNOupdated destination ERC20 token amount in its token decimals

Event Signature: 0x7ae8b8ff3921236245be9b44d05005a86769cb1b8270134644231d0bfcf0e5b4

FullOrderTaken

Event is emitted when the full amount of a limit order is taken.


event FullOrderTaken(address maker, uint32 orderId, bool isEthToToken)

ParameterTypeIndexedDescription
makeraddressNOmaker wallet or contract address
orderIduint32NOorder ID
isEthToTokenboolNOtrue if Ether to token order submitted, false otherwise

Event Signature: 0xfc2eaa59b7259e4eb0ce92d7a86fce8b0fb67fade6f9f69df98f4771035a50c2

PartialOrderTaken

Event is emitted when a partial amount of a limit order is taken.


event PartialOrderTaken(address maker, uint32 orderId, bool isEthToToken, bool isRemoved)

ParameterTypeIndexedDescription
makeraddressNOmaker wallet or contract address
orderIduint32NOorder ID
isEthToTokenboolNOtrue if Ether to token order submitted, false otherwise
isRemovedboolNOtrue if order is removed from order list (because remaining order value is too low), false otherwise

Event Signature: 0xd499cca7d46b5236c2cb522ceec930ccf485eefca1f0472c020a1b7328bf0643

FeeBurner

Contract Address: 0x8007aa43792A392b221DC091bdb2191E5fF626d1
Past Contract Addresses:
v3 - 0x52166528FCC12681aF996e409Ee3a421a4e128A3,
v2 - 0xed4f53268bfdFF39B36E8786247bA3A02Cf34B04,
v1 - 0x07f6e905f2a1559cd9fd43cb92f8a1062a3ca706
Source: FeeBurner.sol

AssignBurnFees

Event is emitted when fees for burning are assigned for a reserve.


event AssignBurnFees(address reserve, uint burnFee)

ParameterTypeIndexedDescription
reserveaddressNOreserve's contract address
burnFeeuintNOamount of fees to be burned in wei

Event Signature: 0x5c1732643e51749f7e7eaa4a0f69da863bdf73c15f001f6ac949720ca55712f5

AssignFeeToWallet

Event is emitted when fees for fee sharing are assigned for a reserve.


event AssignFeeToWallet(address reserve, address wallet, uint walletFee)

ParameterTypeIndexedDescription
reserveaddressNOreserve's contract address
walletaddressNOwallet address to send fees to
walletFeeuintNOamount of fees to be assigned to wallet address

Event Signature: 0xc5b4f804c74a3d9bef06efa07fff2ce3b711db45050767096e163351dec86aab

BurnAssignedFees

Event is emitted when fees are burned.


event BurnAssignedFees(address indexed reserve, address sender, uint quantity)

ParameterTypeIndexedDescription
reserveaddressYESreserve's contract address
senderaddressNOsender's address
quantityuintNOamount of assigned fees to be burned

Event Signature: 0x64d878755be961ce3f351c91a68748ac3d1f4c49829f54e858a05bb84abad1f9

SendWalletFees

Event is emitted when fees are sent to a wallet as part of the fee sharing program.


event SendWalletFees(address indexed wallet, address reserve, address sender)

ParameterTypeIndexedDescription
walletaddressYESreserve's specified wallet address
reserveaddressNOreserve's contract address
senderaddressNOsender's address

Event Signature: 0xb3f3e7375c0c0c4f7dd94069a5a4e68667827491318da786c818b8c7a794924e

← Price Feed SecurityFee Sharing Program →
  • Introduction
  • Tracking Guide
    • Events to track volume and trade history
    • Events to track Price Feed Reserve (PFR) and Automated Price Reserve (APR) statistics
    • Events to track Permissionless Orderbook Reserve (POR) statistics
    • Events to track fees
  • Events
    • KyberNetworkProxy
    • ExecuteTrade
    • KyberNetwork
    • AddReserveToNetwork
    • KyberNetworkSetEnable
    • KyberTrade
    • ListReservePairs
    • RemoveReserveFromNetwork
    • KyberReserve
    • DepositToken
    • TradeEnabled
    • TradeExecute
    • WithdrawFunds
    • OrderbookReserve
    • OrderbookReserveTrade
    • NewLimitOrder
    • OrderCanceled
    • FullOrderTaken
    • PartialOrderTaken
    • FeeBurner
    • AssignBurnFees
    • AssignFeeToWallet
    • BurnAssignedFees
    • SendWalletFees
KyberDeveloper · Powering Liquidity for the Ecosystem
EssentialsGetting StartedDesign PrinciplesProtocol OverviewSmart Contract Architecture
IntegrationsDAppsVendorsWalletsFee Sharing
ReservesFed PriceAutomated PriceOrderbook
© 2019 Kyber Network. All rights reserved.
Follow us on Facebook
Follow us on Twitter
Follow us on Github
Follow us on Reddit
Join our Telegram group
Subscribe to our Youtube channel
Read our blog on Medium