Optimize the web application’s front end which was taking a lot of time to load, speed up the math library used on the contract side, and implement new features.
Improved code quality on the web end, increased precision of the math library from 8 to 16 decimal places, and implemented a complex farming feature UI.
Better web performance, a higher accuracy of results, and reduced runtime of functions which lowered the transaction fees on blockchain for features using the math library.
The Growing Defi Market on Bitcoin: what’s yielding already? - Crypto News
ALEX DeFi - Medium
ALEX was building DeFi primitives targeting developers looking to build an ecosystem on Bitcoin, enabled by the Stacks blockchain. The name ALEX stood for Automated Liquidity EXchange. They focused on trading, lending and borrowing of crypto assets with Bitcoin as the settlement layer and Stacks as the smart contract layer. At the core of this focus was the automated market making ("AMM") protocol, which allowed users to exchange one crypto asset with another trustlessly.
ALEX engaged Tintash as their development partner to work on increasing the precision of math library (Clarity), optimizing the frontend which was taking a lot of time to load, as well as implementing new features.
Tintash assigned two squads to the project. The first focused on frontend development and included engineers skilled in ReactJS, while the second team included blockchain engineers experienced in Clarity language for smart contracts development on the Stacks Blockchain.
The frontend team was responsible for optimizing the performance of the web application and implementing an interactive user interface (UI) for a farming feature.
For performance optimization, we thoroughly examined the codebase and identified operations that were taking the most time. To address this problem, we explored multiple solutions for a set of functions and suggested running all data retrieval calls in parallel to monitor their impact. Once these suggestions were approved by the client, the team implemented them across the entire application. This allowed for a significant reduction in latency in calculations and helped improve the overall user experience.
The team then moved on to implementing a complex UI for a farming feature, along with its integration with contract calls, to prepare for the public launch.
While working on the frontend, we also identified areas for improvement in the existing codebase. We incorporated a better coding structure, improved code quality on the web by using the latest features supported in ReactJS, and made the code more extendable for future use. These efforts helped ensure that the new feature was seamlessly integrated into the app, while making the product better and more maintainable.
On the blockchain front, as the squad explored new ideas in the DeFi space, their efforts focused on establishing the proofs of concept. Since the Clarity language had limited in-built support and functionality, the blockchain engineers conducted R&D to establish these proofs of concept for the math library – an integral component to build features on top of it – as well as the finance features to be implemented in smart contracts. To ensure the validity of results, we wrote unit test cases and made a stronger case for our recommendations.
Once these features were successfully implemented, we worked on improving the precision of the math library used on the contract side. Since all finance-related features required calculations, this math library was a foundation on top of which other features were built. This optimization reduced the time required for calculations and ensured faster and feet-efficient transactions on the blockchain.
Constant client communication and feedback was an integral part of our development process. Throughout the project lifecycle, our team interacted with the client through biweekly syncups, commits, and pull requests. This helped streamline the process, incorporate the client’s feedback in a timely manner, and ensure the final product met their expectations. The squad also included a QA engineer who ensured the deliverables were of the highest quality.
We improved the precision of the math library used on the contract side from 8 to 16 decimal places, allowing for more accurate results and reducing the runtime of functions. That optimization helped lower the transaction fees on the blockchain for AMM operations.
We incorporated a better coding structure and improved code quality for the web by using the latest features supported in tech stacks. By executing data retrieval calls in parallel, we were able to speed up the process and make the application more responsive. Code reviews were an integral part of the development process and were carried out on both the contract side as well as the frontend.