# C0rv0s C0rv0s is a long-standing dOrg member who has contributed to several different projects like Boardroom, RayDAO, Badger, among others. He's worked for a long time in closed-source but has open source contributions to Badger (of almost 2 years ago) and UniBot (around 3 years ago). ## Uni Bot: In-depth analysis ### Statistics: * Total lines: 1,200 * Contribution = 40.76% ### Automated analysis results: - General assessment: https://sonarcloud.io/summary/overall?id=namesty_Uni-Bot-Fork - Main points of improvement: https://sonarcloud.io/project/issues?authors=inathan.m%40gmail.com&resolved=false&severities=CRITICAL&types=CODE_SMELL&id=namesty_Uni-Bot-Fork #### Conclusions and observations - Keep in mind that this is a very small codebase (only a bit over 1k lines) - There are no reliability or security bugs - Absolutely no code duplication - All ratings are "A" - The maintainability score is "A". However, taking a look at the code smells that exist, they're important, considering the size of the codebase/project: - Some variables are declared as globals by not stating a declaration keyword: https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=namesty_Uni-Bot-Fork&open=AYe1rX1yTS0bR0c5nHPx - Some variables are scoped to the function they're in, which is a deprecated practice, as it doesn't correspond to the usual scope variables live in: https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=namesty_Uni-Bot-Fork&open=AYe1rX14TS0bR0c5nHPy - Global configurations that change according to the environment are not stated as ENV variables: https://sonarcloud.io/project/issues?authors=inathan.m%40gmail.com&resolved=false&types=CODE_SMELL&id=namesty_Uni-Bot-Fork&open=AYe1rX2STS0bR0c5nHP9. This also applies to DB connection data. - The cognitive complexity of this function is too high, and its design (which is one of the app's core features) is very difficult to maintain, read and debug: https://sonarcloud.io/project/issues?authors=inathan.m%40gmail.com&resolved=false&types=CODE_SMELL&id=namesty_Uni-Bot-Fork&open=AYe1rX1fTS0bR0c5nHPv. ### Human analysis results: #### Positive highlights: - Trade execution logic looks well done: https://github.com/dOrgTech/UniBot/blob/main/src/TradeExecution.js - Correct handling of numbers using BigNumber. - The tooling choice also looks correct: Uniswap's SDK + ethers.js - There's also a correct modelling of the data into a relational database. - Very standard scaffolding organization for a Node project #### Points of improvement: - Code should be tested - DB connection data should probably be put in an ENV file, along with other config like PORT - App should probably be dockerized for faster and easier reproducibility, portability, deployment and testing - Refactor: https://github.com/dOrgTech/UniBot/blob/main/src/LiqListener.js ## Badger contributions: https://github.com/Badger-Finance/badger-system/commits/master?author=c0rv0s ### Contribution highlights: - Shows good Python proficiency/expertise - Code looks clean and readable - Abstracts logic into reusable functions to reduce code-duplication: https://github.com/Badger-Finance/badger-system/commit/a487e9cc1ab36792910afeca71eebfa50922d431 - Wrote tests: https://github.com/Badger-Finance/badger-system/commit/71fa5f1d2425b6514b5e68cc51793ed6ae5b685a