Weekly Report 2021/08/08
Weekly Report 2021/08/08
At MELD, we build on top of the Cardano blockchain, so improving the platform is one of our priorities. This first weekly report gives some insights into our contribution to the Cardano ecosystem. With also overviews of our internal projects.
Plutus documentation
We have been spending a good amount of effort to help update Plutus documentation, which is usually out of date due to lightning change of Plutus development. One can never get enough good documentation. The whole community needs this!
This past week we worked on a few pull requests to update Plutus documentation, as follows.
- input-output-hk/plutus#2937
- input-output-hk/plutus#3634
- input-output-hk/plutus#3707
- input-output-hk/plutus#3570
These changes made the following improvements.
- Some typo and grammar fixes (mainly with Grammarly).
- Fix glossary (Nix wrongly filters out
.latexmkr
). - Update several obsolete parts and terminologies. Like binary serialization method, removed eval mode (option) of
plc
, “monetary policy” to “minting policy”, “forge” to “mint”, etc. - Write a bit more on Chain Index.
- Propose more documentation work:
- Unify the terms “currency id” & “currency symbol”?
- In code: update
txInfoForge
totxInfoMint
. - In code: update forge-related terms in PureScript code.
- Proofread the remaining papers.
- Proofread and continue to write each module’s README.
- Write more about PAB, write a dedicated document for it (critical to any dApp work).
- Write more about the compilation pipeline & evaluators, write a dedicated document for them (critical to Hachi work).
Cardano core
Cardano code base is moving extremely fast! We frequently test our projects with the latest updates to help evaluate and fix breaking changes simultaneously.
Below is our latest pull requests to Cardano’s core:
- input-output-hk/ouroboros-network#3282
- input-output-hk/cardano-node#2998
- input-output-hk/cardano-ledger-specs#2411
- input-output-hk/cardano-ledger-specs#2412
Below is a summary of what we have helped fix:
- Propagate the
isValidating
toisValid
change from Ledger Specs to Ouroboros Network and Cardano Node. - Propagate several changes from Ouroboros Network to Cardano Nodes: remove
srnMaxTxCapacityOverride
, add new{protocolName}MaxTxCapacityOverrides
params, addStandardCrypto
toProtocolParams{ProtocolName}
. - [Duplicated] Propagate the
ByteString
toBuiltinByteString
change from Plutus to Ledger Specs.
For further references, see related commits:
- input-output-hk/cardano-ledger-specs@e8e63bb532bbc3eecc21d29dab8fbebb9cf38fda
- input-output-hk/ouroboros-network@35388db658216c1cf09b55701f63adcbc20c01ac
- input-output-hk/ouroboros-network@35388db658216c1cf09b55701f63adcbc20c01ac
- input-output-hk/plutus@1e287eb7eefb25b4a41f4d930ae0f8335431304f
hachi-lint
Plutus smart contract developers need tools to help them code faster, easier, and minimize simple mistakes. A static analysis tool like lint would be very helpful to detect programming bugs, stylistic errors, and suspicious constructs. Unfortunately, no such tool for Plutus exists!
We try to fill in this gap by developing a lint tool for Plutus coding. Since Plutus is a subset of Haskell, with some additional supports for Cardano smart contract, it would be wise to build our tool on top of a Haskell linter.
For this reason, we have decided to fork HLint, a widely-used linter of Haskell. Based on HLint, we have been building our own linter, named hachi-lint.
At the same time, we are also looking to contribute back to HLint, by reporting issues and making pull requests to their Github repo.
These include:
- Notify the maintainer about outdated issues that can be closed.
- Disable the list literal suggestion when
OverloadedLists
is on, as such suggestion would lead to a compilation error.
MELD team will keep working on these three fronts in the future. While we mainly focus on expanding our R&D within the Cardano ecosystem, GHC is also a project that we want to contribute to. More updates on this area will follow soon. Stay tuned!
Hachi
Hachi is our effort to develop a suite of security analysis tools for Plutus smart contracts. This project will be open-sourced to the public eventually. For now, we focus on research and experiments on Cardano to better understand how to have the best approach for each problem.
Here is a quick summary of what we have been doing so far.
- Review Smart Contract security researches, standards, and tooling on Ethereum and other platforms.
- Review all documentation of Cardano to plan better what is compatible and plausible to pursuit on Cardano.
- Review a lot of Cardano smart contract code, focus on how to find and fix vulnerabilities.
- Complete a minimal compilation pipeline to get any compatible Haskell code to Untyped Plutus Core.
- Start a minimal reversing pipeline to get serialized on-chain code back to Untyped Plutus Core AST.
- Transpile Untyped Plutus Core to Lisp/Scheme/Racket. We have tried built-in features and tooling on those targets to analyze the original Untyped Plutus Core programs.
- Design and develop Hachi-lint, a Plutus linter. We started by finding validator script functions, then warn about the ones with a constant result (always succeeds, always fails, etc.).
We do hope to be able to demo and publish some documentation and tooling soon.
ADAmatic
MELD and VENT Present ADAmatic!
Our main goal now is to finalize all the iterative specifications for the bridge with our partners. The final goal is a state-of-the-art decentralized network for wrapping and Smart Contract integration. For now, we have to balance ambition and speed and carefully monitor progress on the Cardano side. On the other hand, experiments on the Polygon side have been going well. Once a public Alonzo Purple testnet is ready, we will have all the ingredients to cook the ADAmatic node and the first semi-decentralized wrap between the two testnets!
MELD
We have been operating in a very competitive ecosystem, so we will not share much of our core work yet – the exact reason why we only have a short introduction for ADAmatic.
In summary, the following key components are being worked on to meet this year’s roadmap:
- The ADA-backed negative interest mFiat (mUSD/mEUR) service.
- The MELDed Assets service that connects to bridges like ADAmatic.
- The first lending & borrowing infrastructure fully in crypto.
- Staking MELD to receive protocol fees from a margin of loan interests, MELDed Assets service fees, etc.
- The MELDApp that acts as a wallet and interacts with the MELD Protocol.
We are also working on other components, including the ISPO dashboard, the ISPO airdrop pipeline, an economics model simulator, decentralized Oracle integration, etc.
We have planned for some non-MELD-specific components to be open-sourced early, either under MELD or Hachi. For now, let’s enjoy Alonzo Purple, the upcoming partnership announcements, and a lot more technical updates coming soon!