Technical Architecture - the-future-of-benchmarking/proof-of-concept GitHub Wiki
Architecture
The following (German) diagram explains the interactions of the main components:
It is important to note, that this projects rapid iteration was only made possible by the work of the Truffle team, which developed both the framework and Ganache for testing.
Iteration 02-UML
The following UML diagram, which was generated with https://github.com/naddison36/sol2uml shows the interface of iteration 02's smart contract:
The external functions
, namely unsignedMul
and unsignedDiv
stem from the usage of the excellent prb-math library by hifi-finance and our custom fork, which exposes some of its JavaScript/Typescript utilities.
The calculation of ratings is performed via the smart contract in this iteration (calculating with percentages proved trickier than originally estimated). The following scheme shows the calculation logic:
Iteration 03-UML
This UML diagram, was generated with https://github.com/naddison36/sol2uml for iteration 03's contract as well:
The calculation of ratings is performed in the client at this iteration. This scheme describes the used logic (luckily, as Solidity is pretty similar to JavaScript, the logic itself could be recycled):
Important Client Libraries
Important dependencies of the Client are:
- final-form ^4.20.2, react-final-form ^6.5.3 (for form validation)
- localforage ^1.9.0 (provides a unified storage interface for the browser)
- luxon ^1.27.0 (allows the better handling of dates for storage expiration)
- primeflex ^2.0.0, primeicons ^4.1.0, primereact ^6.4.1v (Design framework used to rapidly iterate on the frontend without spending countless hours on designing)
- react 16.11.0 (frontend rendering library by Facebook, allows to handle complex state updates)
- react-router ^5.2.0 (used for multi page routing)
- web3 1.2.2 (client library for metamask, allows communication with Ethereum)
Without these excellent libraries, the artifact would not be possible.