0x829C
July 14th, 2022

Introduction

Liquidity providers (LPs) can use the Primitive RMM-01 protocol to create portfolios that express directional views with respect to asset prices. Setting an out of the money (OTM) strike implies an expectation of positive market movement while setting an in the money (ITM) strike implies expectation of negative market movement. Implied volatility (IV) and time to maturity parameters describe the dynamic behavior of concentrated liquidity. 

The key insight is that the directional view that LPs derive from their parameter selections can be used to provide dynamic concentrated liquidity adapted to market conditions. In contrast, Uniswap LPs cannot specify a market direction due to the symmetric behavior of the pricing function. While RMM-01 pools have dynamic concentrated liquidity based on the initial Black-Scholes parameter selection, Uniswap V3 concentrated liquidity is static and does not adjust to changing market conditions.

This article analyzes the performance for a recent ETH/USDC pool created on July 5, 2022 and expired July 10, 2022. Pool profitability hinges on setting parameters that accurately describe the direction and behavior of the market. The efficacy of dynamically concentrated liquidity distributions are analyzed by the statistical kernel density estimate (KDE) tool. Code can be found in this jupyter notebook, and can be easily modified to analyze any other RMM-01 pool.

July 14th, 2022

In April, Primitive launched its first product, RMM-01, a decentralized finance (DeFi) protocol that allows users to earn trading fees from automated trading. When the protocol reached nearly 1000 cumulative users, we analyzed the accounts to determine their authenticity.

On the RMM-01 protocol, nearly 80% of users were identified as suspects in Sybil attacks. In response, Primitive developed a straightforward method for detecting and filtering these users. While Primitive uses this tool to remove noise that Sybil attacks impose on user data, other DeFi protocols can expand the open-source code to suit a large array of their own needs.

What is a Sybil attack?

DeFi protocols commonly use airdrops as a method to launch tokens. This method rewards early users of the protocol by "airdropping," or giving, the users free tokens. Sybil attacks can be initiated to exploit airdrops in DeFi protocols.

0x801D
March 27th, 2022

In 2020, the first alpha Primitive contracts were deployed for the V1 protocol. One of the peripheral contracts was discovered to have an approval vulnerability, which was detailed in the postmortem available here.

As the Primitive team prepares to launch the new, fully audited RMM Protocol smart contracts, we want to remind all of Primitive's early users to revoke any outstanding approvals for those vulnerable contracts made between December 2020 and February 2021. Those contracts are non-upgradeable, which means the only action possible must come from the user.

Users who interacted with the Alpha Primitive V1 protocol between December 01, 2020 - February 22, 2021 should revoke all approvals immediately for these contracts (1) and (2).

This is a fairly common vulnerability which makes it even more important for every user to be aware of proper approval management. Approvals should be exact instead of infinite, or revoked after users are finished with using a protocol.

0x801D
February 11th, 2022
tags: blog

Highlight of the Week!

  • Primitive's first discord and spaces town hall had over 250 listening to the team discuss the RMM Primer and Soulbound NFT. The twitter space was recorded here and the discord call audio will be uploaded soon (it's pinned in the discord).
0x801D
February 8th, 2022

Introduction

Primitive Replicating Market Maker ("RMM") is a supply source for tokens and option derivatives*. Existing as a free, unchangeable, and unowned protocol, RMM is the purest form of decentralized infrastructure.

Anyone has the freedom to provide capital to the RMM pools and earn fees, providing a service of filling the other side of token trades, and eventually option trades. There are no gatekeepers, no pausing (i.e. circuit breakers), and markets run 24/7.

By the end of this primer, you will have a better understanding of using the protocol to hedge risk or take advantage of time-based strategies as a market participant. There are concrete example scenarios to help you grasp the different nuances present in the protocol.

0x801D
January 31st, 2022

Highlight of the Week!

Secret highlight of the week, here’s a keccak256 hash of the description:

0af058d97be7c854b1c0d0287f6bbd7952930f14d3ca9e75626739b24011b1cf
0x801D
January 22nd, 2022

Highlight of the Week!

Most impactful highlight of the week is Verumlotus's implementation of a Theta Vault built on Primitive. It is based on Ribbon Finance's Theta Vaults, and manages liquidity in Primitive RMM pools on behalf of depositors.

Primitive Team

0x801D
January 15th, 2022

We are now 4 weeks into the RMM Interface Testnet, and the response from our community has been amazing. Since the beta launch, we have collected a litany of detailed bug reports, feature requests, and UX feedback. I bring great news, the devs have been doing something.

Beta 5 is now live at app.primitive.finance.

New Features

  • Alchemy: Using Alchemy as our default web3 provider, connecting a wallet is no longer necessary to view top pools.
  • Create Pools: Creating new pools using the Add Liquidity page is now enabled and functional.
  • Disable Permit: Introduced a new user setting that enables users to choose between permit and approve when using permit-enabled tokens.
0x801D
January 15th, 2022

Highlight of the week!

Overall highlight for the week is definitely Clément's gas comparison tool called Marmite.

Primitive Team

Along with that, it's been a productive week:

0x801D
January 13th, 2022

Optimizing Solidity code allows users to pay less transaction fees when they are interacting with dApps, however mastering gas golfing requires some tools and practice. Here comes Marmite: a Hardhat plugin helping developers perform gas cost comparisons among different Solidity code snippets.

"You can cook good Solidity recipes with marmite."

  • Clément Lakhal, Chief of Protocol at Primitive

Overview

Around Christmas last year, transmissions11 offered us one of the best gifts a team of Solidity developers could ever dream of: pull requests full of gas optimizations!

0x801D
December 31st, 2021
tags: blog

We are excited to open source the RMM SDK, a developer tool that makes it easier to build on top of the RMM protocol.

Interacting with any web3 protocol comes with hurdles: parsing on-chain data, modeling smart contract state, and displaying information in a clear way. This developer kit exposes several "entities", which are models of the smart contracts, and "managers" to help construct transactions (but not execute them!). Use the SDK to easily tap into the RMM protocol, derive useful information for users, and safely build transactions for them.

The Primitive team is using the SDK to build an innovative liquidity product on top of RMMs, and now anyone can do that with it being open source. The RMM protocol is designed to be maximally composable through its oracle-less, dependency minimized architecture. These are some of the straightforward use cases for the app layer of RMMs:

0x801D
December 24th, 2021
tags: blog

One week ago, the Primitive app for RMM protocol on rinkeby was shared in the Primitive discord and since then has done over 12,000 transactions!

https://rinkeby.app.primitive.finance
https://rinkeby.app.primitive.finance

Over 2,500 users hold RMM liquidity positions across six different test pools. In addition to that, the discord has almost 3,000 members along with more than 60 feature requests and 60 bug reports for the app.

0x801D
December 13th, 2021

Today the $1m bug bounty on the Primitive RMM smart contracts goes live. We are ruthlessly hunting any high level or critical issues in the smart contracts before they are launched this month.

View the bug bounty details on Immunefi.

Primitive directly handles a $250k portion of this bug bounty, while Sherlock has committed the remaining $750k. Being under the umbrella of Sherlock Protocol has improved the protocol security by tenfold through direct smart contract review, coverage, and incentivizing bugs to be reported rather than exploited.

The smart contracts have a scheduled audit starting in January with Trail of Bits. These audit weeks will cover the RMM contracts (which have already been audited). This final review will give us full confidence in the security of the protocol, cementing its status as an immutable and anti-fragile system, as all low-level primitives should.

0x801D
December 9th, 2021

Every user that interacts with a DeFi product runs the risk of total loss. This risk remains elusive to the user, overshadowed by intangible underlying risks. For all Primitive products, no user will walk away with zero if a hack or economic exploit takes place.

Primitive is purchasing $10m of coverage for its users through Sherlock Protocol. This entitles all users to claim a portion of USDC from the pool in the case of an adverse event.

This coverage also comes with the benefits of increased security:

  • $1m bug bounty incentivizes against black hat attacks
  • A future avenue of scaling coverage on Primitive products
  • Continuous audit capacity on smart contracts
0x801D
December 8th, 2021
dodoc birb
dodoc birb

Good documentation for a DeFi protocol is absolutely mandatory, but writing it can be sometimes cumbersome. Here comes Dodoc: a super simple Hardhat plugin allowing you to generate documentation for your smart contracts with no hassle!

Overview

A couple of weeks ago while wrapping up the contracts of our brand new Replicating Market Marker, we decided to have a look at the current solutions to generate and host our contracts documentation.

0x801D
December 7th, 2021

Acknowledgements

Building this protocol was a collaborative effort that could have not been done without the help of Alex Evans, Guillermo Angeris, Tarun Chitra, and Experience.

Introducing Primitive

Today, we are ecstatic to introduce the Replicating Market Maker ("RMM-01"), a spot exchange and derivative protocol.