Mars Updates

Mars Protocol releases a new, interactive codex unveiling the inner workings of Mars

January 23, 2023

Mission briefing:

  • Available now at docs.marsprotocol.io, Mars’ v2 docs herald the upcoming Mars Hub mainnet launch and give astronauts everywhere the tools to begin building on or contributing to the protocol today
  • Open-source and feature-rich, the knowledge base includes line-by-line walkthroughs or “Code Hikes” through every character in Mars’ codebase, “Edit this page” functionality, Github and Docusaurus integrations and more
  • For the next 24 hours, first-time voyagers to the docs can potentially uncover a secret link to a minting page for a limited-edition NFT badge

The imminent launch of Mars v2 comes with a singular vision: recreating everything you can do on a centralized exchange (spot trading, margin trading, leveraged yield farming and more) in a decentralized setting. To reach its ultimate destination, Mars must be radically transparent, rapidly evolving, and open to contributions from all. The journey begins with the transmission of an interactive codex revealing the inner workings of Mars.

Available at docs.marsprotocol.io, Mars' open-source documentation is a living repository of the accumulated knowledge of all Martians past, present and future. With this information, you can learn to trade, deploy a validator, upgrade Mars' code or don a red robe to enter the Martian Council and direct the future of the red planet.

More than a wiki, Mars contributors have spent the past six months integrating earth's leading technologies into a fluid and extensible knowledgebase. Features include:

  • Interactive, line-by-line walkthroughs or “Code Hikes” of every character in Mars’ codebase
  • An intuitive interface powered by Docusaurus, which is used by core DeFi protocols throughout the galaxy including Uniswap, Sushiswap, Yearn, Osmosis, and Terra
  • An “Edit this page” feature on every codex entry
  • Github-powered commits that gives devs the ability to track changes and quickly submit changes via pull requests


The following sections explore Mars’ docs and detail how you can contribute to them today.

Docs Architecture 

Mars’ documentation is designed to be the main information station for any traveler visiting the Red planet. In order to reach all travelers, Mars’ new docs have been structured with four main zones in mind: 

  • Learn: For explorers discovering Mars Protocol and the Mars Web App
  • Govern: For elders ascending to the Martian Council
  • Develop: For engineers leveraging Mars’ contracts, modules, and infrastructure 
  • Validate: For mechanics setting up nodes, validators, and relayers on Mars Hub 

This multi-zone architecture has influenced the design of the landing station (https://docs.marsprotocol.io/) Travelers are first greeted by four portals, which can teleport them directly to their favorite subzones. 

Open-Sourcing the Mars Docs 

The inspiration for open-sourcing Mars’ docs is to make Mars’ core information station accessible to anyone, not only in its content but also in its form. From now on, the docs will live as an open-source project at https://github.com/mars-protocol/docs. This means anyone can contribute to the docs directly by submitting a pull request to the GitHub repo. 

To encourage contributions, Mars has activated an “Edit this Page” feature at the bottom of docs pages. This is a user-friendly method for anyone with a GitHub account to quickly submit a pull request for markdown-related edits.

This means it is not necessary to know how to code in order to contribute! If you have a content-related suggestion, you can submit a pull request through the GitHub GUI.

Third-Party Plugins 

Mars’ documentation primarily uses the following packages: 

  • Docusaurus: An optimized docs site generator in React
  • Code Hikes: “Not just a syntax highlighter” 

Docusaurus 

Mars’ docs leverages Docusaurus to bootstrap the new UI demands. Docusaurus is a highly flexible site generator that has already been used by core DeFi protocols such as Uniswap, Sushiswap, Yearn, Osmosis, and Terra for their docs. 

Before contributing to the Mars docs, consider familiarizing yourself with Docusaurus. For example, many of Mars’ custom elements require “swizzling” components to obtain full control. The best place to learn about these advanced topics is the Docusaurus documentation itself. 

Code Hikes

Perhaps the most exciting feature for developers is the integration of the Code Hikes package in Mars’ docs. Code Hikes is used to build first-class code walkthroughs for technical content, creating a superior code reading experience. 

For example, with the use of the focus feature, Mars’ code blocks efficiently display what developers need and leave out any unrelated information. 

For some code blocks, if you hover over text, you may find that a piece of code goes into focus. This provides a new interactive experience between the text and the code block (often useful for directly pointing to instructions in technical guides). 

Lastly, Code Hikes supports special components that build on top of regular code blocks to create technical walkthroughs. For example, with the Scrollycoding component, Mars docs are able to integrate a first-class experience that breaks down a large chunk of code into bits to scroll through. 

Your Mission

Visit the Mars Docs now to see if you can uncover a secret link to a minting page for a limited-edition NFT badge. Available for just 24 hours, this badge is the first of four that will commemorate the rise of Mars v2.

The Road Ahead

Mars Protocol is set to embark on a multi-tiered launch starting with Mars Hub, followed by the Red Bank and Fields of Mars, and ending with Rover. Through this period, you can expect updates throughout the docs by Mars contributors (trackable through GitHub commits). After this period, a more detailed guide for contributions (used to evaluate pull requests) and additional information for third-party contributors will be released. 

Aside from decentralizing the docs infrastructure, Mars contributors are currently experimenting with new features in the research lab. More information is set to be released as details become available. Enter the codex now at https://docs.marsprotocol.io/

🔴

Follow Mars on Twitter, join the Mars Discord for community support, and subscribe to Mars’ email newsletter for the latest updates from Mission Control.

DISCLAIMER

Remember, Cosmos and Mars are experimental technologies. This article does not constitute investment advice and is subject to and limited by the Mars disclaimers, which you should review before interacting with the protocol.

Previous post
No more posts
Next post
No more posts