DecentralSwap
Constant-product pools: the pool holds a reserve of each asset and prices a swap so their product stays fixed, which is the same shape as the AMMs you already know. What differs is where it runs. Both halves are RIDE contracts on the chain itself, so a swap settles in the same place the balances live.
PoolCore
3DcZHm89byJjfdkHTJ9m89pyeMk8vChDGtD
Holds reserves and does the arithmetic of a swap.
SwapRouter
3Dc9mKvihe2ujkk7co5oA2HnUJ9W1CGQsYg
The entry point a caller invokes, routing into the pool.
You do not have to take that on trust, and it is not a claim you should take on trust about any contract. A DecentralChain address carries its chain byte at index 1 of the decoded bytes. Both addresses above decode to 0x3f, which is ?, mainnet. Testnet would be !.
# byte 1 of the base58-decoded address is the chain bytenode -e "const b=require('bs58').decode('3DcZHm89byJjfdkHTJ9m89pyeMk8vChDGtD');console.log(b[1].toString(16))"# 3f
It is also not published to npm. It resolves inside the monorepo workspace and nowhere else, so an example that installs it will not work outside the repository. The packages page lists the four others in the same position.
Next
RIDE
The language both contracts are written in, and the version ceiling on mainnet.