ref-finance / ref-contracts

Smart contracts for Ref Finance
MIT License
96 stars 55 forks source link

Audit 0.2.1 #38

Closed marco-sundsk closed 2 years ago

marco-sundsk commented 2 years ago

Ref exchange audit

  1. MAX_ACCOUNT_LENGTH is incorrect -- fixed;
  2. u128 can not be correctly serialized -- fixed;
  3. execute_actions should verify actions number -- reject to enable nope action;
  4. execute_actions is not payable -- fixed;
  5. Wrong error code in execute_actions -- fixed;
  6. parse_token_id logic may cause problem. -- fixed;

    using :nn as a partern of pool lpt token

  7. mft_transfer may cause problem. -- fixed;
  8. Use different spec for MFT -- fixed;
  9. migrate is not private -- fixed;
  10. Simple pool can be created with 0 tokens. -- fixed;
  11. LookupMap shares prefix issue -- fixed with StorageKey;
  12. Ability to drain the pool without paying using instant swap. -- fixed;
  13. Never unregister a LP when he remove liqudity.
  14. shutdown instant swap from the interface;