Secure icrc ledgers for free 🧙

A stream of random thoughts that don’t go anywhere and may muddle the situation further, but probably should be said.

The issue with trying to standardize the actual wasms of ledgers is something along the lines of ‘any sufficiently interesting token requires some unique functionality’. Sometimes this is simple. For example, the OGY canister uses the ICP canister, but we added a feature to allow ‘super principles’ that have ledger rights. We use this for the DIP20 passthrough and hope to deprecate it once we activate ICRC2 and the main DEXs can switch over. But we needed that like 16 months ago and if we’d needed to wait for ICRC2 we just wouldn’t have had DEX functionality.

Other functionality is more complicated. Like YC charging a % on each transaction, or other kinds of demurrage.

This makes the build and replicate super important. Psychedelic was working on Cover at one point and ICDevs sponsored a Chrome extension that would warn you if you were using a non-validated wasm: Complete: ICDevs.org - Bounty #9 - Cover Browser Plugin

Of course, leaving it up to the user to install something like that is a usability nightmare.

One other consideration, that I don’t really know the answer to…AXON deploys tokens and the token is a subcontract…so it isn’t really compiled…well maybe it is…but it is put into the parent wasm and then deoplyed…I don’t know if you compile it separately if the wasms match. I think this may be a question for @claudio as he worked on the system upgrade features for motoko.

Never mind who is going to read and validate all these contracts/upgrades. DFINITY is likely the only player in the ecosystem who has the resources to write a rust-based contract and have it audited. But rust is an awful language for the ‘common person’ self-auditing. My personal opinion is that until system contracts are written in a ‘smart contract shaped’ language that is high level enough to be read by ‘most’(aka a “trustable mass of programmers”) there will be an almost unbridgeable trust gap. Right now that is likely motoko and solidity. I haven’t read many Azel contracts, but they at least have the advantage of being in a common language that ‘most’ programmers know.

2 Likes