Osmosis Updates from the Lab occurs on alternating Wednesdays at 1 PM EST (5 PM UTC) on the Osmosis Zone Twitter Space. Replays are available on the Osmosis YouTube channel or the podcast.
It has been a while since the last Updates, and there is much to discuss: Cosmoverse, HackWasm, mesh security, and the upcoming addition of stableswap to the AMM. But we begin with a couple of chain updates.
Chain upgrade: The v12 “Oxygen” upgrade on September 30th contained three top-line additions. For more on the upgrade, see the version release notes.
- The TWAP module (time-weighted average price) allows Osmosis to provide stable, difficult-to-manipulate on-chain price feeds to Osmosis ecosystem apps like Mars Protocol. Those feeds can also be queried by other chains over IBC.
- Interchain Accounts, incompletely enabled in the v9 upgrade, was given full functionality, allowing apps like Quasar (yield vaults) and Stride (liquid staking) to manage assets/contracts on different chains from accounts on Osmosis, and vice versa.
- Finally, Stargaze Queries, which allow CosmWasm contracts to interact with the Osmosis state machine, were re-enabled, this time with a whitelist of permitted queries that pose no threat of non-determinism.
Cosmoverse & HackWasm
Talks: We do not have time to mention all the great talks at Cosmoverse, but a few stood out: José Maria Macedo (Delphi Labs) on Mars Protocol, the MEV panel with Skip Protocol, Mekatek, and Sunny, as well as the various ATOM 2.0 introductions, the most intriguing of which is perhaps the proposed interchain sychronous blockspace marketplace, the Scheduler.
For a video that gives a sense of the conference atmosphere, as well as some unfiltered takes on the Hub’s new plans, check out the Alpha Roundtable from joint Mars-Osmosis Lab Party.
Tales from the Booth: Waterspinner, one of our Osmosis Support Lab admins, ran the Osmosis booth in Medellín. There, he heard many first-hand accounts of people entering the ecosystem through Osmosis. In particular, one person with no previous Cosmos experience, after getting excited about Stargaze NFTs, figured out the entire process in about 10 minutes: bridging from a CEX to a Keplr wallet Hub account, swapping for STARS on Osmosis, and IBCing out to Stargaze. In addition, visitors to the booth mentioned their excitement for concentrated liquidity-powered orderbooks, stableswap, and mesh security. Finally, a number of people praised the developer, validator, and community response to the June exploit.
These reports amplify the overall impression coming from Cosmoverse: the vibes were great, and Cosmos sentiment is booming despite the bear.
HackWasm: In addition to the talks and general networking. Cosmoverse provided a venue for many teams and subteams to sit down and coordinate their plans, notably, Mars and Osmosis. There is nothing specific to report yet, but the Mars launch is getting close, and when it does we will unlock credit, lending, and leverage on Osmosis. Perhaps a DeFi winter is in the offing?
HackWasm itself, sponsored by Stargaze, Juno, and Osmosis, was aimed at unlocking IBC with new cross-chain apps and tools. Jon Ator, Osmosis front-end developer, mentored the teams during the event, helping them make working front ends for their HackWasm contracts. They made heavy use of Dan Lynch’s (Osmosis, Cosmology) OsmoJS and CosmWasm Type-Script code generator, which saved the them a great deal of time and allowed them to focus on the smart contract logic. Jon was impressed with how much the teams were able to accomplish, particularly the winning team, Equilibrium.
HackWasm Winners (from first to fourth place)
- Equilibrium: auto-balancing ETF with cross-chain IBC swap router that utilizes Osmosis TWAP. Presentation here.
- Reverse Osmosis: lock Osmosis LP tokens (GAMM) in exchange for a token lockdrop. Lets airdroppers better target investors, and the locked liquidity is converted to the initial pool liquidity upon token launch: e.g. locked ATOM/OSMO LP shares could be converted to ATOM/FOO, OSMO/FOO pools. Presentation.
- Noisacle: from an Injective Labs team. Permissionless Oracle Infrastructure using the Nois Network (uses drand, distributed randomness beacon), which lets oracle providers be sampled randomly, making them much more secure and reliable. Presentation.
- CosmWonder: smart contract explorer for Osmosis, Juno, and Stargaze with the ability to interact (query, instantiate, etc.) with contracts like you can on Etherscan. Presentation.
Interchain Security is coming to Cosmos as early as this January. In its primitive form, it will allow a validator set to provide plug-and-play security for any consumer chains that do not want the responsibility of recruiting and managing their own validators, a sort of security SDK. The downside to this is that apps give up flexibility and sovereignty to an external validator set. Notably, Interchain Security v1 was attractive to Circle, which will be releasing native USDC into the interchain from a Hub-secured asset-issuance chain as soon as Q1 2023.
However, in Interchain Security v1, chains cannot simultaneously provide and consume security from each other in the amount of their choosing, which is what will give the interchain shared, opt-in mesh security. All chains can reinforce the security of all other chains in an emergent, self-organizing network (bottom right).
At the broadest level, this works by having validators correlate their identities cross-chain over IBC, allowing their stake (and that of their delegators) on one chain to be slashable on the other chain in the event of misbehavior.
We’ll save the full deep dive into Mesh Security for a less-packed Updates or its own blog post, but in the meantime, check out these resources:
- Sunny’s Cosmoverse talk
- Emperor Osmo’s Summary Tweet Thread
- Chjango’s Interview w. Sunny
- HackWasm Mesh Security proof-of-concept presentation
Stablecoins | Stableswap
The coming months are going to see an explosion in Cosmos stablecoins. Circle is making a general asset-issuance chain secured by Hub once Interchain Security is ready (potentially as early as January). Having native USDC in the ecosystem will lower the risk from bridged, non-IBC varieties.
The stableswap pool model looks set to launch by early December. Stableswaps, you may recall, provide a much flatter curve in a tight range than the classic x * y = k constant-product market-maker curves. This allows assets that are expected to trade in a tight range to be swapped in large volume with minimal slippage. The Osmosis implementation also introduces a “scaling factor” that will allow a curve to adjust to predictable price changes, such as the value accruing to a liquid staking token when staking rewards are passed on. That is, if a stATOM implementation passes on ATOM staking rewards to its holders, 1 stATOM might start being worth 1 ATOM, but would slowly increase to 1.01 ATOM, 1.02 ATOM, etc. The scaling factor can take this predictably shifting peg into account.
Transmuter: This additional module will allow free one-to-one swaps between stablecoins, provided that an external team fills it. For example, Circle could load a transmuter with USDC, setting it to accept whichever stablecoins it expects not to lose peg. Users would then be free to make zero-fee, one-to-one swaps.
Additionally, as we start to see the ecosystem converge around the most popular stables, it may make sense for Osmosis to create its own version of 3Crv, a sort of meta-stable, fungifying LP token that represents a claim on Curve Finance’s 3pool of DAI, USDC, and USDT, and which is then itself used as a paired asset against other stables.
- Matching incentives for ATOM/stATOM: stATOM is Stride’s liquid staking derivative. Osmosis prefers liquid staking solutions that do not weaken security and contribute to validator centralization: in other words, superfluid staking (soon, interfluid). At the same time, if stATOM is likely to be widely used, it may make sense not to let other Cosmos DEXs be competitive.
- Apollo DAO Liquid Staking Contracts: This passed somewhat more narrowly, roughly 55% to 13%, presumably because voters are uneasy about OSMO derivatives. For more check out this Twitter discussion between Larry0x and Dev. It should be possible, Dev suggests, for governance to permit liquid staking contracts while subjecting any non-permissioned derivatives to slashing. Expect more debate about this topic going forward.
- Axelar Loan Swap: $1 million worth of OSMO from the Osmosis Community Pool has been loaned to Axelar to help bootstrap the AXL/OSMO pool. This will be repaid to the OCP within three months with either $1 million worth of AXL or USDC.
- Flipside Data, Community-Sourced Analytics: 275,424 OSMO to Flipside to fund the next nine months of partnership. Through Flipside, community members are able to create data visualizations and reports for consumption by Osmosis developers and community members. The general feeling in the Commonwealth discussion was that Flipside provides good value for money, providing useful analytics and training potential future Osmosis contributors, but that the data being produced needs to be published more broadly, perhaps in digest form.
- Increase Validator Set from 135 to 150: In the Commonwealth discussion, it was largely agreed that increasing the validator set right now will not appreciably improve decentralization because the bottom of the set already controls a very small proportion of the stake. On the other hand, a larger validator set slows down the network.
- Skip Protocol, In-Protocol Arbitrage — Signaling Prop: If you watched Sunny’s talk at the Nebular Summit this summer, you know that in-protocol arbitrage (and eventually liquidations) have been on the roadmap for a while. Arbitrage keeps liquidity pools healthy, but it is one of the prime benefits of app-chain sovereignty that we do not have to leach arbitrage profits to third parties, like apps on Ethereum do, but can instead run an arbitrage optimizer at the beginning (or end) of every block. Skip proposes to take 20% of profits from this module in Year 1, 10% in Year 2, and 5% every year afterwards that it continues to maintain the module.
That’s all for this time! We covered a lot of ground, and there was still more that could have been discussed. The building doesn’t stop.