Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
Given two codebases, slither should be able to detect the similar functions/contracts
A naive approach could be to only compare the AST of the functions.
We can also have a more sophisticated approach, where we abstract the name of the variables/functions and compare an high-level signature of the functions. The academic literature is rich on this domain, so this work could lead to even more experimental solutions (ex: using machine learning to build a similarity metric, ...), but the naive approach should be the first step.
The solution can be implemented as a printer, or as an external tool. It would be nice to be able to build a large database of similar functions/contracts across multiples projects.
It migh also be useful for code review (ex: if someone uses a slightly modified version of SafeMath, the code needs additional consideration)
I am open to any suggestions/ideas