Raindex is an open source, permissionless onchain order system with no fees or admin keys.
This repository contains several components:
- Solidity Contracts: The core smart contracts for Raindex (
src) - Rust Crates: Various tooling and libraries for interacting with Raindex
(
crates/*) - JavaScript Packages (
packages/*):webapp: A SvelteKit site for Raindexui-components: A shared component library used in the webappraindex: A TypeScript package (published to npm) that provides bindings to the Rust crates
We use wasm-bindgen to create the raindex package from our Rust crates, which
is then used by:
- The UI components library
- The webapp
This same package is published to npm, allowing developers to more easily create their own frontends for Raindex.
- Copy
.env.exampleto.env - Copy
packages/webapp/.env.exampletopackages/webapp/.envand fill outPUBLIC_WALLETCONNECT_PROJECT_IDwith a test project ID from Reown (FKA WalletConnect)
Then run the following to install dependencies and build the project:
./prep-all.shYou may need to make the shell script executable:
chmod +x prep-all.shcd packages/webapp && nix develop -c npm run dev
Contracts are deployed via the Foundry script at script/Deploy.sol. The script
is controlled by two environment variables:
DEPLOYMENT_KEY— the deployer private keyDEPLOYMENT_SUITE— which contracts to deploy. One of:raindex— RaindexV6 onlysubparser— RaindexV6SubParser onlyroute-processor— Sushi RouteProcessor4 onlyarb— arb contracts only (order takers and flash borrowers)
Example:
DEPLOYMENT_KEY=<key> DEPLOYMENT_SUITE=raindex forge script script/Deploy.sol --broadcast --rpc-url <rpc-url>Everything is under DecentraLicense 1.0 (DCL-1.0) which can be found in
LICENSES/.
This is basically CAL-1.0 which is an open source license
https://opensource.org/license/cal-1-0
The non-legal summary of DCL-1.0 is that the source is open, as expected, but also user data in the systems that this code runs on must also be made available to those users as relevant, and that private keys remain private.
Roughly it's "not your keys, not your coins" aware, as close as we could get in legalese.
This is the default situation on permissionless blockchains, so shouldn't require any additional effort by dev-users to adhere to the license terms.
This repo is REUSE 3.2 compliant https://reuse.software/spec-3.2/ and compatible
with reuse tooling (also available in the nix shell here).
nix develop -c rainix-sol-legal
Contributions are welcome under the same license as above.
Contributors agree and warrant that their contributions are compliant.