Skip to main content
Apply NowBuild your most ambitious dApp yet with Cartesi - grant applications open!

MathCoprocessor

MathCoprocessor

Cartesi Coprocessor that allows smart contracts to run math functions in Python
In progress - AlphaDev-Tool
Cartesi / Rolluplab / MathCoprocessor

Team

Milton Jonathan
milton.jonathan

Languages, Libraries & Stacks

Share project

Gallery

About MathCoprocessor

Smart contracts written in Solidity often need to perform mathematical operations that are either too resource intensive, or are simply unavailable in Solidity. A trivial example of the latter is to perform an exponentiation with a floating-point base (i.e., "x^y" where "x" is not an integer). This project proposes a simple solution using Cartesi Coprocessors, that allows smart contracts to send an arbitrary Python mathematical expression along with a callback to be called with the ABI-encoded result. This implementation includes support for NumPy and arbitrary ABI encodings.

What's next

Next intended steps are to provide ways to parameterize the input mathematical expressions. First, we would like to add variable replacement, with variables given as extra arguments along with the main mathematical expression string. Next, we would like to explore ways to fetch variable data using base layer access (dehashing), e.g., to specify some contract storage slot, or data from some event.

Project founded on: Feb 22, 2025
Anyone is free to submit information about their project. Do your own research and use your best judgment when using or interacting with any of the projects listed in this directory. Being listed in this directory is not an endorsement from the Cartesi Foundation or any other related entity.

Explore similar projects

Drand Tooling

Drand Tooling

Dev-Tool
Stable release

The Cartesi PRNG project aims to establish a versatile and reusable component library through React and TypeScript, facilitating the integration of a PRNG algorithm into Cartesi's technology stack. Leveraging Drand and Cartesi Rollups, the framework ensures the generation of truly random numbers in a trustless manner.

Project founded on: Mar 26, 2024
Teach AI

Teach AI

AI/ML
Hackathon Project

The application helps to curate high-quality datasets by providing a framework to incentivize RLHF, with the LLM being fully verifiable and hosted on-chain.

Project founded on: Oct 20, 2023
ThinkChain

ThinkChain

AI/ML
Hackathon ProjectFeatured

On-chain service that enables smart contracts to perform verifiable large language model (LLM) inference.

Project founded on: Feb 18, 2025

© 2025 The Cartesi Foundation. All rights reserved.