Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 839 Bytes

Kyber getRates code is unclear.md

File metadata and controls

21 lines (18 loc) · 839 Bytes

Function names don't reflect their true functionalities, and the code uses some undocumented assumptions.

Recommendation:

Refactor the code to separate getting rate functionality with getSellRate and getBuyRate. Explicitly document any assumptions in the code (slippage, etc).

Slide Screenshot

105.jpg


Slide Text

  • ConsenSys Audit DeFi Saver Finding 5.6
  • Naming/Documentation/Refactoring
  • Misleading Function Names & Assumptions
  • Refactor Code Document Assumptions

References


Tags