> For the complete documentation index, see [llms.txt](https://stardust.gitbook.io/stardust/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stardust.gitbook.io/stardust/challenges.md).

# Challenges

#### Challenges We Faced While Building Stardust

Building Stardust was an exciting journey, but like any innovative project, it came with its set of challenges. Here, we share some of the key hurdles we encountered and how we overcame them.

**1. Learning and Using Cairo**

* **Challenge**: As a new team to Cairo, the programming language used for StarkNet contracts, we faced difficulties deploying our contracts. The error messages were often cryptic and hard to debug.
* **Solution**: We dedicated significant time to learning Cairo’s intricacies, consulting documentation, and seeking help from the community. This collaborative effort helped us understand the nuances and successfully deploy our contracts.

**2. Dynamic Collateralization and Credit Scoring**

* **Challenge**: The mathematical calculations required for dynamic collateralization and credit scoring are complex and need to handle decimal values. However, Cairo only supports integer operations, making it unsuitable for our needs.
* **Solution**: To overcome this, we offloaded the complex mathematical computations to JavaScript, which can handle decimal operations. This involved making careful assumptions and validations to ensure the accuracy and reliability of our calculations.

**3. Integration of JavaScript for Mathematical Calculations**

* **Challenge**: Integrating JavaScript for mathematical computations added an extra layer of complexity. Ensuring that the assumptions made in JavaScript aligned perfectly with the on-chain logic was crucial.
* **Solution**: We established a robust framework for communication between the smart contracts and the JavaScript backend. Rigorous testing and validation were conducted to ensure that the mathematical assumptions and results were accurate and consistent across both environments.

These challenges, while demanding, helped us grow and innovate. They led us to create a more robust, reliable, and efficient platform. At Stardust, we believe that overcoming these obstacles has made our product stronger and more capable of serving the needs of DAOs worldwide.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stardust.gitbook.io/stardust/challenges.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
