Inspiration

We were inspired by the Carbon Ecosystem of Northern Trust, as well as the growing voluntary carbon market. We noticed that the the manual processes involved in creating and validating smart contracts used for Carbon Ecosystem introduce inefficiencies, risks of human error, and vulnerabilities, as seen in high-profile incidents like the $10 million Yearn Finance exploit. These challenges inspired us to develop an AI-driven solution to streamline the process, mitigate risks, and improve scalability, enabling Northern Trust to meet client demands effectively.

What it does

Our solution leverages AI to generate and validate customized smart contracts tailored to the Carbon Credit system. Users can specify parameters such as token supply, issuer details, buyer information, verifier roles, and project metadata, ensuring the contracts are personalized and compliant with carbon market regulations.

How we built it

Model Selection: We used Llama 3, a state-of-the-art open-source transformer model, as the backbone of the system.

Prompt Engineering: We carefully designed prompts to capture user inputs and regulatory requirements for generating safe and customized contracts.

RAG (Retrieval Augmented Generation): The system retrieves relevant examples and snippets from a knowledge base of annotated smart contracts to ensure contextual accuracy.

Fine-tuning: The model was fine-tuned with labeled datasets of carbon credit smart contracts to improve its performance and alignment with domain-specific requirements.

Challenges we ran into

Balancing Specificity and Flexibility: Designing prompts that generated highly customized yet secure smart contracts was challenging, as it required balancing user-defined parameters with robust code templates.

Data Availability: Obtaining a sufficiently large and annotated dataset of carbon credit-specific smart contracts for fine-tuning was a significant hurdle.

Dynamic Retrieval: Implementing a robust RAG system that retrieves the most contextually relevant examples posed technical complexities.

Accomplishments that we're proud of

Customized Smart Contract Generation: Successfully enabling users to generate personalized smart contracts with relevant project and participant details.

Dynamic Retrieval System: Building an effective RAG system that ensures contextually accurate outputs aligned with user inputs and regulatory requirements.

Scalability: Developing a solution that reduces manual effort, scales efficiently, and aligns with the rapid growth of Northern Trust’s Carbon Ecosystem.

What we learned

Domain-Specific Fine-Tuning: Fine-tuning transformer models for niche applications like carbon credit smart contracts significantly enhances performance and usability.

Evolving Needs: User feedback and real-world use cases are invaluable for iteratively improving AI-driven systems.

Dynamic Content Retrieval: Employing RAG allows AI models to generate outputs grounded in real-world examples, increasing relevance and accuracy.

What's next for Janitors (our team)

Improving Fine-Tuning: Expanding the dataset with more annotated examples and real-world smart contracts to enhance the model’s accuracy and adaptability.

Real-Time Feedback Loop: Incorporating user feedback directly into the system to improve outputs dynamically.

Integration with Northern Trust’s Ecosystem: Ensuring seamless compatibility with Northern Trust’s existing systems and blockchain infrastructure.

Advanced Validation Tools: Exploring additional tools like formal verification methods to further enhance the security of generated contracts.

Expanding Use Cases: Adapting the model for other blockchain ecosystems and industries, such as supply chain management or tokenized assets.

Share this project:

Updates