J

JUG

A complementary compute stack to EVM, to handle complex mathematical and scientific equations

J

JUG

A complementary compute stack to EVM, to handle complex mathematical and scientific equations


The problem JUG solves

EVMs are very well known for being the ultimate infrastructure for hosting turing-complete contract programs.
However, with this outlining feature, the EVM naturally welcomes severe limitation on its computational capabilties in a scale of networks.

As suggested, observed, practised and appreciated by some of the thinkers - a brilliant move would be to outsource time and gas consuming complex calcuations to an off-chain system with one or more approaches for verifiying the fact that consistent solution either is achieved or not achieved.

JUG offers EVM a helping hand in taking some of the complex computations and execute them in a WASM runtime, therby ensuring consistency in environments as well as quality of the solutions.

Challenges we ran into

A couple of challenged we passed through like an army of decentralised gladiators:

  1. Issues in switching gears between the version of the solidity compiler as well as the version of the EVM, but we figured it out.
  2. We could not find a common crate in rust lang to help address the lexical analysis and parsing of equations in string format, as EVM does not support some characters with predifined meaning, or lacking thereof. We had to customise some of it with little success.
  3. Tiny issues of not able to see the decoded output on Matic network, but we resolved this by emitting events.

There are also some other issues we have not yet been able to fix:

  1. Unable to build the project into wasm with web3 in it. This was a big bummer ! Hence, the hack kinda suspended at 60%.
  2. Wasmer stopped working - as it is in its early days of testing in executing hand-made wasm source codes
  3. JSON-RPC API lacked proper documentation. If this were present, we could have potentially moved from web3 to http calls - thereby making the .wasm build happen.

Technologies used

Discussion