RFC: Proposal for a public goods partnership between Namada and Osmosis

Original Thread: Commonwealth

Introduction

Hi Osmonauts! I’ve been a fan of Osmosis for a long time - I’ve actually known Dev and Sunny since our days at All in Bits (dba. Tendermint) in Berkeley, California (in fact, I think Osmosis still has the same office) - at the time, we were all working together in preparation for the launch of the Cosmos Hub, particularly on the proof-of-stake implementation in the Cosmos SDK. Many ideas and designs which have propagated their way through the Cosmos ecosystem can be traced back to that time. In particular, we designed the F1 fee distribution mechanism, which is in use by the Cosmos Hub and Osmosis, and a variant of with (with automatic compounding) is used by Namada. We also brainstormed different incentive ideas for proof-of-stake, such as proportional slashing, which was a large part of the inspiration for Namada’s cubic proof-of-stake system. In this post, I represent the Anoma Foundation, and I’m going to discuss our upcoming plans with regards to Namada and Osmosis. Before I do that, though, let me first explain a bit about what these entities are.

The Anoma Foundation is a non-profit organisation charged with the stewardship of the Anoma ecosystem. The foundation is seated in Zug, Switzerland, and the current board members are Awa Sun Yin, Adrian Brink, and Christopher Goes (myself). You can find the registry entry here. The foundation is currently coordinating the launch of the upcoming network Namada, an early chain in the Anoma ecosystem, and plans to propose a genesis block for Namada in late spring 2023. Namada is a proof-of-stake layer-1 blockchain designed to provide asset-agnostic shielded transfers for any interoperable crypto-asset (initially any asset from the Ethereum or Cosmos ecosystems). Namada builds on the Sapling circuit originally developed by the Electric Coin Company - we’ve added multi-asset functionality and assets conversions which are used to implement shielded set rewards. You can learn more about Namada here. Namada speaks IBC (using the ibc-rs library developed by Informal Systems) and will be able to connect directly to Osmosis - so you’ll be able to send assets from Osmosis to Namada (for shielded transfers) and back - more on this later.

As part of launching Namada, we’d like to give thanks to Osmosis and lay the groundwork for potential areas of future collaboration. The remainder of this post describes several areas for doing so that we’ve brainstormed together with the help of members of the Osmosis community. Now, we’d like to reach out and get an idea how the Osmosis community feels about this, and we’d be delighted if you could provide some feedback. This post is just a proposal, so please ask questions, express opinions, and make suggestions (also, check out the list of specific questions at the end of the post below).

Namada <3 Osmosis

Back in my days at All in Bits, and afterwards at Interchain GmbH, after the launch of the Cosmos Hub, I worked primarily on the design and implementation of the IBC protocol (along with Dev, Sunny, Joon, and many others - this ICF blog post describes some of this history in more detail). IBC was first launched by the Cosmos Hub in the Stargate upgrade in February 2021 - shortly thereafter, I decided to part ways with Interchain GmbH (bittersweet, but we’re still very good friends and collaborators in the Cosmos) to co-found Heliax and Anoma. Now, IBC connects many blockchains (57, according to Map of Zones at the time of writing), so it’s easy to forget, but in February 2021 IBC was quite novel and not yet widely known or adopted. Besides, there wasn’t much reason to use IBC when it was just supported by the Cosmos Hub and a few zones originally designed to operate independently - the interchain needed an application which treated IBC as a first-class feature, packaged it into the product, and could demonstrate the viability of the Cosmos model.

In my view, that application was Osmosis. Osmosis launched in June 2021 and IBC usage went up and through the roof - to quote Zaki Manian, Osmosis “did the go-to-market” for IBC. We agree, and we’d like to give material thanks in addition to verbal credit. This material thanks takes three forms. First, Namada plans to airdrop some tokens to OSMO holders, stakers, and LPers who have supported the chain. Second, Namada plans to allocate continuous public goods funding to a grants pool managed by the Osmosis Grants Program, to fund projects of joint benefit to the Osmosis and Namada ecosystems. Third, Namada plans to implement Shielded Actions, a feature which will allow OSMO holders and Osmosis users to seamlessly benefit from both the privacy features of Namada and the trading capabilities of Osmosis. Let me dive into each of these forms in turn.

Airdrop

First, the Anoma Foundation plans to allocate a portion of the genesis supply of NAM (the Namada staking token) as a direct airdrop to OSMO holders. This airdrop will cover all OSMO, including staked, unstaked, and LP’ed. A snapshot date has not yet been decided, but it will be after the publication of this post (it shouldn’t matter much since Osmonauts don’t need to do anything in advance anyways). Depending on engineering timelines, as we need to check some account compatibility requirements, this distribution may happen a bit after the mainnet launch of the Namada blockchain later this spring.

Continuous PGF

Second, the Anoma Foundation plans to make a genesis block proposal with a portion of recurring inflation per annum (continuous public goods funding) earmarked for areas of joint interest to the Osmosis and Namada communities. These funds (in NAM) will be sent over IBC to an account controlled by the Osmosis Grants Program. Areas of joint interest include:

  • Ferveo, the distributed key generation and threshold decryption protocol jointly developed by Anoma and Osmosis - sub-areas could include further development, Tendermint integrations, testing & benchmarking, optimisations, and research into theoretical improvements.
  • Shielded actions (see below), including IBC-related compatibility design and implementation, integration optimisations, and interface and tool development.
  • Basic research into zero-knowledge cryptography optimisations (e.g. small-field SNARKs), AMM/DEX design options and trade-offs, cross-domain MEV, and other such topics.

Shielded actions

Third, Namada will support a feature called Shielded Actions, which will allow you to use Namada and Osmosis in tandem. As a bit of background, Namada’s primary aim is to unify privacy sets across the interchain - privacy is win-win, so unification provides better privacy for everyone. For more context, check out this article on shaping multichain privacy. Namada is interested primarily in privacy - it doesn’t support general smart contracts or any kind of trading capabilities like Osmosis. Instead, with shielded actions, we plan to allow users to keep their assets private at rest while still using all the applications they’d like across the Cosmos and Ethereum ecosystems. For example, let’s suppose that you want to hold ATOM and OSMO privately, but sometimes trade between the two. Shielded actions work in three steps - specifically, for the ATOM → OSMO direction:

  1. Transfer ATOM from the shielded account on Namada over IBC to a transparent account on Osmosis.
  2. Trade ATOM for OSMO on Osmosis (this interaction is transparent).
  3. Transfer the OSMO from Osmosis to the user’s shielded account on Namada over IBC.

The OSMO → ATOM direction would work exactly the same, just with the assets swapped - and this works for any IBC-compatible tokens on Osmosis! Shielded actions is a permissionless protocol and will also support other chains - but we’re particularly excited to bring the combo of Namada’s privacy and Osmosis’s AMM laboratory as a feature combo to interchain users. In particular, we plan to collaborate with the Osmosis team and community to develop a version of the Osmosis frontend which gives you the great UX you know and love, but performs Namada shielded actions under the hood, so your assets can be kept private at rest and you can still trade whenever you’d like!

Questions for the Osmosis community

Thanks for reading all the way through!

Namada hasn’t launched yet, and this is only a summary of our current understanding of the Namada & Osmosis communities and a proposal for where we could both benefit from technical and operational collaboration. You’ll also notice that this proposal doesn’t detail exact amounts. Before committing to this plan, or to specific amounts, we would like to ask the Osmosis community as to what y’all think! In particular, the Anoma Foundation seeks consent - we would never want to contribute to the grants pool, conduct an airdrop, pursue shielded actions, etc. if the Osmosis community doesn’t like this idea (for whatever reason) - we want to push areas of collaboration which you guys are onboard with, and focus on those you’re most excited about. In that spirit, we have four questions for Osmonauts:

  1. How do you feel about airdrops? Airdrops can feel spammy, but they can also be a good way to give back to the individuals who have supported Osmosis by holding OSMO, and a good way to encourage community collaboration. Would you be onboard with an airdrop? Do you have any concerns?
  2. How do you feel about shielded actions? Is privacy important to you? What kinds of user interfaces or user flows would make this feature proposition compelling?
  3. Who in the Osmosis community would be interested in collaborating on the topics outlined above, including Ferveo, interface & tool development for shielded actions, and general ZK/AMM/MEV research?
  4. Who else in the Osmosis community should we be talking to? Is there anywhere else Namada could help Osmosis out that we’ve missed here?

We’d love to hear your feedback here on this thread (or by DM if you prefer).


RoboMcGobo
osmo1prtr

6/12/2023

Hey Chris! Wanted to drop some comments and questions here.

First, as one of the multisigners for the OGP, I’m definitely excited that you’ve chosen the OGP to custody this public goods funding and am looking forward to the types of grants that come out of this collaboration.

A few questions:

  1. Echoing @Gavin | knowable.vc 's comment, I’d like to know a bit more detail on the scope of activities that will be possible using shielded actions, both in this first iteration and in any subsequent iterations. If I understand correctly, at the outset shielded actions will be limited to swapping of assets from shielded accounts that are held on Namada using Osmosis. Will subsequent iterations allow for things like private staking or LPing of assets from these same shielded accounts? Is this one area which might benefit from a grant using these funds or is it part of the Namada roadmap already?
  2. What’s the mechanism by which the funds will be sent to the OGP? Will these be emitted directly from the chain and streamed somehow over IBC into the OGP multisig wallet?

All in all, majorly support this. I think there’s a lot of potential research opportunity surrounding things like cross-domain MEV that will have overlap with what some Osmosis contributors are working on (i.e., @Barry Plunkett | Skip and team!). Looking forward to some of the exciting developments to come out of this collab!

Christopher Goes
osmo1v642

6/15/2023

Thanks! In order:

  1. From Namada’s end, shielded actions are quite general - we don’t need to build different logic for each transaction type, since those transactions happen on Osmosis’s end - Namada just needs to unshield the assets, initiate an ICS20 send with an attached message (instructing Osmosis on what to do with the assets after they arrive), and potentially track a private “action NFT” which can be used to claim the results later (in the case of asynchronous actions such as privately LPing or staking). There’s probably some frontend work to do here to make the UX intuitive and the privacy properties clear, but in principle it should be possible to do pretty much anything with shielded actions that you can already do on Osmosis.
  2. As long as Osmosis supports sending funds to the OGP multisig address, Namada will just periodically (probably every epoch = every day) send a little bit of new inflation (NAM) over IBC to the OGP multisig on Osmosis, just as you say.


Gavin | knowable.vc
cosmos1cd

6/1/2023

@Christopher Goes, do you think that shielded actions could extend to enable private LPing on Osmosis? what other kinds of shielded actions can you envision?

Christopher Goes
osmo1v642

6/15/2023

Shielded actions should be able to enable pretty much any transaction on Osmosis - from Osmosis’s perspective, some tokens are just received over IBC to a new account which can now perform actions normally. Thanks to the clear abstraction boundary provided by IBC, Osmosis doesn’t need to know about or care that the tokens to fund this account were unshielded from Namada’s MASP, and that, after the action is performed, the tokens will be shielded on Namada again. Most of the time, these accounts will be ephemeral, created only to perform a specific action (e.g. trade tokens) and not reused afterwards. For actions such as LPing or staking, these accounts will be longer-lived, just represented by a shielded NFT on the Namada side which can be used to claim the relevant assets (underlying LP assets, or stake + rewards, respectively) whenever the user decides to do that.


ZKValidator_Hector
osmo1ttwm

5/29/2023

Hey Chris!

Love to see privacy reaching all Cosmos!

We would love to help out in any way possible including having some kind of diffusion such as Twitter Spaces to explain a bit more the proposal, what areas will be the focus of the grants, etc.

Christopher Goes
osmo1v642

6/15/2023

Thanks! I’d be thrilled to join a Twitter Spaces, perhaps send me an email or message and we can coordinate scheduling?

Nick - Figment Capital
cosmos14q

5/24/2023

Thanks for this proposal Chris!

I’m really excited about shielded actions through Osmosis. I’d be happy to give feedback on any frontend designs or UX proposals on this joint Osmosis <> Namada front-end!

Do you think this new frontend will be branded differently? Will it just be a new page on the Osmosis website or will it be its entirely separate thing?

Beyond that, we’re excited to see more collaboration between the Osmosis and Namada communities!


Christopher Goes
osmo1v642

6/15/2023

Thank you! I think there may be multiple frontends - we (Heliax) are building one, which will probably support shielded actions, but it’s intended as more of a proof-of-concept and power user tool and may not be the most application-optimised or user-friendly. I think a version of the Osmosis frontend that uses shielded actions on the backend would be very nice. We’re not the most familiar with the Osmosis frontend codebase but happy to help and collaborate on the shielded actions part.


Leonoor’s Cryptoman
osmo14amd

5/22/2023

WOW, what a massive post. Thanks for taking the time for this elaborate thread!

To answer your questions;

  1. I would be surprised if a community would vote against an airdrop, as long as it is coming from a project which seems legit. So don’t be too worried about that part :stuck_out_tongue:
  2. Privacy is a very important matter. In the current world I am mostly worried about the privacy during fiat on-/off-ramp, since sadly I still can’t pay too much with crypto directly. What makes me wonder about the privacy using Cosmos-addresses; with a bit of a smart mind you can derive addresses from any address from a set. How would you deal with that? Because in your example I would see a reduction on my ATOM-address and a potential increase on my OSMO-address. So doing the math I can easily guess what someone has done with these funds. Is that foreseen to be more private as well with the increase of OSMO potentially on a different address?
  3. I’m not a hardcore techie, so can’t help much on these…
  4. If you are looking for funding (what my gutfeeling tells me) the OGP is the place to go. Community pool fundings are from the past imo, since we pay an entity to do the work for us.

Christopher Goes
osmo1v642

6/15/2023

Thanks for the response! In order:

  1. Sounds good!
  2. Aye - Namada provides privacy with the MASP, which does not use Cosmos-style addresses, so you’ll need to generate new addresses in order to use it (but you can still use your Ledger device, shared HD seed, etc.) - because Namada is IBC-enabled, you’ll be able to send ATOM or OSMO (for example) to Namada and keep it on the shielded address.
  3. Aye-aye.
  4. We’re not looking for funding at the moment, but will keep this in mind - thank you! I am hopeful that various entities might step up and collaborate to fund public goods of benefit to both ecosystems in the future.