Contract Events
You are referring to the Legacy
version of KyberSwap docs.
For the most updated information, please refer to:
Classic
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, platform fees, reserve rebates, KNC burnt 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.
Volume and Trade Events
The ExecuteTrade
event is emitted by the KyberNetworkProxy contracts.
The KyberTrade
event is emitted by the KyberNetwork contracts.
Fee Tracking Events
The following events are emitted by the KyberFeeHandler contract(s).
Events to track Fed Price Reserve (FPR) and Automated Price Reserve (APR) statistics
These events are emitted by the FPRs and APRs.
Historical Events
These events are no longer emitted, but remain documented.
Contract Address: 0x9AAb3f75489902f3a48495025729a0AF77d4b11e Source: KyberNetworkProxy.sol
ExecuteTrade (V2)
ExecuteTrade (V2)
Event is emitted when a trade is executed.
event ExecuteTrade(address indexed trader, IERC20 src, IERC20 dest, address destAddress, uint256 actualSrcAmount, uint256 actualDestAmount, address platformWallet, uint256 platformFeeBps)
Event Signature: 0xf724b4df6617473612b53d7f88ecc6ea983074b30960a049fcd0657ffe808083
Contract Address: 0x818E6FECD516Ecc3849DAf6845e3EC868087B755 Source: KyberNetworkProxy.sol
ExecuteTrade (V1)
ExecuteTrade (V1)
Event is emitted when a trade is executed.
event ExecuteTrade(address indexed sender, ERC20 src, ERC20 dest, uint actualSrcAmount, uint actualDestAmount)
Event Signature: 0x1849bd6a030a1bca28b83437fd3de96f3d27a5d172fa7e9c78e7b61468928a39
Contract Address: 0x7C66550C9c730B6fdd4C03bc2e73c5462c5F7ACC Source: KyberNetwork.sol
KyberTrade (V2)
KyberTrade (V2)
Emitted when a trade is executed in the internal network.
event KyberTrade(IERC20 indexed src, ERC20 indexed dest, uint256 ethWeiValue, uint256 networkFeeWei, uint256 customPlatformFeeWei, bytes32[] t2eIds, bytes32[] e2tIds, uint256[] t2eSrcAmounts, uint256[] e2tSrcAmounts, uint256[] t2eRates, uint256[] e2tRates)
Event Signature: 0xc6efb0df0b5d684cd6482e00270d068229ca5833634798e25f85b79eee5183f9
Note
For token to token trades, the
ethWeiValue
will be just 1 side of the trade. As an example, X KNC -> 10 ETH -> Y DAI yieldsethWeiValue = 10e18
.
Contract Address: 0xd3d2b5643e506c6d9B7099E9116D7aAa941114fe Source: KyberFeeHandler.sol
FeeDistributed
FeeDistributed
Emitted when there are fees to be given to various parties, based on the BRR distribution determined by the KyberDAO.
event FeeDistributed(IERC20 indexed token, address indexed platformWallet, uint256 platformFeeWei, uint256 rewardWei, uint256 rebateWei, address[] rebateWallets, uint256[] rebatePercentBpsPerWallet, uint256 burnAmtWei)
Event Signature: 0xd66a6cfa04148d5e34fd3da6bbabc8a7e6c9ebffb1638f00e9c35d67b51c6bd2
BRRUpdated
BRRUpdated
Emitted when there is a change made to the BRR distribution, as determined by the KyberDAO.
event BRRUpdated(uint256 rewardBps, uint256 rebateBps, uint256 burnBps, uint256 expiryTimestamp, uint256 indexed epoch)
Event Signature: 0x90da252e8e1873b40c0a15bba09620de70b1550bcd36e796175beb6f259c797d
KNCBurned
KNCBurned
Emitted when KNC has been burnt.
event KncBurned(uint256 kncTWei, IERC20 indexed token, uint256 amount)
Event Signature: 0xd66a6cfa04148d5e34fd3da6bbabc8a7e6c9ebffb1638f00e9c35d67b51c6bd2
RewardsRemovedToBurn
RewardsRemovedToBurn
Emitted when an entire epoch's reward has been allocated for burning KNC (Eg. epoch 0).
event RewardsRemovedToBurn(uint256 indexed epoch, uint256 rewardsWei)
Event Signature: 0x11c852d8be537f120b8d4b4d5c3c211870522fd96a8bd9fa51d102774077a51b
Contract Address: 0x63825c174ab367968EC60f061753D3bbD36A0D8F Other Reserves: Visit our tracker to see other reserve addresses. Source: KyberReserve.sol
DepositToken
DepositToken
Event is emitted when the contract receives the token deposit.
event DepositToken(ERC20 token, uint amount)
Event Signature: 0x2d0c0a8842b9944ece1495eb61121621b5e36bd6af3bba0318c695f525aef79f
TradeEnabled
TradeEnabled
Event is emitted when trading is enabled for the reserve.
event TradeEnabled(bool enable)
Event Signature: 0x7d7f00509dd73ac4449f698ae75ccc797895eff5fa9d446d3df387598a26e735
TradeExecute
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)
Event Signature: 0xea9415385bae08fe9f6dc457b02577166790cde83bb18cc340aac6cb81b824de
WithdrawFunds
WithdrawFunds
Event is emitted with funds are withdrawn from the reserve.
event WithdrawFunds(ERC20 token, uint amount, address destination)
Event Signature: 0xb67719fc33c1f17d31bf3a698690d62066b1e0bae28fcd3c56cf2c015c2863d6
KyberNetwork (Old)
Past Contract Addresses: v4 - 0x65bF64Ff5f51272f729BDcD7AcFB00677ced86Cd v3 - 0x9ae49C0d7F8F9EF4B864e004FE86Ac8294E20950 v2 - 0x91a502C678605fbCe581eae053319747482276b9 v1 - 0x964F35fAe36d75B1e72770e244F6595B68508CF5
KyberTrade (V1)
KyberTrade (V1)
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)
Event Signature: 0xd30ca399cb43507ecec6a629a35cf45eb98cda550c27696dcb0d8c4a3873ce6c
FeeBurner
Past Contract Addresses: v4 - 0x8007aa43792A392b221DC091bdb2191E5fF626d1 v3 - 0x52166528FCC12681aF996e409Ee3a421a4e128A3 v2 - 0xed4f53268bfdFF39B36E8786247bA3A02Cf34B04 v1 - 0x07f6e905f2a1559cd9fd43cb92f8a1062a3ca706
AssignBurnFees
AssignBurnFees
Event is emitted when fees for burning are assigned for a reserve.
event AssignBurnFees(address reserve, uint burnFee)
Event Signature: 0xf838f6ddc89706878e3c3e698e9b5cbfbf2c0e3d3dcd0bd2e00f1ccf313e0185
AssignFeeToWallet
AssignFeeToWallet
Event is emitted when fees for fee sharing are assigned for a reserve.
event AssignFeeToWallet(address reserve, address wallet, uint walletFee)
Event Signature: 0x366bc34352215bf0bd3b527cfd6718605e1f5938777e42bcd8ed92f578368f52
BurnAssignedFees
BurnAssignedFees
Event is emitted when fees are burned.
event BurnAssignedFees(address indexed reserve, address sender, uint quantity)
Event Signature: 0x2f8d2d194cbe1816411754a2fc9478a11f0707da481b11cff7c69791eb877ee1
SendWalletFees
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)
Event Signature: 0xb3f3e7375c0c0c4f7dd94069a5a4e68667827491318da786c818b8c7a794924e
Last updated