Intro/Inspiration:

In 2017, Alireza worked on syntactic/semantic searching in a Python code base. After learning solidity this summer, he realized the potential application of my old idea on smart contracts. He wanted to write a new script to integrate pattern matching and semantics/syntax search for solidity smart contracts. With an advanced search tool, you can mine, parse, and refactor data, identify vulnerabilities, plot trends over time, cluster and automate groups, more easily update code after an update, and many more things. In short, a better Google for smart contracts.

How we built it:

We built it by making a solidity compiler generate abstract syntax tree of solidity programs. Then, we did pattern matching on every node and tree itself. We wrote the matching engine to do it in a compossible way (constraint logic programing). We downloaded 45,000 verified public smart contracts and generated the ASD on all of them. It is a syntactic/semantic search feature.

Challenges:

Alireza had a difficult time learning/applying solidity AST. He did not like how solidity compilers don't provide enough info (or as much as python or Racket). It was difficult to get a consistent style because hierarchies were disorganized. Seita tested his English and teamwork. He was not impressed with the internet connection. Kevin could not recompile EVM code like I wanted to in the solidity decompiler. Took several hours to acquire data. He was not fond of the slow internet. Cameron is a very new developer so learning and understanding everything was challenging. It was difficult to think of blockchain applications that could be implemented in a weekend.

Accomplishments that we're proud of:

Obviously, the name and domain. "Saguru" means "search" in Japanese and stands for "Semantic Analyzer Guru". Furthermore, it flows off the tongue better than "Uber". Secondly, we are incredibly proud of building a proof of concept that could revolutionize how developers interact and optimize smart contracts.

What we learned

Cameron learned an incredible amount of about data structures, smart contracts, search algorithms, Alireza and learned a lot about Seita learned English, how to be an obnoxious American

What's next for Saguru:

Our constant ontology is not optimal. We can better organize the hierarchy. We would like to build tools and applications with our new search feature (ie: identify where to optimize contract to cut gas costs).

Share this project:
×

Updates