Request form
Kyber Network
  • DEX
  • Trading
  • Liquidity
  • Protocol
Docs
Source
ChefGPT

Multichain DEX & aggregator on 14 chains. KyberSwap is both a decentralized exchange (DEX) aggregator and a liquidity source with capital-efficient liquidity pools that earns fees for liquidity providers.

TokenReverseSend.sol
TestToken.sol
TransferHelper.sol
IUniswapV2Factory.sol
IUniswapV2Pair.sol
UniswapV2Router02.sol
IERC20.sol
IUniswapV2Router01.sol
IUniswapV2Router02.sol
IWETH.sol
SafeMath.sol
UniswapV2Library.sol
DaoOperator.sol
EpochUtils.sol
IEpochUtils.sol
IKyberStaking.sol
ISanityRate.sol
KyberDao.sol
KyberFeeHandler.sol
KyberStaking.sol
EmergencyFeeHandler.sol
KyberFeeHandlerWrapper.sol
KyberTokenFeeHandler.sol
MaliciousFeeHandler.sol
MockChainLinkSanityRate.sol
MockContractCallBurnKNC.sol
MockEmergencyFeeHandler.sol
MockKyberDaoMoreGetters.sol
MockKyberDaoTestHandleWithdrawal.sol
MockKyberDaoWithdrawFailed.sol
MockKyberStaking.sol
MockKyberStakingMalicious.sol
MockMaliciousKyberDao.sol
MockMaliciousKyberDaoReentrancy.sol
MockStakerClaimRewardReentrancy.sol
IBurnableToken.sol
IERC20.sol
IGasHelper.sol
IKyberDao.sol
IKyberFeeHandler.sol
IKyberHint.sol
IKyberHistory.sol
IKyberMatchingEngine.sol
IKyberNetwork.sol
IKyberNetworkProxy.sol
IKyberReserve.sol
IKyberSanity.sol
IKyberStorage.sol
ISimpleKyberProxy.sol
KyberHintHandler.sol
KyberHistory.sol
KyberMatchingEngine.sol
KyberNetwork.sol
KyberNetworkProxy.sol
KyberStorage.sol
SanityRatesGasPrice.sol
KyberUniswapV2Reserve.sol
MockUniswapRouter.sol
GasHelper.sol
GenerousKyberNetwork.sol
GenerousKyberNetwork2.sol
KyberNetworkNoMaxDest.sol
MaliciousKyberDao.sol
MaliciousKyberNetwork.sol
MaliciousKyberNetwork2.sol
MaliciousMatchingEngine.sol
MaliciousReserve2.sol
MaliciousStorage.sol
MockConversionRates.sol
MockGasHelper.sol
MockHintHandler.sol
MockKyberDao.sol
MockMatchingEngine.sol
MockNetwork.sol
MockPermissionGroups3.sol
MockPermissionGroupsNoModifiers.sol
MockReserve.sol
MockSanityRates.sol
MockStorage.sol
MockTrader.sol
MockUtils5.sol
MockWithdrawable3.sol
MockWithdrawableNoModifiers.sol
ReentrancyAttack.sol
ReentrancyFeeClaimer.sol
ReentrancyMock.sol
ReentrantReserve.sol
ReserveNoReturnVal.sol
ReserveReturnFalse.sol
SimpleKyberProxy.sol
IConversionRates.sol
IWeth.sol
KyberFprReserveV2.sol
PermissionGroups3.sol
PermissionGroupsNoModifiers.sol
Utils5.sol
Withdrawable3.sol
WithdrawableNoModifiers.sol
Address.sol
ReentrancyGuard.sol
SafeERC20.sol
SafeMath.sol
IKyberRateHelper.sol
KyberRateHelper.sol
DummyDGX.sol
DummyDGXStorage.sol
TokenReceiver.sol
DemurrageStructs.sol
MathUtils.sol
TransferStructs.sol
Types.sol
TokenNoDecimals.sol
TestBytes32.sol
MockNotPayableContract.sol
TestTokenNotReturn.sol
Migrations.sol
WETH9.sol
MockWeth.sol
MockMedianizer.sol
TestTokenFailing.sol
Token.sol
NoPayableFallback.sol
MockOtcOrderbook.sol
WethToken.sol
Token.sol
IERC20.sol
IKyberReserve.sol
KyberBancorReserve.sol
IBancorNetwork.sol
MockBancorNetwork.sol
Eth2DaiReserve.sol
IOtc.sol
MockPermissionGroups2.sol
MockUtils4.sol
MockWithdrawable2.sol
PermissionGroups2.sol
Utils4.sol
Withdrawable2.sol
ConversionRatesInterface.sol
ERC20Interface.sol
FeeBurnerInterface.sol
KyberNetworkInterface.sol
KyberNetworkProxyInterface.sol
KyberProxyV1.sol
KyberReserveInterface.sol
PermissionGroups.sol
SanityRates.sol
SanityRatesInterface.sol
SimpleNetworkInterface.sol
Utils.sol
Utils2.sol
Utils3.sol
Withdrawable.sol
ConversionRatesEnhancedOpen.sol
MaliciousReserve.sol
MockCentralBank.sol
MockConversionRate.sol
MockConversionRateEnhancedSteps.sol
MockDepositAddress.sol
MockDepositAddressEther.sol
MockDepositAddressToken.sol
MockERC20.sol
MockEnhancedStepFunctions.sol
MockExchange.sol
MockImbalanceRecorder.sol
MockKyberReserveHighRate.sol
MockPermission.sol
MockUtils.sol
MockUtils2.sol
MockUtils3.sol
MockWithdrawable.sol
StrictValidatingReserve.sol
TempBank.sol
KyberReserveV1.sol
KyberReserve.sol
KyberReserveHighRate.sol
VolumeImbalanceRecorder.sol
LiquidityConversionRates.sol
LiquidityFormula.sol
KyberDutchXReserve.sol
MockDutchX.sol
KyberUniswapReserve.sol
KyberTestingUniswapReserve.sol
MockUniswapFactory.sol
ConversionRateEnhancedSteps.sol
ConversionRates.sol
OrderIdManager.sol
OrderList.sol
OrderListFactory.sol
OrderListFactoryInterface.sol
OrderListInterface.sol
OrderbookReserve.sol
OrderbookReserveInterface.sol
PermissionlessOrderbookReserveLister.sol
MockOrderIdManager.sol
MockOrderbookReserve.sol
KyberWethReserve.sol
SetStepFunctionWrapper.sol
WrapConversionRate.sol
WrapConversionRateEnhancedSteps.sol
WrapReadTokenData.sol
Wrapper.sol
WrapperBase.sol
TestTokenTransferFailing.sol

TVL

$.NaK

1 downloads

Chains

Authors

Kyber Network
  • DEX
  • Trading
  • Liquidity
  • Protocol
Info
Source
ChefGPT
Expand
Share

Get Cookin'

1 downloads

Chains

Authors

Introduction

This repository contains kyber network smart contracts. For more details, please visit our developer portal

API

Public facing interfaces for kyber network (folder: contracts/sol6):

  1. IKyberNetworkProxy.sol - Get rate and trade APIs. Hint handler address.
  2. ISimpleKyberProxy.sol - Simple trade functions.
  3. IKyberHintHandler.sol - Build hints for advanced trade functionality.
  4. IKyberDao - Interact with KyberDao.
  5. Dao/IKyberStaking - interact with KyberStaking.

Setup

  1. Clone this repo
  2. npm ci

Compilation with Buidler

  1. ./cmp.sh to compile contracts for all solidity versions.
  2. ./cmpSol6.sh to compile only sol6 contracts

Testing with Buidler

  1. If contracts have not been compiled, run ./cmp.sh. This step can be skipped subsequently.
  2. Run ./tst.sh
  3. Use -f for running a specific test file.
  4. Use -a to run tests for all solidity versions. Runs only sol6 tests by default.

Example Commands

./tst.sh (Run only sol6 tests) ./tst.sh -f ./test/sol4/kyberReserve.js (Test only kyberReserve.js) ./tst.sh -a (Run sol4, sol5, sol6 tests)

Example

npx buidler test --no-compile ./test/sol6/kyberNetwork.js

Coverage with buidler-coverage

  1. Run ./coverage.sh
  2. Use -f for running a specific test file.

Example Commands

./coverage.sh -f ./test/sol6/kyberNetwork.js (Coverage for only kyberNetwork.js)

Multichain DEX & aggregator on 14 chains. KyberSwap is both a decentralized exchange (DEX) aggregator and a liquidity source with capital-efficient liquidity pools that earns fees for liquidity providers.
TokenReverseSend.sol
TestToken.sol
TransferHelper.sol
IUniswapV2Factory.sol
IUniswapV2Pair.sol
UniswapV2Router02.sol
IERC20.sol
IUniswapV2Router01.sol
IUniswapV2Router02.sol
IWETH.sol
SafeMath.sol
UniswapV2Library.sol
DaoOperator.sol
EpochUtils.sol
IEpochUtils.sol
IKyberStaking.sol
ISanityRate.sol
KyberDao.sol
KyberFeeHandler.sol
KyberStaking.sol
EmergencyFeeHandler.sol
KyberFeeHandlerWrapper.sol
KyberTokenFeeHandler.sol
MaliciousFeeHandler.sol
MockChainLinkSanityRate.sol
MockContractCallBurnKNC.sol
MockEmergencyFeeHandler.sol
MockKyberDaoMoreGetters.sol
MockKyberDaoTestHandleWithdrawal.sol
MockKyberDaoWithdrawFailed.sol
MockKyberStaking.sol
MockKyberStakingMalicious.sol
MockMaliciousKyberDao.sol
MockMaliciousKyberDaoReentrancy.sol
MockStakerClaimRewardReentrancy.sol
IBurnableToken.sol
IERC20.sol
IGasHelper.sol
IKyberDao.sol
IKyberFeeHandler.sol
IKyberHint.sol
IKyberHistory.sol
IKyberMatchingEngine.sol
IKyberNetwork.sol
IKyberNetworkProxy.sol
IKyberReserve.sol
IKyberSanity.sol
IKyberStorage.sol
ISimpleKyberProxy.sol
KyberHintHandler.sol
KyberHistory.sol
KyberMatchingEngine.sol
KyberNetwork.sol
KyberNetworkProxy.sol
KyberStorage.sol
SanityRatesGasPrice.sol
KyberUniswapV2Reserve.sol
MockUniswapRouter.sol
GasHelper.sol
GenerousKyberNetwork.sol
GenerousKyberNetwork2.sol
KyberNetworkNoMaxDest.sol
MaliciousKyberDao.sol
MaliciousKyberNetwork.sol
MaliciousKyberNetwork2.sol
MaliciousMatchingEngine.sol
MaliciousReserve2.sol
MaliciousStorage.sol
MockConversionRates.sol
MockGasHelper.sol
MockHintHandler.sol
MockKyberDao.sol
MockMatchingEngine.sol
MockNetwork.sol
MockPermissionGroups3.sol
MockPermissionGroupsNoModifiers.sol
MockReserve.sol
MockSanityRates.sol
MockStorage.sol
MockTrader.sol
MockUtils5.sol
MockWithdrawable3.sol
MockWithdrawableNoModifiers.sol
ReentrancyAttack.sol
ReentrancyFeeClaimer.sol
ReentrancyMock.sol
ReentrantReserve.sol
ReserveNoReturnVal.sol
ReserveReturnFalse.sol
SimpleKyberProxy.sol
IConversionRates.sol
IWeth.sol
KyberFprReserveV2.sol
PermissionGroups3.sol
PermissionGroupsNoModifiers.sol
Utils5.sol
Withdrawable3.sol
WithdrawableNoModifiers.sol
Address.sol
ReentrancyGuard.sol
SafeERC20.sol
SafeMath.sol
IKyberRateHelper.sol
KyberRateHelper.sol
DummyDGX.sol
DummyDGXStorage.sol
TokenReceiver.sol
DemurrageStructs.sol
MathUtils.sol
TransferStructs.sol
Types.sol
TokenNoDecimals.sol
TestBytes32.sol
MockNotPayableContract.sol
TestTokenNotReturn.sol
Migrations.sol
WETH9.sol
MockWeth.sol
MockMedianizer.sol
TestTokenFailing.sol
Token.sol
NoPayableFallback.sol
MockOtcOrderbook.sol
WethToken.sol
Token.sol
IERC20.sol
IKyberReserve.sol
KyberBancorReserve.sol
IBancorNetwork.sol
MockBancorNetwork.sol
Eth2DaiReserve.sol
IOtc.sol
MockPermissionGroups2.sol
MockUtils4.sol
MockWithdrawable2.sol
PermissionGroups2.sol
Utils4.sol
Withdrawable2.sol
ConversionRatesInterface.sol
ERC20Interface.sol
FeeBurnerInterface.sol
KyberNetworkInterface.sol
KyberNetworkProxyInterface.sol
KyberProxyV1.sol
KyberReserveInterface.sol
PermissionGroups.sol
SanityRates.sol
SanityRatesInterface.sol
SimpleNetworkInterface.sol
Utils.sol
Utils2.sol
Utils3.sol
Withdrawable.sol
ConversionRatesEnhancedOpen.sol
MaliciousReserve.sol
MockCentralBank.sol
MockConversionRate.sol
MockConversionRateEnhancedSteps.sol
MockDepositAddress.sol
MockDepositAddressEther.sol
MockDepositAddressToken.sol
MockERC20.sol
MockEnhancedStepFunctions.sol
MockExchange.sol
MockImbalanceRecorder.sol
MockKyberReserveHighRate.sol
MockPermission.sol
MockUtils.sol
MockUtils2.sol
MockUtils3.sol
MockWithdrawable.sol
StrictValidatingReserve.sol
TempBank.sol
KyberReserveV1.sol
KyberReserve.sol
KyberReserveHighRate.sol
VolumeImbalanceRecorder.sol
LiquidityConversionRates.sol
LiquidityFormula.sol
KyberDutchXReserve.sol
MockDutchX.sol
KyberUniswapReserve.sol
KyberTestingUniswapReserve.sol
MockUniswapFactory.sol
ConversionRateEnhancedSteps.sol
ConversionRates.sol
OrderIdManager.sol
OrderList.sol
OrderListFactory.sol
OrderListFactoryInterface.sol
OrderListInterface.sol
OrderbookReserve.sol
OrderbookReserveInterface.sol
PermissionlessOrderbookReserveLister.sol
MockOrderIdManager.sol
MockOrderbookReserve.sol
KyberWethReserve.sol
SetStepFunctionWrapper.sol
WrapConversionRate.sol
WrapConversionRateEnhancedSteps.sol
WrapReadTokenData.sol
Wrapper.sol
WrapperBase.sol
TestTokenTransferFailing.sol