smart-contracts icon indicating copy to clipboard operation
smart-contracts copied to clipboard

Main smart contracts for Kyber Network, including the main platform contract, reserve contracts etc.

Results 46 smart-contracts issues
Sort by recently updated
recently updated
newest added

get rate should not revert. only return 0

current contract verification code is in file: readVerifyDeployment.js in web3deployment folder. https://github.com/KyberNetwork/smart-contracts/blob/master/web3deployment/readVerifyDeployment.js This file does many checks on our setup. most of those checks are already done in other places....

currently lister can lisit any new token for a reserve. many reserves were listed but currently don't support any orders. should add an option for lister to unlist reserve that...

In present implementation it might revert.

Sanity Rate Contract

When calling getConversionRate with srcAmount 0, some reserves revert. On simple trade (not token to token) getExpectedRate modifies srcAmount 0 to 1, to avoid divide by 0. Token to token...

Current trade flow (assuming maxDestAmount is valid): 1. network query rate from reserve with src amount. rate result name _networkRate_ 3. _actualSrcAmount_ = destAmount / _networkRate_ 4. call reserve.trade with...

currently a few reserves (uniswap, permission less, more...) if srcAmount is 0 it reverts (division by 0)

Reserve contract

For permission less tokens, Kyber has no control over the listed tokens. this enables any token to be listed. including scam tokens, and worse then that. tokens that attack kyber...

in conversion rate. https://github.com/KyberNetwork/smart-contracts/blob/02094d33d8d552adf8b4e58fbf38a3aabf27d12d/contracts/ConversionRates.sol#L227 call to getTokenQty(token, rate, qty); rate and qty are swapped should be replaced by getTokenQty(token, qty, rate); thanks to @namnm1991 for finding this bug...

Conversion Rate contract

Assigning to function parameters should be avoided. Two occurences of this can be found in KYBER.NETWORK, specifically in the ConversionRates contract: • In the recordImbalance function, the argument rateUpdateBlock is...

Conversion Rate contract