<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Primitive</title>
        <link>https://paragraph.com/@primitive</link>
        <description>Derivatives without Oracles.

An alternative to traditional finance options. </description>
        <lastBuildDate>Wed, 06 May 2026 19:03:16 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Primitive</title>
            <url>https://storage.googleapis.com/papyrus_images/15dd6c4a72b3a8c0e0f5bfcdc8bea748d08f55882f0aed9d1468ec7ceb4e1716.png</url>
            <link>https://paragraph.com/@primitive</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Primitive Raises $9 Million in Series A Funding to Build AMM Discovery Platform]]></title>
            <link>https://paragraph.com/@primitive/primitive-raises-9-million-in-series-a-funding-to-build-amm-discovery-platform</link>
            <guid>EF5Si9am6yOCwNOgLUVn</guid>
            <pubDate>Thu, 18 Aug 2022 21:32:05 GMT</pubDate>
            <description><![CDATA[Primitive is thrilled to announce that we have raised $9 million in Series A funding. The round was led by Bain Capital Crypto and included participation from 1confirmation, Collab+Currency, Hart Lambur, Nascent, and Robot Ventures. In addition to Electric Capital and Framework Ventures, all investors participated in Primitive’s seed round, which raised $3 million. Primitive’s focus is to build innovative products oriented around Automated Market Makers (AMMs) and their evolving role in decen...]]></description>
            <content:encoded><![CDATA[<p>Primitive is thrilled to announce that we have raised $9 million in Series A funding. The round was led by Bain Capital Crypto and included participation from 1confirmation, Collab+Currency, Hart Lambur, Nascent, and Robot Ventures. In addition to Electric Capital and Framework Ventures, all investors participated in Primitive’s seed round, which raised $3 million.</p><p>Primitive’s focus is to build innovative products oriented around Automated Market Makers (AMMs) and their evolving role in decentralized finance (DeFi). These tools improve the experience of using AMMs and enable users to leverage this new class of financial instruments effectively.</p><h3 id="h-making-amms-more-accessible" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Making AMMs More Accessible</h3><p>AMMs are a type of decentralized exchange that enables anyone to participate as a market maker. Market making on AMMs allows users to extract revenue from transaction fees on orders that flow through the exchange. AMMs are essential to the DeFi ecosystem and allow anyone to bootstrap financial markets without participation from professional market-making firms.</p><p>Primitive will use our Series A funding to build products that make discovering popular AMM liquidity pools and strategies easier, powered by a new protocol and suite of DeFi development tools. For those curious but unfamiliar with AMMs, Primitive offers educational materials that empower users to broaden their understanding of DeFi.</p><p>“Over the past two years, we have realized that we can broaden DeFi’s adoption by focusing on user experience and creating easy-to-use tools for new and veteran crypto users alike,” said Angel, Founder and Chief Executive Officer of Primitive.</p><p>“Primitive offers advanced financial products and market-making strategies while retaining the elegance and simplicity of automated liquidity provision,” said Alex Evans at Bain Capital Crypto. “We are excited to work with the excellent Primitive team as they broaden access to powerful crypto-native financial instruments.”</p><h3 id="h-primitive-is-hiring" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Primitive is Hiring</h3><p>Today, the Primitive team is led by Angel, Zach Thielemann and Matt Czernik. The team includes twelve skilled individuals with unique expertise in smart contracts, mathematics, cryptography and design to identify demands in the market and build simple products that meet those demands. The company is currently expanding its NYC-based and globally remote teams. To learn more and apply, visit <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://jobs.primitive.xyz">https://jobs.primitive.xyz</a>.</p><h3 id="h-learn-more" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Learn More</h3><p>Primitive builds powerful infrastructure and innovative products in DeFi. Our team is committed to supporting the next generation of crypto users through education and simplified interfaces, and our research and development are driven by intention and integrity. Join the Primitive community on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/primitive">Discord</a> and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">Twitter</a>, and learn more about Primitive at <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.xyz/">https://primitive.xyz/</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/b7e9fed40764a39da82ac5534b28063029ef427f27be4c958cefaa1da65d2e0d.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[RMM-01 Dynamic Concentrated Liquidity Analysis 1
]]></title>
            <link>https://paragraph.com/@primitive/rmm-01-dynamic-concentrated-liquidity-analysis-1</link>
            <guid>59EH2xAtMHvlizuXk0Wg</guid>
            <pubDate>Thu, 14 Jul 2022 19:24:29 GMT</pubDate>
            <description><![CDATA[IntroductionLiquidity 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 vi...]]></description>
            <content:encoded><![CDATA[<h3 id="h-introduction" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Introduction</h3><p>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. </p><p>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.</p><p>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 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/pool-analytics/blob/main/RMM_Swaps_Stats_v3.ipynb">in this jupyter notebook</a>, and can be easily modified to analyze any other RMM-01 pool.</p><h3 id="h-pool-parameters" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Pool Parameters</h3><p>The parameters set by a recently expired ETH/USDC pool were defined as:</p><p>Strike price: 1255 USDC</p><p>Implied volatility: 77%</p><p>Time to maturity: 5 days</p><p>Initial reported price: 1107 USDC</p><p>By selecting a 1255 USDC strike price, which is higher than the initial reported price, we can discern that the liquidity was provided to this pool with the expectation of a positive price movement.  Setting the IV and time to maturity parameters tell the Black-Scholes equation how much volatility should be priced in and what the underlying volatility of the pool composition will be. Ideally, a pool composition that oscillates around a 50/50 split is the best outcome and is the most effective if liquidity can be dynamically concentrated around this split. </p><h3 id="h-directional-lp-performance" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Directional LP Performance</h3><p>We compared performance to a static portfolio equal to the composition of pooled assets at creation. While the static portfolio appreciated 12.249%, the RMM-01 replicating portfolio appreciated 12.596%, outperforming the static portfolio by over .3% as shown in the below chart. Unlike Uniswap pools, there is no impermanent loss from the upside gains of specifying an accurate liquidity direction on RMM-01.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6e2e21399207fe5af4d476e915efabb0dab3a520c515da3c589b0962a209fdda.png" alt="Static Portfolio vs RMM-01 Porftolio absolute returns" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Static Portfolio vs RMM-01 Porftolio absolute returns</figcaption></figure><p>We calculated realized volatility based on the ETH reported price in the chart below. The first half of the pool duration had an average volatility of 79% and swap volume of 541,472 USDC. In the second half, average volatility fell to 18% while swap volume increased to 783,097 USDC. Realized volatility followed IV more closely in the first half compared to the second half.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8146182bba467610c72032e18765527751d0e0b91e58d34a9a9d4907acb6c562.png" alt="Real Volatility vs IV" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Real Volatility vs IV</figcaption></figure><p>There were a total of 44 swaps routed through the pool that accounted for a total swap volume of 1,324,570 USDC. Total swap fees collected were 6,224 USDC and 5.8594 ETH for a total value of 13,548 USDC. Swaps on this pool represent 36% of all time swap volume and 12.6% of total swaps across all RMM-01 pools. Comparing volume with IV, more swap volume occurred when realized volatility was lower than IV. This means that the liquidity depth from the concentrated liquidity was thicker at the end of the pool than at the beginning because it facilitated more swap volume with less realized volatility, but less dynamic because the IV parameter didn’t accurately describe realized volatility.</p><p>The chart below shows how the replicating portfolio composition shifted from the original 690 ETH and 79,623 USDC to 756 ETH and 41.83 USDC. Although the pool composition shifted almost entirely to ETH, since the payoff function is being replicated by Black-Scholes, the riskiness of the different pool compositions remains the same.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ebd74bf564ce3d3532a9072c658c2d594ead6e51e748d5ce2d849fd1f31138cd.png" alt="IV, real volatility vs swap volume" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">IV, real volatility vs swap volume</figcaption></figure><p>As the reported price converged towards the strike price, the replicating portfolio composition approached a 50/50 split. However, the reported price ultimately did not end above the strike price, so the replicating portfolio composition shifted towards nearly 100% ETH. If the reported price had ended above the strike price, the replicating portfolio composition would have shifted towards 100% USDC.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e913ba6b23a9a601c2a09b7d789d1fd1870b46b5560f973137fc207aee1485cc.png" alt="Replicating Portfolio Portfolio Composition" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Replicating Portfolio Portfolio Composition</figcaption></figure><h3 id="h-analysis-of-dynamically-concentrated-liquidity-distributions" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Analysis of Dynamically Concentrated Liquidity Distributions</h3><p>To measure dynamically concentrated liquidity, we use a KDE to estimate various liquidity distributions and illustrate how liquidity dynamically concentrates over time. By observing the peaks in the chart below, we can see that liquidity was most concentrated when the pool was composed of 15% USDC and 80% ETH. There was not a large overlap where ETH/USDC reserves oscillated around 50/50. This implies liquidity could have been better dynamically concentrated.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f477c9f6223773999f45b92309059af3e793c4c4c1752647fff9bb863a299422.png" alt="Reserve Liquidity Distributions" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Reserve Liquidity Distributions</figcaption></figure><p>Creating another KDE on the swap distributions, we can see that swapping USDC to ETH had a very tight range compared to swapping ETH to USDC. If the terminal-reported price ended above the strike price, the portfolio composition would have become more USDC heavy, allowing a larger dynamic range for the USDC liquidity to be deployed. </p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2cb8e845227519682cf0b7139eed07ebb42d5c5145773e31a69cd487edc3373f.png" alt="Liquidity Depth Distributions" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Liquidity Depth Distributions</figcaption></figure><p>The liquidity efficiency measures the percent of the portfolio reserve used for market making. ETH to USDC swaps saw levels of usage around 5% of USDC reserves. USDC to ETH had a much larger usage, around 10-20% of ETH reserves. This means that liquidity was more dynamically concentrated around ETH reserves.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/084272a8c0119a15eff34e4a119e74637c7120187142debab30e89230e205010.png" alt="Dynamic Reserve Liquidity Utilization" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Dynamic Reserve Liquidity Utilization</figcaption></figure><h3 id="h-conclusion" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h3><p>In conclusion, we visually analyzed how this RMM-01 pool behaved. We saw how RMM-01 pools could be used for directional LPing and analyzed the results of having dynamically concentrated liquidity distributions. This pool was initialized with parameters that roughly predicted the direction of the market. However, the implied volatility parameter caused looser concentrated liquidity ranges, decreasing the efficacy of the dynamically concentrated liquidity. Further research will explore optimization of the IV parameter behavior on liquidity depth and the effect dynamically concentrated liquidity has on concentrated liquidity bounds in general.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[Sybil detection on DeFi protocols]]></title>
            <link>https://paragraph.com/@primitive/sybil-detection-on-defi-protocols</link>
            <guid>DFHNSFcYdIhYRr114uju</guid>
            <pubDate>Thu, 14 Jul 2022 01:38:51 GMT</pubDate>
            <description><![CDATA[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 r...]]></description>
            <content:encoded><![CDATA[<p>In April, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.xyz/">Primitive</a> launched its first product, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.mirror.xyz/Audtl29HY_rnhN4E2LwnP7-zjDcDGAyXZ4h3QpDeajg">RMM-01</a>, 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.</p><p>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.</p><h3 id="h-what-is-a-sybil-attack" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">What is a Sybil attack?</h3><p>DeFi protocols commonly use airdrops as a method to launch tokens. This method rewards early users of the protocol by &quot;airdropping,&quot; or giving, the users free tokens. Sybil attacks can be initiated to exploit airdrops in DeFi protocols.</p><p>The term &quot;Sybil attack&quot; originates from the main character in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://en.wikipedia.org/wiki/Sybil_(Schreiber_book)">&quot;Sybil&quot;</a> by Flora Rheta Schreiber. The book details a case study of a young girl who is thought to have Dissociative Identity Disorder. It was later revealed that the entire story was a ruse and Shirley Mason, the woman who inspired the character of Sybil, fabricated the different identities. In a Sybil attack, an entity generates a large quantity of pseudo-anonymous identities, akin to Sybil&apos;s multiple personalities in the book, to obtain a large influence over a network.</p><p>A common example of a Sybil attack is when a user, in anticipation of an airdrop, generates a large number of addresses, then deposits and removes tiny amounts of value from a DeFi protocol. This is referred to as &quot;airdrop farming,&quot; and is often facilitated algorithmically. Protocol developers look down upon airdrop farming because their goal is to reward engaged and authentic users; not bots.</p><h3 id="h-sybil-attacks-on-the-rmm-01-protocol" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Sybil attacks on the RMM-01 protocol</h3><p>Upon launching the RMM-01 protocol, the Primitive team set up a monitoring infrastructure to notify us when users add and remove liquidity. As the Total Value Locked (TVL) grew, we noticed a large quantity of the notifications were for very small amounts of liquidity that were almost immediately removed after they were added. The large volume of small transactions indicated that Liquidity Providers (LPs) were Sybil-ing the protocol in anticipation of an airdrop.</p><p>The noise from the Sybil attacks made it difficult to analyze the authentic user activity on the RMM-01 protocol. We realized the need to filter accounts that orchestrated Sybil attacks so that we could gain a more accurate understanding of the value that users derived from the protocol. After the accounts associated with Sybil attacks were filtered out, our data better reflected the activity of our unique users.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1004985dd1f7f27be37d5f3edb8c70d7d35e3d99b901c77143973fd7202b2eab.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>The script that we built in response to Sybil attacks serves as a tool for more accurately quantifying authentic users. At Primitive, we use the information derived from this process to better inform data-driven decisions and improve the RMM-01 protocol experience for our users. The script is fairly agnostic, so it can benefit other DeFi protocols in the same ways that it does RMM-01, or it can be extended to fit a wide array of needs for protocol developers.</p><h3 id="h-open-source-method-to-filter-sybil-attackers" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Open-source method to filter Sybil attackers</h3><p>In response to Sybil attacks on the RMM-01 protocol, the Primitive team has identified a straightforward methodology for compiling lists of addresses associated with Sybil attacks. Once this list is generated, the associated addresses can be blacklisted and disregarded.</p><p>The methodology and the corresponding detection scripts are open-source and can be found <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/sybil-detection">here</a>. This approach is ideal because anyone can use a small script on relevant contracts for their benefit. The script is configured by entering your <code>ETHERSCAN_API</code> key and <code>CONTRACT_TO_LOOK_AT</code> in a <code>.env</code> file.</p><p>The script queries a contract&apos;s transactions using the Etherscan API and compiles a list of addresses that interacted with the configured contract. Then, the script filters out transactions where no value was exchanged (such as token approvals). After this, the cost of the transaction is checked by multiplying the user&apos;s <code>cumulativeGasUsed</code> by <code>gasPrice</code>. If the cost of the transaction is greater than the <code>value</code> of the transaction, the script adds this address to an array of Sybil suspects.</p><h3 id="h-future-work" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Future work</h3><p>There are many ways to make this script more robust. One approach is to query all transactions from the Sybil suspects and check if they are a collection of deposits with the same <code>value</code>. This is a clear indication that the Sybil suspect&apos;s address is farming airdrops.</p><p>*Disclaimer: Primitive does not have a token or plans to release a token.</p><p>Written by <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xjepsen">0xJepsen</a></p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/cf11fcc6dbb21d5ba0399a768a0d06e6e754e48633efaa63a975eb6009eeee02.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[December 2020 Alpha Primitive V1 Security Reminder]]></title>
            <link>https://paragraph.com/@primitive/december-2020-alpha-primitive-v1-security-reminder</link>
            <guid>jHqaFCOxuBkviFo01MLy</guid>
            <pubDate>Sun, 27 Mar 2022 21:59:19 GMT</pubDate>
            <description><![CDATA[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&apos;s early users to revoke any outstanding approvals for those vulnerable contracts made between December 2020 and February 2021. Those contracts are n...]]></description>
            <content:encoded><![CDATA[<p>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 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitivefinance.medium.com/postmortem-on-the-primitive-finance-whitehack-of-february-21st-2021-17446c0f3122">here</a>.</p><p>As the Primitive team prepares to launch the new, fully audited RMM Protocol smart contracts, we want to remind all of Primitive&apos;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.</p><p><strong>Users who interacted with the Alpha Primitive V1 protocol between December 01, 2020 - February 22, 2021 should revoke all approvals immediately for these contracts </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://etherscan.io/address/0x66fD5619a2a12dB3469e5A1bC5634f981e676c75"><strong>(1)</strong></a><strong> and </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://etherscan.io/address/0x9Daec8D56CDCBDE72abe65F4a5daF8cc0A5bF2f9"><strong>(2)</strong></a><strong>.</strong></p><p>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.</p><p>Here are some valuable resources to learn more about the approval related vulnerabilities:</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitivefinance.medium.com/postmortem-on-the-primitive-finance-whitehack-of-february-21st-2021-17446c0f3122">https://primitivefinance.medium.com/postmortem-on-the-primitive-finance-whitehack-of-february-21st-2021-17446c0f3122</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://dydx.exchange/blog/deposit-proxy-post-mortem">https://dydx.exchange/blog/deposit-proxy-post-mortem</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/zapper-protocol/post-mortem-sushiswap-uniswap-v2-zap-out-exploit-84e5d34603f0">https://medium.com/zapper-protocol/post-mortem-sushiswap-uniswap-v2-zap-out-exploit-84e5d34603f0</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://etherscan.io/tokenapprovalchecker">https://etherscan.io/tokenapprovalchecker</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://v1.primitive.finance/reset">https://v1.primitive.finance/reset</a></p></li></ul><p><strong>What addresses are vulnerable?</strong></p><p>We made a public Dune query that is available <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://dune.xyz/queries/533708">here</a>, which displays the vulnerable addresses.</p><p>We&apos;ve identified 11 active infinite approvals for either WETH or DAI. We have confirmed three of these vulnerable addresses have received our messages and will take action to revoke approvals. Three of the remaining addresses are inactive, with no transactions after interacting with the Primitive V1 Protocol and no tokens or ether. This leaves five addresses, two of which hold more than $1K worth of value. All of these 11 addresses have been contacted by the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://etherscan.io/address/0x9f97dc371092a290eddef91c4da3eba19edd456c">security.primitive.eth</a> account through Etherscan&apos;s blockscan chat feature.</p><p>While no tokens are at risk now, if WETH or DAI are transferred to these addresses with the approvals, they immediately become at risk.</p><p>These vulnerable addresses made the approvals over a year ago, and while we have brought the list down from 100 to just 8 through continuous monitoring and contact attempts, these 8 open approvals can still put a significant amount of funds at risk if WETH or DAI are transferred to them.</p><p><strong>Going forward</strong></p><p>These contracts deployed in 2020 and early 2021 were experimental and in an alpha stage. The Primitive team has learned from this incident, which is why all smart contracts are audited at least twice by professional 3rd party security firms.</p><p>Infinite token approvals are permanent until they are revoked. DeFi moves very quickly, with new projects launching daily. Token approvals can quickly be forgotten about and linger—in this case for over a year. After using a new protocol, we highly recommend revoking approvals to keep your tokens safe.</p><p><strong>Contact us</strong></p><p>These are the dedicated security channels for contacting Primitive:</p><ul><li><p>Send a message on Etherscan&apos;s blockscan chat to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://etherscan.io/address/0x9f97dc371092a290eddef91c4da3eba19edd456c">security.primitive.eth</a></p></li><li><p>Email <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="mailto:security@primitive.finance">security@primitive.finance</a></p></li><li><p>Send a message to the Primitive Twitter account: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/PrimitiveFi">https://twitter.com/PrimitiveFi</a></p></li></ul>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[Primitive Weekly February 6, 2022]]></title>
            <link>https://paragraph.com/@primitive/primitive-weekly-february-6-2022</link>
            <guid>bvI2ucJb2f5Yjv8imR6j</guid>
            <pubDate>Fri, 11 Feb 2022 23:55:29 GMT</pubDate>
            <description><![CDATA[tags: blogHighlight of the Week!Primitive&apos;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&apos;s pinned in the discord).Primitive TeamRMM Primer was published on Tuesday, the first in a series of educational manuals for using the protocol. Read it here.Soulbound NFT concept was published on github. The initial implementation by Alex is...]]></description>
            <content:encoded><![CDATA[<h6 id="h-tags-blog" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">tags: <code>blog</code></h6><h2 id="h-highlight-of-the-week" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Highlight of the Week!</h2><ul><li><p>Primitive&apos;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 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/i/spaces/1yNGaYnaRXnGj">here</a> and the discord call audio will be uploaded soon (it&apos;s pinned in the discord).</p></li></ul><h2 id="h-primitive-team" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Primitive Team</h2><ul><li><p>RMM Primer was published on Tuesday, the first in a series of educational manuals for using the protocol. <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.mirror.xyz/Audtl29HY_rnhN4E2LwnP7-zjDcDGAyXZ4h3QpDeajg">Read it here</a>.</p></li><li><p>Soulbound NFT concept was <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/soulbound">published on github</a>. The initial implementation by Alex is the starting point for developing this novel mechanism.</p></li><li><p>Trail of Bits began the review of the fixes on the rmm-core smart contracts.</p></li><li><p>Product team integrated support for native Ether into the app.</p></li></ul><h2 id="h-from-the-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">From the Community</h2><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xMin/status/1491485830027923459">0xMin wrote a tweet</a> thread mentioning Primitive is a way to improve the liquidity of options in DeFi.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xperp/status/1491249975942352896">0xPerp wrote a notes summary of Primitive&apos;s first town hall</a>!</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/llllvvuu">L</a> wrote an interesting <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/llllvvuu/status/1491258714002968576">tweet thread on replicating vanilla call options</a> using RMMs + Squeeth.</p></li></ul><h2 id="h-next-week-february-13" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Next week - February 13</h2><ul><li><p>Soulbound NFT Updates.</p></li><li><p>Launch is on the horizon 🚢.</p></li></ul><h2 id="h-how-to-get-on-primitive-weekly" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to Get on Primitive Weekly</h2><ul><li><p>Connect us with an artist to make nice art for these weekly posts - or all the posts we have!</p></li><li><p>Write a tweet thread mentioning the @primitivefi twitter handle.</p></li><li><p>Write an article that mentions Primitive or RMM protocol.</p></li><li><p>Open issues or pull requests on the open source repositories that fix typos, bugs, or to suggest features.</p></li><li><p>Join the team part or full time and make contributions.</p></li></ul>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[RMM Primer - A friendly guide for Primitive and AMMs]]></title>
            <link>https://paragraph.com/@primitive/rmm-primer-a-friendly-guide-for-primitive-and-amms</link>
            <guid>RR0EcAoQtAicKUl615Xv</guid>
            <pubDate>Tue, 08 Feb 2022 16:58:27 GMT</pubDate>
            <description><![CDATA[IntroductionPrimitive 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 prime...]]></description>
            <content:encoded><![CDATA[<h3 id="h-introduction" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Introduction</h3><p>Primitive Replicating Market Maker (&quot;RMM&quot;) 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.</p><p>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.</p><p>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.</p><p>Read more to learn about the primitive behind the magic.</p><p>*<em>Replicated option derivative payoffs, not option contracts. </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.analystforum.com/t/replication-in-derivatives/124631"><em>&quot;In layman’s terms, replication is four fives for a twenty: they behave exactly the same (they’re each worth twenty dollars), but they look completely different (one is four pieces of paper, the other is one piece of paper)&quot;</em></a><em>. There are no promises the payoffs will be received.</em></p><h2 id="h-decentralized-exchanges-are-liquidity-sources" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Decentralized Exchanges are Liquidity Sources</h2><p>This primer assumes a basic knowledge about decentralized exchanges, token trading, and popular protocols like Uniswap, Curve, and Balancer. Token trading is the most fundamental backbone to decentralized finance - enabling more markets like lending and derivatives.</p><h4 id="h-dex-volume-2019-2022" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Dex Volume 2019 - 2022</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1cb7ad07e7dae0ec67e7d461b3e51f286bda043b5ef7ca63f9610a95fc4589c8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Without knowing anything about these protocols in the chart, it goes far to know that the majority of them rely on the same &quot;idea&quot;, and together they make up almost all of the token trading activity on Ethereum.</p><p>This section is a brief overview on how these dexes work and how they can be used for token and option trading.</p><h3 id="h-how-to-make-a-decentralized-exchange" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">How to Make a Decentralized Exchange</h3><h4 id="h-trading-curves-of-different-protocols" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Trading curves of different protocols</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a66894a77881384548aeca4a7f39a9047392f52bf641ed9880856afc3033caf7.png" alt="Different AMMs" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Different AMMs</figcaption></figure><p>Constant Function Market Maker (&quot;CFMM&quot;) based decentralized exchanges (e.g. Uniswap, Curve, Balancer) facilitate the lion&apos;s share of on-chain token trading volumes. The success of CFMMs as spot markets can be attributed to several crucial properties that they all share: ability to support any token pairs, high degree of capital efficiency, predictable behavior, and a relatively straightforward user experience. At a high level, CFMMs facilitate trades between two counterparties, &quot;traders&quot; (users that swap one token for another) and &quot;liquidity providers&quot; (users that make their tokens available for trades to earn fees).</p><h4 id="h-constant-function-market-maker-trading" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Constant Function Market Maker Trading</h4><h4 id="h-trading-in-a-primitive-rmm-pool" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Trading in a Primitive RMM Pool</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8c573a4c4bdf75f2888d3765a205a544484aff3443e1bb2bb97fd2269891d830.png" alt="RMM pools with different IV" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RMM pools with different IV</figcaption></figure><h4 id="h-buyers" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Buyers</h4><p>Traders are users that own one token (e.g. ETH) and demand another (e.g. USDC). Traders swap assets on a CFMM by sending transactions specifying some amount of tokens for other tokens, less a small fee. The average price a trader pays is dependent on both the ratio and amount of tokens in the pool prior to the swap (e.g. 100ETH/100,000USDC), the trade size (smaller swaps beget a better average price), and the trading function (we&apos;ll get to this later).</p><h4 id="h-suppliers" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Suppliers</h4><p>On the other side of this trade are the liquidity providers. Liquidity providers add two tokens to a liquidity pool contract. This liquidity contract accepts transactions swapping from token A to token B and token B to token A. Whenever traders execute swaps from either direction, liquidity providers collect fees proportionally based on their provided tokens compared to the total tokens in the pool.</p><h4 id="h-market-making" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Market Making</h4><p>From a high level, tokens are made available by market participants to be the other side of trades for users who want to swap their tokens. The tokens available are implictly priced by a rule, called the trading function, which comes from basic math. This technology works exceptionally well on networks like Ethereum because it automates the process of supplying tokens to the other side of trades; a reason they are often called Automated Market Makers (&quot;AMMs&quot;).</p><h2 id="h-how-to-earn-a-return-using-cfmms" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to Earn a Return using CFMMs</h2><h4 id="h-payoff-of-liquidity-in-cfmms" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Payoff of Liquidity in CFMMs</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cf39fbce31d63178a2228892b9d3d6b39e55e034474c2eca5865155315498771.png" alt="Payoff Comparison" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Payoff Comparison</figcaption></figure><h4 id="h-liquidity-providers" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Liquidity Providers</h4><p>In this section we will dig a bit deeper into what it means to provide liquidity to a CFMM, as well as how/when you might want to do so.</p><h4 id="h-price-of-the-asset-over-time" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Price of the Asset over time</h4><p>The final payoff of a liquidity position on a CFMM is determined by the trading function and the asset&apos;s <em>price path</em>. Price path is taking into account the prices that the asset has reached over a time period. There are unique price paths along which providing liquidity to a CFMM can be advantageous or disadvantageous. Say, for example, your portfolio (a liquidity position) has 1 ETH and 0 USDC. If the price of ETH doubles, your portfolio value will also double.</p><h4 id="h-impermanent-or-divergence-loss" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Impermanent, or Divergence, Loss</h4><p>In the case of the ETH 2x price path, if you had provided liquidity to a CFMM that demands an equal weighted (50% ETH, 50% USDC) portfolio, you would have suffered what&apos;s known colloquially as &quot;Impermanent Loss&quot; (opportunity cost) by not capturing the full increase in ETH&apos;s price because the portfolio was not 100% exposed to it. This phenomenon occurs because as the price of one asset in a CFMM pool increases, LPs are effectively buying the cheaper asset (in this case USDC) on the way up. You would&apos;ve profited in the end, but you would&apos;ve missed out on that sweet sweet 2x.</p><h4 id="h-status-quo-strategy" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Status Quo Strategy</h4><p>So when does providing liquidity to a CFMM work to your advantage? The strategy name for adding liquidity to a CFMM which maintains a constant portfolio weight of an amount of assets is &quot;mean reversion&quot;. A mean reversion strategy wants the prices of the token pair in a liquidity pool to be correlated in the medium run. In the ETH 2x case described earlier, in order to obtain the optimal terminal payoff the price of ETH would have to drop 50% to that at which you had initially added liquidity (hence the name, impermanent loss).</p><h4 id="h-in-summary" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">In summary</h4><p>Providing liquidity to a CFMM creates a portfolio that is implicitly long a mean reversion strategy where price variation works in your favor so long as the prices of the assets revert to that which it was originally.</p><h2 id="h-options" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Options</h2><h3 id="h-what-is-a-call-option" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">What is a call option?</h3><h4 id="h-long-call-option" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Long Call Option</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/87937183914ab6eb0746fbfc777db5c5d94561175c66f0e3059a4313355869d8.png" alt="Long Call Payoff" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Long Call Payoff</figcaption></figure><h4 id="h-buying-calls" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Buying Calls</h4><p>Before getting back to CFMMs, let&apos;s walk through a brief primer on call options. A call option gives the right to purchase an asset for a pre-determined price up until an expiration date. These properties of an agreed upon price and expiration date give the <strong>call option</strong> itself its own value, beyond the underlying asset. To own a call option in traditional markets, it is purchased from another party on an options exchange.</p><h4 id="h-short-call-option-asset-covered-call" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Short Call Option + Asset - Covered Call</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b0ec9ada50a25305c0f4fcb805d3ea5fef06b21727ccd27aaaeae80b2901b047.png" alt="Covered Call Payoff" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Covered Call Payoff</figcaption></figure><h4 id="h-supplying-calls" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Supplying Calls</h4><p>The party selling (shorting) a call option is liable to sell their assets if the option buyer chooses to exercise, (buy the asset for the strike price). In traditional exchanges, most of these assets do not need to be put up as collateral because the terms of the option contract are legally enforceable. However, in DeFi, there is no way to enforce the delivery of the underlying assets, unless they are already deposited. It&apos;s for this reason that call options in DeFi are collateralized, and this <strong>combined position of selling a call option + depositing the collateral is a covered call option</strong>.</p><h2 id="h-covered-call-options-and-cfmms" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Covered Call Options and CFMMs</h2><p>Earlier in this article we discussed how <strong>CFMM liquidity maps onto a unique payoff structure</strong> (mean reversion). Likewise, covered call options offer their own distinct payoff structure.</p><p>Covered call strategies and mean reversion are similar in that they both offer what&apos;s called a &quot;concave payoff&quot;. To summarize, a concave payoff is a payoff that has a discrete central barrier at which returns are maximized (see above graph).</p><p>In the case of a call option, that barrier is located at the strike price (K). That is to say, the max payoff for a party selling a call option is obtained if the price of the underlying is equal to exactly K at expiry. Similarly, the max payoff of a CFMM liquidity provider is obtained if the price of the underlying token reverts to its initial price.</p><p>The <strong>important difference</strong> between these two strategies is rooted in the fact that covered calls allow you to take a directional view on future price. Choosing a strike price greater than the market price of an asset implies a <strong>directionally bullish opinion</strong> on the asset price.</p><h2 id="h-rmm-is-a-covered-call-cfmm" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">RMM is a Covered Call CFMM</h2><h4 id="h-the-curve" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">The Curve</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c164600d62c76bece72ff9b11162761d0c3773b83d9bccb28263384d02bdf8ab.png" alt="RMM" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RMM</figcaption></figure><p><strong>RMM curves value pool assets based on price, volatility, and <em>time</em>.</strong> It is these properties which make RMM a new primitive.</p><h4 id="h-the-payoff" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">The Payoff</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/85a071e4bf54d20e419162b53dc7b710297192e0e968245878f963b417069d0d.png" alt="Payoff of RMM" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Payoff of RMM</figcaption></figure><h4 id="h-change-in-implied-volatility-all-else-constant" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Change in Implied Volatility - All else constant</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b8e1dcd7ac84d7860c8f014ddd88e9c7fe9373c9493768f2acf4a2912ceee70f.png" alt="RMM Parameters - IV" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RMM Parameters - IV</figcaption></figure><h4 id="h-price-of-swapping-on-different-iv-curves" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Price of swapping on different IV Curves</h4><p>RMM curves with different implied volatilities will have different costs when swapping. Trading in a higher IV curve will lead to a higher price of the asset being purchased, while trading in a lower IV curve is the opposite. This will affect the external arbitrageurs who only rebalance pools when it is profitable to do so - there must be a larger profit opportunity in higher IV pools to warrant a rebalance. This has the consequence of affecting the fees that will be generating, as less rebalancing means less fees.</p><h4 id="h-change-in-time-until-expiry-all-else-constant" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Change in Time until Expiry - All else constant</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d566d0b6aa9a287d9321d61de19f3395473ccc0539e3dce552f9d0079f2b3c18.png" alt="RMM Parameters - Maturity" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RMM Parameters - Maturity</figcaption></figure><h4 id="h-price-of-swapping-as-pool-gets-closer-to-expiry" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Price of swapping as pool gets closer to expiry</h4><p>If only time changed, the curve also experiences &quot;Liquidity Compression&quot; until trades can be executed at a fixed cost equal to the strike price. This compression is sometimes described as &quot;concentration around the strike price&quot;, as the price of the asset is constant and equal to the strike price as expiration.</p><h4 id="h-rmm-curve-changes-over-time" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">RMM Curve Changes over Time</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b1fb37b3f1d3d8fcaee53a0faf216ab0fa2189ce297db953d94f5a4df9455575.png" alt="RMM Parameters - Maturity" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RMM Parameters - Maturity</figcaption></figure><h4 id="h-time-until-expiry-affects-expected-fees" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Time until expiry affects expected fees</h4><p>The distance between the curves with a lot of time until expiry and zero time until expiry is equal to the total fees expected to be earned by the liquidity provider. This does depend on the implied volatility and swap fee of the curve, as these parameters impact the probability of capturing the expected fees.</p><h3 id="h-rmm-liquidity" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">RMM Liquidity</h3><p>Primitive RMMs benefit from the same properties present in other CFMMs, but with the distinct advantage of being able to express more nuanced opinions about future price.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3dfeaa7aeeead93e15feaf8c68af0ec44032519a23fd2ecf4aa65898f2f3bade.png" alt="Example #1" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Example #1</figcaption></figure><p>These are some of the additonal benefits you can see from using RMM in lieu of other CFMMs:</p><ol><li><p>Liquidity providers choose the point at which impermanent loss begins (K).</p></li><li><p>Liquidity providers can directly bet on volatility (σ), earning more or less fees depending on the accuracy of the bet.</p></li><li><p>Liquidity providers earn theta over time, i.e. fees generated as pools get closer to expiration (τ).</p></li></ol><h4 id="h-choose-a-price-strategy" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Choose a price strategy</h4><p>With RMM you&apos;re not limited to mean reversion strategies. Instead, you can deploy a position that expresses a directional view on the future price of a token. Doing so requires thoughtful strike price (K) and expiry (τ) selection. For example, if the price of ETH is 3000 USDC, but you believe that one month from now that price will be 4000 USDC, you can express that view by providing liquidity to an RMM that expires in one month (τ = 1 month) with a strike price of 4000 USDC/ETH (K = 4000 USDC). This position has the highest expected return if the price of ETH reaches a terminal value of 4000 USDC at expiry. The caveat to this is that if you&apos;re incorrect about the price path, for example if ETH goes to 2000 USDC in that same timespan, you are exposed to greater impermanent loss and will likely make <em>less</em> fees relative to a comparable xy=k position (how about hedging with another RMM?).</p><h4 id="h-choose-a-volatility-strategy" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Choose a volatility strategy</h4><p>How about that volatility (σ) thing? In general, a volatility near the market IV (<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://lambert-guillaume.medium.com/on-chain-volatility-and-uniswap-v3-d031b98143d1">just check the chain</a>) for a given pair should serve as a good proxy for volatility selection. Volatility in an RMM prescribes the degree of liquidity concentration around the strike price. If the strike price of the curve is set to 4000 USDC, a 100% position will have <em>less</em> concentrated liquidity at 4000 USDC versus a 90% one. That means the 100% position would likely earn less fees than the 90% one, should the terminal price at expiry land at 4000 USDC. The tradeoff here comes in the form of greater impermanent loss for lower volatility positions.</p><h4 id="h-rmm-liquidity-tokens" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">RMM Liquidity Tokens</h4><p>Every liquidity token minted from depositing into a CFMM has a <strong>payoff</strong>. For RMM, the <strong>liquidity token payoff is a covered call</strong>.</p><p>The method to convert this payoff into the trading function is explained in the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://rmm.eth.xyz">Replicating Market Makers</a> paper. Primitive&apos;s RMM protocol is an implementation of this.</p><h2 id="h-ways-to-use" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Ways to use</h2><h3 id="h-provide-liquidity" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Provide Liquidity</h3><ul><li><p>Each RMM is a two token pool which accepts deposits and mints RMM liquidity tokens. These liquidity tokens are a new DeFi primitive designed to replicate the payoff of a covered call by capturing theta decay through trading fees.</p></li></ul><h3 id="h-swap" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Swap</h3><ul><li><p>Every pool is composed of two tokens which can be exchanged for one another at any time up until the <em>expiration date</em> of the pool. Trading fees are earned by the liquidity providers on a continuous pro-rata basis and are re-invested into the pool.</p></li></ul><h3 id="h-defi-protocols" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">DeFi Protocols</h3><ul><li><p>The RMM liquidity tokens are instantly redeemable at any time for their underlying assets. This makes it a highly composable instrument that can be <strong>used as a collateral asset</strong> for borrowing. Adoption for CFMM LP tokens has grown immensely in 2021, which are now supported across some of the top protocols like Tribe and Aave.</p></li></ul><h3 id="h-as-a-market-making-vault" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">As a Market Making Vault</h3><ul><li><p>Liquidity in RMMs must be rebalanced based on time, volatility, and price. Along with that, the pool&apos;s trading fee is also a parameter than can be chosen by a pool creator. Vault strategies can be built around time preferences or volatility preferences, giving end users easy access to a huge source of sustainable yield: theta.</p></li></ul><h3 id="h-as-a-structured-product-vault" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">As a Structured Product Vault</h3><ul><li><p>Structured products maintain a portfolio of assets or derivatives which follow a strategy on behalf of depositors. RMM liquidity tokens can be used as a tool to hedge out risk (e.g. underlying asset price risk) or tap into specific exposures, like theta.</p></li></ul><h3 id="h-as-a-large-yield-optimizing-vault" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">As a Large Yield Optimizing Vault</h3><ul><li><p>One of the hurdles for yield optimizing vaults is as they scale into TVL of $ billions, there are not many sources which can sustain strong returns. The theta from options comes with risk, but it also is sourced directly from the volatility of the underlying asset. Vaults which utilize option strategies can earn outsized yields in high volatility environments.</p></li></ul><h2 id="h-comparisons" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Comparisons</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e9a4c33366666731ffe86e1844801a19e298648ef5f894306c8b44719ab0be9d.png" alt="Comparison Table of Payoffs" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Comparison Table of Payoffs</figcaption></figure><h3 id="h-compared-to-uniswap-xyk-curve" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Compared to Uniswap xy=k curve:</h3><ul><li><p>Impermanent loss only occurs after the strike price, making liquidity provision <em>directional</em>.</p></li><li><p>RMM curves concentrate liquidity over time vs. Uniswap V3&apos;s fixed concentrated liquidity.</p></li><li><p>Trading fees are designed to be dependent on time and volatility, while Uniswap&apos;s fees are dependent on volatility.</p></li></ul><h3 id="h-compared-to-covered-call-options-in-defi" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Compared to Covered Call Options in DeFi:</h3><ul><li><p>No reliance on oracles reduces risk and easily supports long-tail assets.</p></li><li><p>No need for a direct counter-party to generate theta/fees.</p></li><li><p>Instantly redeemable for underlying and quote asset vs. covered calls which is a position that needs to be closed in an exchange.</p></li><li><p>Highly composable and a better collateral asset because of redeemability.</p></li></ul><h2 id="h-liquidity-provision-in-practice" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Liquidity Provision in Practice</h2><p>Covered calls are inherently directional bets which are best to take advantage of in high volatility environments. It is ideal to provide liquidity when the underlying asset&apos;s volatility is high, and the expected price of the asset will not exceed the strike price by expiration.</p><h4 id="h-choosing-your-strategy" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Choosing your strategy</h4><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/216e0b1db5ee4bc47048bd66435315e943fce6e31ceddc9106014ec437982f21.png" alt="RMM Curve Parameters" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RMM Curve Parameters</figcaption></figure><p>Each RMM Pool is a &quot;theta curve&quot; with the following set of parameters:</p><ul><li><p><strong>Strike price</strong>: Each liquidity token is composed of strike price amount of quote tokens if the price of the underlying asset is greater than this strike price. When the pool expires, the underlying asset can be bought or sold for this strike price amount. This will incentivize the re-balancing of the pool such that the each liquidity pool token is worth strike price of the quote asset.</p></li><li><p><strong>Implied Volatility</strong>: The expected volatility of the underlying asset over the time period until the expiration date. Higher implied volatility will make trades have higher price impact (cost), and lower implied volatility will make trades have lower price impact. If realized volatility of the asset is less than the chosen implied volatility, there is a lower chance that liquidity providers get their expected theta (trading fees).</p></li><li><p><strong>Maturity</strong>: The expiration date at which no more trading in the pool can occur, and thus no more trading fees can be generated. Liquidity providers can withdraw their liquidity at any time, before or after.</p></li><li><p><strong>Gamma</strong>: Used to compute the trading fee of the pool. For example, if a pool&apos;s trading fee is 1%, its <code>gamma</code> will be 99%. Each swap must pay the trading fee to the liquidity providers, which gets automatically re-invested into the pool.</p></li></ul><h3 id="h-example-1-choosing-a-far-strike-price" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Example #1 - Choosing a Far Strike Price</h3><p>On January 10, 2022, Alice notices the volatility of YFI has increased sharply since announcing their new tokenomics plan. The coin trades at $32,000 right now, and Alice believes it won&apos;t exceed $100,000 by March. Alice also believes it can double in value to $64,000 by then. She wants to take advantage of the volatility and price movement, so she provides liquidity to an RMM that expires March 11, 2022, with a strike price of $100,000 and implied volatility of 150%.</p><p>The amount of value in stable units (e.g. $) of liquidity that Alice must provide is calculated using the <strong>Portfolio Value formula</strong>:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5cbf55a25b03bb60ddd1acd653bd1fc0b740c2e23209759857d322d677364c2f.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-depositing-tokens" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Depositing Tokens</h3><h4 id="h-to-summarize-the-initial-position-on-january-10" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">To summarize the initial position on January 10:</h4><ul><li><p>Current Price: $32,000</p></li><li><p>Strike Price: $100,000</p></li><li><p>Maturity: March 11, 2022</p></li><li><p>Time until expiry: ~3 Months</p></li><li><p>Implied Volatility: 150%</p></li><li><p>Value of Alice&apos;s deposit V(S) in $: (0.8737 + $2909) = $30,868</p></li><li><p>Value of Alice&apos;s deposit V(S) in YFI: (0.8737 + $2909/$32000) = 0.964</p></li></ul><h4 id="h-derived-information" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Derived information:</h4><ul><li><p>Call price with those parameters is C: ~$1,132</p></li></ul><p>Notice how the value of the covered call is just the current price less the premium. E.g. S - C = V(S), $32,000 - $1,132 = $30,868.</p><h4 id="h-capital-efficiency" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Capital Efficiency</h4><p>Therefore, liquidity is being <strong>efficiently</strong> used to &quot;back&quot; these tokens that have the payoff of a covered call. When compared to covered calls issued on other option protocols, full collateralization is required, sometimes even locked, to mint the call tokens. Going further, these LP tokens are instantly redeemable for their underlying assets at any time, which makes it a strong collateral asset. Using the LP token as a collateral asset to leverage a position is capital efficiency increase that RMM is capable of supporting - but that is left to a future primer.</p><h4 id="h-on-or-after-expiration" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">On or After Expiration</h4><p>Let&apos;s say assumptions proved right for Alice, and three months later YFI is trading at $77,000 with implied volatility over the period being effectively realized. The most important assumption here is the choice of implied volatility (IV). If the realized volatility of the underlying asset diverges from the choice of IV, its possible the replication is not as precise. In that scenario, Alice would have been better off moving their liquidity a lower IV curve. But, because RV was close to IV, the replication was very precise and Alice got the expected payoff. This is a <strong>critical</strong> choice that is being made when liquidity is provided.</p><h4 id="h-exiting-position-at-expiry" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Exiting Position at Expiry</h4><p>The pool has eclipsed its expiration timestamp, and Alice decides to exit her position. Assuming the pool had sufficient liquidity to attract traders and arbitrageurs, the trading fees and final swaps should cause the pool to be 100% composed of YFI.</p><p>This is because the underlying assets in an expired RMM pool can be bought or sold for the strike price. This will incentivize traders/arbitrageurs to purchase all the underlying assets from the pool if the price of asset (e.g. on another dex) is more than the strike price. In the opposite scenario, traders/arbitrageurs will sell as much underlying assets to the pool until the pool only has underlying assets in the if there exists a reference price of the asset that is less than the strike price.</p><h3 id="h-withdrawing-tokens" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Withdrawing Tokens</h3><h4 id="h-march-11-2022-alice-removes-liquidity-when-yfi-is-dollar77000-and-realized-volatility-over-that-period-was-155percent" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">March 11, 2022: Alice removes liquidity when YFI is $77,000 and realized volatility over that period was 155%.</h4><ul><li><p>YFI Price: $77,000 (~2.4x increase).</p></li><li><p>Realized volatility &gt;= Implied volatility, therefore high probability that the LP token in practice has this payoff.</p></li><li><p>Liquidity token composition: 0.00% in $, 100.00% in YFI</p></li><li><p>Value of Alice&apos;s deposit V(S) in $: $77,000 (~2.5x increase, $77,000 / $30,868).</p></li><li><p>Value of Alice&apos;s deposit V(S) in YFI: 1 (+3.73% increase in YFI, 1 / 0.964 ).</p></li></ul><p>Alice took the risk of redeeming $100,000 if YFI&apos;s price was above that by expiration date. In exchange, she is rewarded with the 3.73% gain in YFI. This extra return denominated in the asset also led to an overall higher return when denominated in a stable coin. Notice that YFI&apos;s price increased by 240% and Alice&apos;s position increased by 250%, 10% more.</p><h3 id="h-example-2" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Example #2</h3><p>Alice loves using RMMs, she made a strong risk-adjusted return and felt confident in the security of the protocol.</p><p>She continues to believe that in 3 months YFI will not be above $100,000, so she decides to enter in a new position.</p><h3 id="h-depositing-tokens" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Depositing Tokens</h3><h4 id="h-march-20-2022-alice-provides-liquidity-when-yfi-is-dollar80000" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">March 20, 2022: Alice provides liquidity when YFI is $80,000</h4><ul><li><p>Current Price: $80,000</p></li><li><p>Strike Price: $100,000</p></li><li><p>Maturity: June 21, 2022</p></li><li><p>Time until expiry: ~3 Months</p></li><li><p>Implied Volatility: 150%</p></li><li><p>Value of Alice&apos;s deposit V(S) in $: (0.469 YFI + $25062) = $62,582</p></li><li><p>Value of Alice&apos;s deposit V(S) in YFI: (0.469 + $25062/$80000) = 0.782</p></li></ul><h4 id="h-derived-information" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Derived information:</h4><ul><li><p>Call price with those parameters is C: ~$17,418</p></li></ul><h4 id="h-on-or-after-expiration" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">On or After Expiration</h4><p>Unfortunately, this time Alice was wrong. Its June 21, 2022 and YFI is trading at $135,000. What happened to her deposit?</p><h3 id="h-withdrawing-tokens" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Withdrawing Tokens</h3><h4 id="h-june-21-2022-alice-removes-liquidity-when-yfi-is-dollar135000-and-the-realized-volatility-over-that-period-was-around-150percent" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">June 21, 2022: Alice removes liquidity when YFI is $135,000 and the realized volatility over that period was around 150%.</h4><ul><li><p>YFI Price: $135,000 (~1.6875x increase).</p></li><li><p>RV &gt;= IV, high chance replication success if sufficient liquidity in pool during lifetime.</p></li><li><p>Liquidity token composition: 100.00% in $, 0.00% in YFI</p></li><li><p>Value of Alice&apos;s deposit V(S) in $: $100,000 (~1.5979x in $, $100,000 / $62,582).</p></li><li><p>Value of Alice&apos;s deposit V(S) in YFI: 0.7407 (-5.3% decrease in YFI, 0.7407 / 0.782).</p></li></ul><p>While Alice did get a good return in $, if she wanted to earn a return denominated in YFI she would have been better off to hold all of her deposit in YFI. The actual price of YFI was more than the strike price of the pool, $35,000 more, which incentivized arbitrageurs to buy all the YFI from the pool at a price of $100,000. The pool is then 100% composed of $, which liquidity providers like Alice eventually withdraw.</p><h4 id="h-so-what-was-the-tradeoff-that-alice-took" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">So, what was the tradeoff that Alice took?</h4><ul><li><p>Trading lower probability of potential gains (YFI price increase above $100k) for higher probability of profits (trading fees).</p></li></ul><p>In the opposite scenario, If YFI&apos;s price was <em>below</em> $100,000 at the maturity:</p><ul><li><p>Alice withdraws 1 YFI, earning a 28% (!!!!) return on YFI. <em>Note: High return because of IV parameter curve being high, and realized volatility was close to it</em>.</p></li></ul><p>And what was the belief/purpose of providing liquidity to RMM?</p><ul><li><p>Not confident in YFI being above $100,000 in 3 months.</p></li><li><p>Wanted to capture trading fees, i.e. theta decay, generated from YFI&apos;s volatility.</p></li><li><p>Wanted to earn a return denominated in YFI.</p></li></ul><h2 id="h-rmm-strategies" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">RMM Strategies</h2><h3 id="h-choose-impermanent-loss-price-point" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Choose Impermanent Loss Price Point</h3><p>In short term bearish environments, like a prospective FOMC meeting, prices are dampened and volatility is heightened. This is an optimal time period to take advantage of RMM. By providing liquidity, the exposure to the underlying asset will be maintained assuming the strike price is high enough, and higher volatility will warrant higher fees (if the liquidity is there).</p><p>In comparison to a CFMM like Uniswap, any price change in the underlying asset which does not revert to the initial entry price will miss out on potential gains (opportunity cost) from the asset, while RMM pools will only miss gains on the asset if the pool expires &quot;in the money&quot;; when the market price of the asset is above the strike price of the pool.</p><p>On the other hand, this opportunity cost in Uniswap would be in the LPs benefit in the scenario the underlying price fell off a cliff. In that scenario, the RMM LPs will be left holding 100% the underlying asset, which could potentially go to zero.</p><p>This directionality is not available in any AMM curves because those curves are not aware of time or strike prices.</p><h3 id="h-hedge-options-with-rmm" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Hedge Options with RMM</h3><p>Hedging options is called a dynamic hedge because it is a position which counters another position&apos;s <em>greek</em> exposures. Greeks are planned to be explained in a future option primer, but for now they can be thought of as symbols to represent the change in the option&apos;s value depending on price, volatility, or time. For example, if an option changes value because of time (theta), the dynamic hedge will also change by the same magnitude from the same change in time.</p><p>An option&apos;s value is derived in part from the underlying asset&apos;s price. The greek symbol <code>delta</code> is used as a quantitative metric for how much value the option&apos;s value changes when the underlying asset&apos;s price changes. Going further, the greek symbol <code>gamma</code> is the metric for how much the <code>delta</code> changes when the underlying asset price changes. Gamma exists for options because if the underlying asset price gets closer or further away from the strike price, there is more/less probability the asset price will be above the strike. If the option is not above the strike by its maturity date, then it&apos;s worthless. Therefore, <code>delta</code> is sometimes used as a proxy for the <em>probability of being in the money</em>. Gamma is one of the primary reasons options are such a popular instrument, because purchasing gamma (buying the call option) is cheaper (but has the same returns) as purchasing delta (buying the asset).</p><p>Call options have a positive gamma, which means a hedge cannot only be in the underlying asset (which has no gamma), it must be a negative gamma position. Uniswap liquidity tokens have negative gamma, but it&apos;s not a straightforward hedge for a call option because it does not match its gamma.</p><p>RMM liquidity tokens replicate a covered call payoff, which means its close to a perfect hedge (almost) for calls. Along with that, it&apos;s negative gamma so it can be used to hedge other gamma positive positions.</p><p>Why hedge a call option with a short call option? A rough example of an opportunity is if call options on another protocol are underpriced, they can be purchased and then hedged with an RMM liquidity position, capturing the difference in premiums.</p><h2 id="h-rmm-risks" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">RMM Risks</h2><p>While these are the expected results of providing liquidity to RMM, its entirely possible that no fees are generated at all. However, in that case it would mean the pool&apos;s liquidity is not rebalanced. This might end up in the LP&apos;s favor anyway. For example, if no trading occurred in the pool Alice deposited to, and thus no fees were generated, the initial deposit would be the same. At that point, she&apos;d be withdrawing some YFI along with the $, rather than only $.</p><p>A no trading fees scenario occur for several reasons:</p><ul><li><p>Realized volatility is lower than the curve&apos;s implied volatility, increasing the arbitrage profit window and reducing the amount of trading fees generated.</p></li><li><p>Liquidity in Alice&apos;s pool is too small for many trades to happen.</p></li><li><p>Liquidity in Alice&apos;s pool does not create enough profitable opportunities for arbitrageurs to trade the pool.</p></li><li><p>The pool is not known well/integrated into a dex aggregator/known by arbitrageurs/searchers.</p></li></ul><h2 id="h-oracle-risks" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Oracle Risks</h2><p>None.</p><h2 id="h-smart-contract-risks" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Smart Contract Risks</h2><h3 id="h-have-the-smart-contracts-for-rmm-been-audited" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Have the smart contracts for RMM been audited?</h3><p>Yes. RMM protocol contracts have been audited by five security firms, <strong>making it one of the most audited set of smart contracts in DeFi</strong> (if not the most):</p><ul><li><p>Trail of Bits - 8 weeks</p></li><li><p>ChainSecurity - 8 weeks</p></li><li><p>ABDK - 4 weeks</p></li><li><p>Dedaub - 4 weeks</p></li><li><p>Sherlock - continuous</p></li></ul><p>While these audits give high confidence in the protocol&apos;s security, the smart contracts still have the possibility of containing bugs. Along with the audits, Primitive has a <strong>$1,000,000</strong> bug bounty on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://immunefi.com/bounty/primitive/">Immunefi</a>, and <strong>$10,000,000</strong> of coverage by <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://sherlock.xyz">Sherlock</a>.</p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>Primitive RMM is a highly composable primitive for DeFi that will bring more liquidity to on-chain options. Liquidity tokens can be used as a collateral asset in lending and derivative protocols, increasing the capital efficiency and usage of the underlying tokens.</p><p>RMM protocol fixes the poor liquidity environment for on-chain options and it&apos;s going live in a couple of weeks. You in?</p><h3 id="h-resources" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Resources</h3><p>Visit the website here: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a></p><p>Follow Primitive on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">twitter</a>.</p><p>Frequently answered questions: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance/faq">FAQ</a>.</p><p>Community Discord: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/primitive">Discord</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[Primitive Weekly January 23, 2022]]></title>
            <link>https://paragraph.com/@primitive/primitive-weekly-january-23-2022</link>
            <guid>S4B7jSg3Wsiwi0TZHre5</guid>
            <pubDate>Mon, 31 Jan 2022 02:06:37 GMT</pubDate>
            <description><![CDATA[Highlight of the Week!Secret highlight of the week, here’s a keccak256 hash of the description:Primitive TeamInterface release candidate is prepared, with UI/UX updated to latest design framework.Trail of Bits team’s last week of review for rmm-core and rmm-manager.Final changes and fixes have been merged to rmm-core and rmm-manager smart contracts.Clement built a custom alert discord bot to monitor rmm protocol transactions!From the CommunityQuiet from the community this week.Next week - Jan...]]></description>
            <content:encoded><![CDATA[<h2 id="h-highlight-of-the-week" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Highlight of the Week!</h2><p>Secret highlight of the week, here’s a keccak256 hash of the description:</p><pre data-type="codeBlock" text="0af058d97be7c854b1c0d0287f6bbd7952930f14d3ca9e75626739b24011b1cf
"><code></code></pre><h2 id="h-primitive-team" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Primitive Team</h2><ul><li><p>Interface release candidate is prepared, with UI/UX updated to latest design framework.</p></li><li><p>Trail of Bits team’s last week of review for rmm-core and rmm-manager.</p></li><li><p>Final changes and fixes have been merged to rmm-core and rmm-manager smart contracts.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/alexangelj/status/1486786315316195328">Clement built a custom alert discord bot</a> to monitor rmm protocol transactions!</p></li></ul><h2 id="h-from-the-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">From the Community</h2><ul><li><p>Quiet from the community this week.</p></li></ul><h2 id="h-next-week-january-30" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Next week - January 30</h2><ul><li><p>Mainnet launch.</p></li></ul><h2 id="h-how-to-get-on-primitive-weekly" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to Get on Primitive Weekly</h2><ul><li><p>Connect us with an artist to make nice art for these weekly posts - or all the posts we have!</p></li><li><p>Write an educational tweet thread mentioning the @primitivefi twitter handle.</p></li><li><p>Write an educational article that mentions Primitive or RMM protocol.</p></li><li><p>Open issues or pull requests on the open source repositories that fix typos, bugs, or to suggest features.</p></li><li><p>Join the team part or full time and make contributions</p></li></ul>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[Primitive Weekly January 16, 2022]]></title>
            <link>https://paragraph.com/@primitive/primitive-weekly-january-16-2022</link>
            <guid>qPRJggXDYJEyYZnCYL0P</guid>
            <pubDate>Sat, 22 Jan 2022 22:01:59 GMT</pubDate>
            <description><![CDATA[Highlight of the Week!Most impactful highlight of the week is Verumlotus&apos;s implementation of a Theta Vault built on Primitive. It is based on Ribbon Finance&apos;s Theta Vaults, and manages liquidity in Primitive RMM pools on behalf of depositors.Primitive TeamUI/UX/Interface team migrated the app&apos;s components to a new framework connected to our new design system mocked.Trail of Bits team (Natalie and Simone) continued work on end-to-end echidna tests for rmm-core.Clément started wo...]]></description>
            <content:encoded><![CDATA[<h2 id="h-highlight-of-the-week" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Highlight of the Week!</h2><p>Most impactful highlight of the week is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/verumlotus/status/1484367632711053312">Verumlotus&apos;s</a> implementation of a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/verumlotus/status/1484367632711053312">Theta Vault built on Primitive</a>. It is based on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.ribbon.finance/">Ribbon Finance&apos;s</a> Theta Vaults, and manages liquidity in Primitive RMM pools on behalf of depositors.</p><h2 id="h-primitive-team" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Primitive Team</h2><ul><li><p>UI/UX/Interface team migrated the app&apos;s components to a new framework connected to our new design system <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/mocked">mocked</a>.</p></li><li><p>Trail of Bits team (<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/NatalieChin7">Natalie</a> and Simone) continued work on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-core/pull/260">end-to-end echidna tests for rmm-core</a>.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/clemlak">Clément</a> started working on a proof-of-concept contract for an <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-examples/blob/feat/autopool/contracts/autoPool/AutoPool.sol">&quot;Auto Pool&quot;</a>.</p></li></ul><h2 id="h-from-the-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">From the Community</h2><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0x_emperor">0xEmperor</a> mentioned <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0x_emperor/status/1484799222075752451?s=21">Primitive in a mirror post</a> in which they break down the paper &quot;Improved Price Oracles: Constant Function Market Makers&quot;.</p></li></ul><h2 id="h-next-week-january-23" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Next week - January 23</h2><ul><li><p>App Release Candidate #1 will be deployed, with the new UI.</p></li></ul><h2 id="h-how-to-get-on-primitive-weekly" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to Get on Primitive Weekly</h2><ul><li><p>Connect us with an artist to make nice art for these weekly posts - or all the posts we have!</p></li><li><p>Write an educational tweet thread mentioning the @primitivefi twitter handle.</p></li><li><p>Write an educational article that mentions Primitive or RMM protocol.</p></li><li><p>Open issues or pull requests on the open source repositories that fix typos, bugs, or to suggest features.</p></li><li><p>Join the team part or full time and make contributions</p></li></ul>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[RMM Interface Beta 5 Release]]></title>
            <link>https://paragraph.com/@primitive/rmm-interface-beta-5-release</link>
            <guid>mh39ccu6M7oyEFk6uq4w</guid>
            <pubDate>Sat, 15 Jan 2022 02:08:09 GMT</pubDate>
            <description><![CDATA[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 FeaturesAlchemy: 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...]]></description>
            <content:encoded><![CDATA[<p>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.</p><p>Beta 5 is now live at <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://app.primitive.finance/">app.primitive.finance</a>.</p><h2 id="h-new-features" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">New Features</h2><ul><li><p><strong>Alchemy</strong>: Using Alchemy as our default web3 provider, connecting a wallet is no longer necessary to view top pools.</p></li><li><p><strong>Create Pools</strong>: Creating new pools using the Add Liquidity page is now enabled and functional.</p></li><li><p><strong>Disable Permit</strong>: Introduced a new user setting that enables users to choose between permit and approve when using permit-enabled tokens.</p></li></ul><h2 id="h-bug-fixes" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Bug Fixes</h2><ul><li><p>General stability improvements from integrating the newly released rmm-ethers package.</p></li><li><p>2-3x loading time improvements across the interface.</p></li><li><p>Removing liquidity is now fully functional, no more crashing.</p></li><li><p>Transaction notification log is now working.</p></li><li><p>Transaction processing speed improved.</p></li><li><p>Pools accessible without injected provider connection due to Alchemy provider.</p></li></ul><h2 id="h-future-improvements" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Future Improvements</h2><ul><li><p><strong>Design Refresh</strong>: We are currently preparing a complete design overhaul. The UX of the interface will not change much, but this new design system is a 10x improvement aesthetically.</p></li><li><p><strong>Wallet Improvements</strong>: Next up on the priority list is adding additional wallet types, such as Wallet Connect, and improving the UX for changing networks and connecting wallets.</p></li><li><p><strong>Protocol Onboarding</strong>: RMM-01 is a complicated protocol, and while we love answering questions in the discord, we are building a more comprehensive onboarding process into the RMM Interface.</p></li><li><p><strong>Improved Transaction History</strong>: A history of transactions populated via rmm-ethers will be available to view the name of the transaction and status.</p></li></ul><h2 id="h-user-feedback" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">User Feedback</h2><p>To make bug reports or feature requests, please visit <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://primitive.canny.io">primitive.canny.io</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[Primitive Weekly January 9, 2022]]></title>
            <link>https://paragraph.com/@primitive/primitive-weekly-january-9-2022</link>
            <guid>mxFeyXrc7kf7wqlDfeyr</guid>
            <pubDate>Sat, 15 Jan 2022 02:02:59 GMT</pubDate>
            <description><![CDATA[Highlight of the week!Overall highlight for the week is definitely Clément&apos;s gas comparison tool called Marmite.Primitive TeamAlong with that, it&apos;s been a productive week:Estelle discovered a novel way to rebalance between RMM pools to minimize losses. Paper is in the works.Alex😇 finished a beta version of the rmm-ethers package, a transaction helper for interacting with rmm protocol.Zach, Rj, John, and Kinrezc shipped an app update which is summarized by Zach here.Royce finished t...]]></description>
            <content:encoded><![CDATA[<h2 id="h-highlight-of-the-week" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Highlight of the week!</h2><p>Overall highlight for the week is definitely <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/clemlak/status/1481770794653196288">Clément&apos;s</a> gas comparison tool called <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/mirror.primitive.eth/iHeEodUc7YkXp4AiB6g8pNHepUeE2bOTLxCC5FnsmNA">Marmite</a>.</p><h2 id="h-primitive-team" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Primitive Team</h2><p>Along with that, it&apos;s been a productive week:</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xEstelle">Estelle</a> discovered a novel way to rebalance between RMM pools to minimize losses. Paper is in the works.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/alexangelj/status/1482090060480593920">Alex😇</a> finished a beta version of the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/alexangelj/status/1482090060480593920">rmm-ethers</a> package, a transaction helper for interacting with rmm protocol.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/_zachdt">Zach</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/roborrj">Rj</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/johncomposed">John</a>, and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/Kinrezc">Kinrezc</a> shipped an app update which is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/_zachdt/status/1482171027471876096">summarized by Zach here</a>.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/rollsmorr_">Royce</a> finished the first draft of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/mocked">Mocked</a> a web3 focused design system, and began using it in the new Primitive UI skin.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/johncomposed">John</a> made progress on building the actual components based on the design system using stiches by Radix ui.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/alexangelj">Alex😇</a> updated the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-core/pull/261">rmm-core contract</a> tests to be 50% faster and work with ganache.</p></li></ul><h2 id="h-from-the-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">From the Community</h2><p>We&apos;d also love to show case some of the community efforts towards Primitive - along with this we plan to announce more details about our bounty program.</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/whoisndu/status/1480970389035573251">whoisndu</a> wrote a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://whoisndu.substack.com/p/primitive-finance">substack</a> article in which they dove into order books, AMMs, and derivatives in DeFi. Along with that whoisndu gave an excellent overview of Primitive RMM protocol.</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xYoann/status/1477672828778463245">0xYoann</a> wrote an overview of Primitive on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/tiyo.eth/CNvtK0VGDymJaSNSJZgtbEE2iHsroZ9ixMYC2P6N7LE">mirror</a>. Yoann discusses constant function market makers and on-chain derivatives, it&apos;s a great primer for anyone interested any of those topics!</p></li><li><p>(Past month) <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/transmissions11">transmissions11</a> got their gas optimization changes merged into the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-core/pull/254">rmm-core contracts</a>!</p></li></ul><h2 id="h-next-week-january-16" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Next week - January 16</h2><ul><li><p>********* Primer. (🤫)</p></li><li><p>App update called &quot;Beta 6&quot; with a re-skinned UI.</p></li><li><p>Bounty program (not bug bounty, we already have that!).</p></li></ul><h2 id="h-how-to-get-on-primitive-weekly" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to Get on Primitive Weekly</h2><ul><li><p>Connect us with an artist to make nice art for these weekly posts - or all the posts we have!</p></li><li><p>Write a tweet thread mentioning the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">@primitivefi</a> twitter handle.</p></li><li><p>Write an article that mentions Primitive or RMM protocol.</p></li><li><p>Open issues or pull requests on the open source repositories that fix typos, bugs, or to suggest features.</p></li><li><p>Join the team part or full time and make contributions</p></li></ul>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
        <item>
            <title><![CDATA[Introducing Marmite: Hassle-free Solidity gas cost comparisons]]></title>
            <link>https://paragraph.com/@primitive/introducing-marmite-hassle-free-solidity-gas-cost-comparisons</link>
            <guid>qd0fE1gcSKpG884kw7sX</guid>
            <pubDate>Thu, 13 Jan 2022 21:38:44 GMT</pubDate>
            <description><![CDATA[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 PrimitiveOverviewAround Christmas last year, transmissions11 offered us one of the best gifts a team of Solidity deve...]]></description>
            <content:encoded><![CDATA[<p>Optimizing Solidity code allows users to pay less transaction fees when they are interacting with dApps, however mastering <em>gas golfing</em> requires some tools and practice. Here comes Marmite: a Hardhat plugin helping developers perform gas cost comparisons among different Solidity code snippets.</p><blockquote><p>&quot;You can cook good Solidity recipes with marmite.&quot;</p><ul><li><p>Clément Lakhal, Chief of Protocol at Primitive</p></li></ul></blockquote><h2 id="h-overview" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Overview</h2><p>Around Christmas last year, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/transmissions11">transmissions11</a> offered us one of the best gifts a team of Solidity developers could ever dream of: pull requests full of gas optimizations!</p><p>This kind of spawned in us a desire to gas golf our contracts even deeper, but we quickly realized that we didn’t have a proper tool to help us test different Solidity implementations and compare the gas costs.</p><p>So after sending our smart-contracts to a final audit (performed by <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.trailofbits.com/">Trail Of Bits</a> team), we decided that it was time to build this new tool!</p><h2 id="h-whats-the-soup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What’s the soup?</h2><p>Marmite allows you to write different implementations of some Solidity code directly in your contracts, and then obtain a gas cost comparison among them.</p><p>These declarations are done using the tags <code>@start&lt;Implementation-name&gt;</code> and <code>@end</code>:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/396086772bdfb9ae845d157eba5a255d65ee892922752c4d77cb06226c29df6c.png" alt="Inline solidity comparisons" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Inline solidity comparisons</figcaption></figure><p><em>Note: Implementations are meant to be used during the process of gas optimization and should not be kept in final contracts.</em></p><p>Once you’ve done that, the next step is simply to run the <code>golf:contract</code> command:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/bfb64ed7672d4c110ecc575e505156ee3ee757eb71185cc9ef65e49073a3af3f.png" alt="Gas comparison using Marmite" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Gas comparison using Marmite</figcaption></figure><p>If you have a more complex setup (with multiple contracts deployed) or a specific environment, you can write a script using the Marmite context function:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1bab7d036a408fd3e63cfe80d287161ec55b3ba8090866bfe244267f66abed51.png" alt="Customizing the gas comparison" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Customizing the gas comparison</figcaption></figure><p>After that, you can use the <code>golf:script</code> task to execute the script:</p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>Marmite offers a simple and flexible way to compare gas costs directly in your contracts, and in case you were wondering: it supports any Solidity versions!</p><p>If you want to try it out, check out the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/hardhat-marmite">README</a> on GitHub for the installation and usage instructions.</p><p>Happy gas golfing!</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/hardhat-marmite">Marmite on GitHub</a></p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/gYDVGNPVz8">Primitive Discord</a></p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/6038664cd9a175bd3ac4117e010c6def58c1a238cee0f5d32d81d50af54d87fd.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Primitive RMM SDK]]></title>
            <link>https://paragraph.com/@primitive/primitive-rmm-sdk</link>
            <guid>8iiXttUr8Nz2IaeM42QN</guid>
            <pubDate>Fri, 31 Dec 2021 19:53:51 GMT</pubDate>
            <description><![CDATA[tags: blogWe 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 us...]]></description>
            <content:encoded><![CDATA[<h6 id="h-tags-blog" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">tags: <code>blog</code></h6><p>We are excited to open source the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-sdk">RMM SDK</a>, a developer tool that makes it easier to build on top of the RMM protocol.</p><p>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 &quot;entities&quot;, which are models of the smart contracts, and &quot;managers&quot; 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.</p><p>The Primitive team is using the SDK to <strong>build an innovative liquidity product on top of RMMs</strong>, and now anyone can do that with it being open source. The RMM protocol is designed to be <strong>maximally composable</strong> through its <strong>oracle-less</strong>, dependency minimized architecture. These are some of the straightforward use cases for the app layer of RMMs:</p><ul><li><p>Structured Products</p></li><li><p>Vault Strategies</p></li><li><p>Swapping</p></li></ul><p>Tools like this will be used to increase adoption of these unique liquidity tokens for everyone using Primitive, from <strong>liquidity staking</strong> to <strong>volatility harvesting vaults</strong>. This SDK remains narrowly focused on the main smart contracts, while being powerful enough to build several products from it.</p><h3 id="h-discord" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Discord</h3><p>We have an open server with specific channels for discussing products:</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/primitive">Join here</a></p><h2 id="h-for-developers" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">For Developers</h2><p>Comprehensive documentation of the sdk is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-sdk/blob/main/docs/sdk/rmm-sdk.md">here</a>.</p><h3 id="h-entities" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Entities</h3><p>These products all need to tap into a property of the Primitive pool&apos;s underlying math, whether that is calculating amounts for swaps, or computing the deterministic pool ids that are dependent on curve parameters. There are three typescript classes which are used as models to make this easily accessible:</p><ul><li><p>Engine entity</p></li><li><p>Calibration entity</p></li><li><p>Pool entity</p></li></ul><h4 id="h-engine-entity" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Engine Entity</h4><p>The Engine entity is utilized to deterministically compute the address for pairs, the smart contract called &quot;Primitive Engine&quot;. It needs the Primitive Factory address and the two token addresses to be instantiated, that&apos;s it!</p><h4 id="h-calibration-entity" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Calibration Entity</h4><p>Calibration extends the Engine, enabling a pool id to be deterministically computed based on the parameters:</p><ul><li><p>strike price (in wei)</p></li><li><p>implied volatility (sigma)</p></li><li><p>maturity (expiry date)</p></li><li><p>gamma (100% - swap fee %)</p></li></ul><p>These two entities are designed to be stateless, i.e. they are not instantiated with on-chain data, only the parameters, token addresses, and Primitive Factory address.</p><h4 id="h-pool-entity" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Pool Entity</h4><p>The Pool goes further with extending the Calibration, but it can also be instantiated from on-chain data. This pool models the entire state of a pool: its reserves, invariant, and calibration parameters. Along with it, the model exposes useful functions to derive information for users, e.g. amount much liquidity they receive for when providing an amount of tokens.</p><h4 id="h-simulating-pools" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Simulating Pools</h4><p>A simulated pool model can be instantiated using <code>fromReferencePrice</code>. The user must pass in a <code>referencePrice</code> of the asset to infer what the reserves would be. This can be useful to determine the arguments for creating pools or allocating liquidity to a new pool based on its parameters, rather than on-chain state.</p><h4 id="h-creating-pools" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Creating Pools</h4><p>If a user were to create a new pool, they should be asked for a reference price, which can then be used to instantiate the pool&apos;s theoretical reserves. From this, the optimal amounts of liquidity to add can be computed, and then the transaction could be constructed.</p><h4 id="h-creating-the-pool-entity" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Creating the Pool Entity</h4><p>An easy way to build the Pool entity is available through the peripheral contracts. The Primitive Manager smart contract has a function <code>uri</code> which accepts a <code>poolId</code> as an argument. Calling this will return some encoded json data, which can be decoded and then passed directly to the Pool entity&apos;s <code>from</code> method, returning a Pool entity that&apos;s &quot;synced&quot; to the same block as the <code>uri</code> call.</p><p>This is the optimal way to instantiate the pools, as a bundle of <code>uri</code> calls can be batched in a multicall.</p><h2 id="h-managers" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Managers</h2><p>Along with the entities are &quot;managers&quot;. These expose easy functions to encode function selectors and arguments to build a transaction&apos;s calldata.</p><h3 id="h-periphery-manager" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Periphery Manager</h3><p>This class is designed to match the Primitive Manager smart contract&apos;s public functions. Primitive Manager inherits a Multicall contract, making it possible to bundle several transactions to the Primitive Manager in a single transaction.</p><h4 id="h-multicall-example" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Multicall Example</h4><p>For example, a &quot;zap&quot; is a way to provide liquidity to a two-or-more token pool with only one token. How it works: some of the tokens are first swapped to the token of the other side(s) of the pool, and then all the tokens are provided as liquidity. With multicall, its possible to do this without an on-chain function!</p><p>It takes two steps:</p><ul><li><p>Given an amount of $ value to provide, denominated in one token, compute amount of liquidity tokens that could be minted (i.e. $ to provide / $ value per liquidity token)</p></li><li><p>Given an amount of LP tokens, compute how much of each side of the pool is required</p></li><li><p>Compute the amount needed to swap to get the other side of the pool</p></li><li><p>Add the swap transaction to an array of calldata</p></li><li><p>Push the allocate liquidity calldata to the same array</p></li><li><p>Wrap the calldata in a multicall!</p></li></ul><p>There are nuances here, but that&apos;s the general idea.</p><h4 id="h-encoding-function-data" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Encoding function data</h4><p>Each of the static methods on the PeripheryManager expose an easy way to build ready-to-send transaction payloads to the on-chain PrimitiveManager contract. Mix and match these methods to build all kinds of useful functions!</p><p>Here are some ideas:</p><ul><li><p>Roll positions (update a liquidity position from one expiration to another)</p></li><li><p>Single-asset liquidity provision (zaps)</p></li><li><p>Distribute liquidity across curves at different implied volatilities</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/alexangel.eth/XUtGuUBPkh0UIHNVd1XglC79gtjJeUPwBGha64aePww">Tokenless AMM</a></p></li></ul><h3 id="h-factory-manager" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Factory Manager</h3><p>The factory contract only has a single function <code>deploy</code>. This manager has a static method to encode this function selector with two token addresses, which will deploy a new PrimitiveEngine contract.</p><h3 id="h-dependencies" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Dependencies</h3><p>This SDK relies on an ethers.js wrapper: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/Alexangelj/web3-units">web3-units</a>.</p><p>Along with that, it uses the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/Uniswap/sdk-core">Uniswap Token Entity from their sdk-core package</a>.</p><p>Primitive pools have a trading function, which the Pool entity computes using the typescript implementation in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-math">rmm-math</a>.</p><h1 id="h-helpful-links" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Helpful links</h1><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-sdk">Use the RMM SDK now!</a></p><h2 id="h-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Community</h2><p>Go tell your friends about the <strong>oracle-free</strong> derivative protocol launching soon with concentrated and fungible liquidity.</p><p>To meet the rest of us, join the discord:</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/primitive">Primitive discord</a></p><h2 id="h-published-on-mirror" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Mirror</h2><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/mirror.primitive.eth">mirror.primitive.eth</a></p><h2 id="h-published-on-primitive-blog" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Primitive Blog</h2><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance/blog">blog</a></p><h2 id="h-learn-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Learn More</h2><h4 id="h-visit-the-website" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Visit the website</h4><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a></p><h4 id="h-visit-the-docs" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Visit the docs</h4><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance">primitive documentation</a></p><h4 id="h-follow-primitive-on-twitter" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Follow Primitive on twitter</h4><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">primitivefi</a></p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/6beaaa5f0822fe92ac5f8a6a70a43c2f7b49b2a55f2be97f3d9685e9e733f747.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[RMM Protocol Testnet]]></title>
            <link>https://paragraph.com/@primitive/rmm-protocol-testnet</link>
            <guid>2NDna5l4YKpZLRQYtPMA</guid>
            <pubDate>Fri, 24 Dec 2021 21:30:52 GMT</pubDate>
            <description><![CDATA[tags: blogOne 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.financeOver 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.What is RMM protocol?The Replicating Market Maker ("RMM") protocol was built for a reason: to bu...]]></description>
            <content:encoded><![CDATA[<h6 id="h-tags-blog" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">tags: <code>blog</code></h6><p>One week ago, the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://rinkeby.app.primitive.finance">Primitive app</a> for RMM protocol on rinkeby was shared in the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/primitive">Primitive discord</a> and since then has done over <strong>12,000</strong> transactions!</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/782f1e0854ac92694503127d3b2bd1d51120c328c6879165fa3d563841243760.png" alt="https://rinkeby.app.primitive.finance" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">https://rinkeby.app.primitive.finance</figcaption></figure><p>Over <strong>2,500</strong> users hold RMM liquidity positions across six different test pools. In addition to that, the discord has almost <strong>3,000</strong> members along with more than 60 feature requests and 60 bug reports for the app.</p><h2 id="h-what-is-rmm-protocol" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What is RMM protocol?</h2><p>The Replicating Market Maker (&quot;RMM&quot;) protocol was built for a reason: to build <strong>novel liquidity products</strong> from <strong>innovative financial vehicles</strong>.</p><p>Any user of RMM has access to derivative payoffs <strong>without reliance</strong> on oracle systems or counterparties.</p><h2 id="h-whats-next" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What&apos;s next?</h2><p><strong>Mainnet will be in January</strong>. The team is following a strict quality process to get to mainnet.</p><p>This version of the app helped narrow down the remaining issues that broke the interface. Significant upgrades are being developed in parallel to the fixes to ensure the app is an extremely reliable interface for RMM protocol.</p><p><strong>The next scheduled upgrades to the app:</strong></p><ul><li><p>Beta 3: <em>Current</em></p></li><li><p>Beta 4: 1-week expiry pools, 1 chosen feature request, bug fixes and performance updates</p></li><li><p>Beta 5: 1 chosen feature request, better and faster data</p></li><li><p>Beta 6: Style updates + final bug fixes, 1 chosen feature request</p></li><li><p>Release Candidate 1: Final release before mainnet</p></li><li><p>Release Candidate x: If any bugs found in a release candidate, fixed here</p></li><li><p>Mainnet: With a reliable interface, tested contracts, and exceptional UX mainnet can be launched!</p></li></ul><h2 id="h-pipeline" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Pipeline</h2><p>Along with the app, these are some interesting products the team is exploring:</p><ul><li><p>Tokenized Theta (an up-only token)</p></li><li><p>Vanilla options (long call and long put options)</p></li><li><p>Binary options</p></li></ul><p>Each of these simply interacts with the RMM-01 liquidity token in a different way, it&apos;s the <strong>ultimate DeFi lego</strong>.</p><p>The smart contract team is working on contracts that will improve adoption for the liquidity token, including an <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-examples/blob/main/contracts/primitiveChef/PrimitiveChef.sol">LP staking contract</a>.</p><h2 id="h-adoption" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Adoption</h2><p>The team is focused on writing better documentation, building reliable tooling, and following best security practices in preparation mainnet launch. These upgrades, scheduled by end of year, will make it easier to build on the RMM protocol:</p><ul><li><p>Docs overhaul with better and more concrete examples</p></li><li><p>User guides to understand risks, rewards, and how to best use the protocol and its products</p></li><li><p>Private discord for the teams who want to build on RMM-01</p></li></ul><h2 id="h-closing-thoughts" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Closing thoughts</h2><p>Each of these items will improve every user&apos;s experience on mainnet launch. The goal all along:</p><p>A reliable interface that can work in a decentralized setting, simple examples to understand building on RMM, and basic user guides to make the learning process easier.</p><h1 id="h-helpful-links" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Helpful links</h1><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://rinkeby.app.primitive.finance">Use the testnet now!</a></p><h2 id="h-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Community</h2><p>Go tell your friends about the <strong>oracle-free</strong> derivative protocol launching soon with concentrated and fungible liquidity.</p><p>To meet the rest of us, join the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/primitive">Primitive discord</a>.</p><h2 id="h-published-on-mirror" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Mirror</h2><p>Read this post on mirror: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/mirror.primitive.eth">mirror.primitive.eth</a>.</p><h2 id="h-published-on-primitive" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Primitive</h2><p>Read this on the Primitive blog: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance/blog">blog</a>.</p><h2 id="h-learn-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Learn More</h2><p>Visit the website: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a>. Visit the docs: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance">primitive documentation</a>. Follow Primitive on twitter: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">primitivefi</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/14a6f65c109a0575a4917496ada4fd69dbb309eb5808f103e524a8a270f9d44a.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Primitive Bug Bounty $1m]]></title>
            <link>https://paragraph.com/@primitive/primitive-bug-bounty-1m</link>
            <guid>tnjzcW41tsQe0FZcRv8c</guid>
            <pubDate>Mon, 13 Dec 2021 18:41:56 GMT</pubDate>
            <description><![CDATA[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 incent...]]></description>
            <content:encoded><![CDATA[<p>Today the <strong>$1m bug bounty</strong> 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.</p><p>View the bug bounty details on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://immunefi.com/bounty/primitive/">Immunefi</a>.</p><p>Primitive directly handles a <strong>$250k</strong> portion of this bug bounty, while Sherlock has committed the remaining <strong>$750k</strong>. Being under the umbrella of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://sherlock.xyz/">Sherlock Protocol</a> has improved the protocol security by tenfold through direct smart contract review, coverage, and incentivizing bugs to be reported rather than exploited.</p><p>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.</p><p>The smart contracts are planned to be launched before this audit is finished, therefore caution should be exercised when interacting with the protocol at all times. The protocol should be considered as an alpha version.</p><h2 id="h-testnet" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Testnet</h2><p>The testnet is live and the app is scheduled to be available to users during this week, if not today. There will be a separate blog post to give a brief overview of the testnet and the goals of having it.</p><h2 id="h-discord" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Discord</h2><p>The testnet will first be made available to the users in our discord, you can join here: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/rzRwJ4K">Primitive discord</a>.</p><h2 id="h-published-on-primitive" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Primitive</h2><p>Read this on the Primitive blog: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance/blog">blog</a>.</p><h2 id="h-learn-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Learn More</h2><p>Visit the website: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a>. Visit the docs: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance">primitive documentation</a>. Follow Primitive on twitter: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">primitivefi</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/4c8cbb218a23d2e5352d09abbc12fb9537d76bf0cb351c0ca33f9ddfd5589fb4.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Primitive Exploit Protection]]></title>
            <link>https://paragraph.com/@primitive/primitive-exploit-protection</link>
            <guid>gUH32TvNCgcwrt9C6EH5</guid>
            <pubDate>Thu, 09 Dec 2021 18:36:36 GMT</pubDate>
            <description><![CDATA[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 increase...]]></description>
            <content:encoded><![CDATA[<p>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 <em>zero</em> if a hack or economic exploit takes place.</p><p>Primitive is purchasing <strong>$10m of coverage</strong> for its users through <strong>Sherlock Protocol</strong>. This entitles all users to claim a portion of USDC from the pool in the case of an adverse event.</p><p>This coverage also comes with the benefits of increased security:</p><ul><li><p><strong>$1m bug bounty</strong> incentivizes against black hat attacks</p></li><li><p>A future avenue of <strong>scaling coverage</strong> on Primitive products</p></li><li><p><strong>Continuous audit capacity</strong> on smart contracts</p></li></ul><p>Since this is all handled on behalf of users, if any funds are lost users will simply gain access to a <strong>claim USDC</strong> button.</p><p>The unique model of purchasing coverage through Sherlock has an important feature: coverage pricing that moves with code complexity. As Primitive launches new products that may be more complex, the Sherlock team will be best positioned to make better pricing decisions. This ultimately leads to more coverage for the end user because more can be purchased at a better price.</p><p>Sherlock has already proved themselves to be invaluable through the security expertise of their <em>Watsons</em>, and we couldn&apos;t be more excited to offer <strong>coverage for all of our users</strong>.</p><h2 id="h-visit-sherlock" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Visit Sherlock</h2><p>Learn more on the Sherlock website: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://sherlock.xyz/">sherlock.xyz</a></p><h2 id="h-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Community</h2><p>Go tell your friends about the <strong>oracle-free</strong> derivative protocol launching this month with concentrated and fungible liquidity.</p><p>To meet the rest of us, join the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/rzRwJ4K">Primitive discord</a>.</p><h2 id="h-published-on-primitive" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Primitive</h2><p>Read this on the Primitive blog: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance/blog">blog</a>.</p><h2 id="h-learn-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Learn More</h2><p>Visit the website: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a>. Visit the docs: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance">primitive documentation</a>. Follow Primitive on twitter: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">primitivefi</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/a19a0a16ffd0547fa5211ff4e43633aa32e4371a052234096d57f804ace323cc.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Introducing Dodoc: A zero-config Hardhat plugin to generate documentation]]></title>
            <link>https://paragraph.com/@primitive/introducing-dodoc-a-zero-config-hardhat-plugin-to-generate-documentation</link>
            <guid>8RTcRmyFl8my2Qk9RDrd</guid>
            <pubDate>Wed, 08 Dec 2021 19:01:57 GMT</pubDate>
            <description><![CDATA[dodoc birbGood 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!OverviewA 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. Finding how and where to host the docs was no...]]></description>
            <content:encoded><![CDATA[<figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9ef1985427cec787e2ec5599dbb10c83f99f8d8131673e9e543db7a2126b2c32.jpg" alt="dodoc birb" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">dodoc birb</figcaption></figure><p>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!</p><h2 id="h-overview" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Overview</h2><p>A couple of weeks ago while wrapping up the contracts of our brand new <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/mirror.primitive.eth/l5F1BLMhfmcm_B1R2w-by003_oiAz2-Ir_Jj_rCvGCs">Replicating Market Marker</a>, we decided to have a look at the current solutions to generate and host our contracts documentation.</p><p>Finding how and where to host the docs was not a big deal, and among many different choices, our front-end team decided to go with <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docusaurus.io/">Docusaurus</a> and to use Markdown-based files.</p><p>The last thing to do was to find a way to automatically generate the Markdown documentation, based on the NatSpec of our Solidity contracts, and pass that to Docusaurus.</p><p>But after some research, we started to scratch our heads since we found out that the only available plugin was <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/ItsNickBarry/hardhat-docgen">Hardhat Docgen</a>, which was generating a whole static website. Not exactly what we wanted!</p><p>So we decided to have some fun and write a brand new tool from scratch: Dodoc was born!</p><h2 id="h-features" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Features</h2><h3 id="h-zero-configuration-required" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Zero-configuration required</h3><p>Just <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/primitive-dodoc#-installation">install Dodoc package</a>, import it in your Hardhat config file and you&apos;re good to go! Documentation will be generated on the next compilation in the <code>docs</code> folder of your repository.</p><h3 id="h-compatible-with-latest-solidity-versions" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Compatible with latest Solidity versions</h3><p>Even the latest Solidity versions (0.8.x+) are supported, this means that you can even write documentation for your custom revert errors!</p><h3 id="h-extendibility" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Extendibility</h3><p>Default output is generating Markdown files, although custom templates can be <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/primitive-dodoc#-customize">created using Squirrelly</a>! This means that literally any format can be supported.</p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>While working on Dodoc, our goal was to make a very simple tool that would also be flexible enough to allow anyone to reuse and extend it. So we did it!</p><p>Finally, the last thing to do is to share a live example, so here is the new <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance">Primitive documentation</a>, generated using Dodoc:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/67995548095437097c6121a1cec4c336162e32c0b3db4a7923bd1c69021b8700.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Let&apos;s try out and check out the installation instructions in the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/primitive-dodoc">README on Github</a>. Trust me, it&apos;s super simple!</p><p>Feel free to open any issues on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/primitive-dodoc">Github</a> and join us on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/gYDVGNPVz8">Discord</a> to share your thoughts and give some feedback! Happy hacking! :)</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/primitive-dodoc">Dodoc on GitHub</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance/">Primitive documentation</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/gYDVGNPVz8">Primitive Discord</a></p></li></ul><h2 id="h-published-on-primitive" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Primitive</h2><p>Read this on the Primitive blog: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance/blog">blog</a>.</p><h2 id="h-learn-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Learn More</h2><p>Visit the website: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a>.</p><p>Follow Primitive on twitter: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">primitivefi</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/40026f32671cc0a9d023c4b6a12f642c25f58eca2027fabaa28511202cd28810.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Introducing Primitive]]></title>
            <link>https://paragraph.com/@primitive/introducing-primitive</link>
            <guid>9U7NYDA51psZ6lLO01eG</guid>
            <pubDate>Tue, 07 Dec 2021 18:00:42 GMT</pubDate>
            <description><![CDATA[AcknowledgementsBuilding 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 PrimitiveToday, we are ecstatic to introduce the Replicating Market Maker ("RMM-01"), a spot exchange and derivative protocol. While derivatives in traditional finance are massive, DeFi derivatives have yet to grow to a comparative scale. This is in part because they are bottle-necked by their dependence on ...]]></description>
            <content:encoded><![CDATA[<h2 id="h-acknowledgements" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Acknowledgements</h2><p>Building this protocol was a collaborative effort that could have not been done without the help of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/alexhevans">Alex Evans</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/GuilleAngeris">Guillermo Angeris</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/tarunchitra">Tarun Chitra</a>, and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/trustlessexp">Experience</a>.</p><h1 id="h-introducing-primitive" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Introducing Primitive</h1><p>Today, we are ecstatic to introduce the Replicating Market Maker (&quot;RMM-01&quot;), a <strong>spot exchange</strong> and <strong>derivative</strong> protocol.</p><p>While derivatives in traditional finance are massive, DeFi derivatives have yet to grow to a comparative scale. This is in part because they are bottle-necked by their dependence on <strong>oracle</strong> systems and high collateralization requirements.</p><p>Oracles are one of the largest sources of smart contract vulnerabilities and perhaps the largest centralization vector, so we sought out an architecture that excluded them.</p><p>Primitive is an <strong>oracle-free</strong> solution to scalable and efficient on-chain derivatives, reflecting our belief that the future of decentralized finance should not depend on expensive (and often brittle) oracles.</p><p>The protocol is slated to launch <strong>December 2021</strong> on Ethereum L1 mainnet, Arbitrum L2, and Optimism L2.</p><p>The features on launch include:</p><ul><li><p>Concentrated fungible liquidity</p></li><li><p>Liquidity pool tokens that replicate covered call options</p></li></ul><p>The protocol can be used for:</p><ul><li><p>Earning swap fees as a liquidity provider</p></li><li><p>Swapping between tokens of underlying pools</p></li><li><p>Building structured products using the composable liquidity pool tokens</p></li><li><p>Creating liquidity pools for any token pair</p></li></ul><p>Out of the box, Primitive is the base infrastructure for an oracle-free DeFi and the future of on-chain derivatives.</p><p>Read on to learn about &quot;derivative tokens&quot; and how the pools concentrate liquidity as an AMM.</p><h2 id="h-derivative-tokens" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Derivative Tokens</h2><p>Every liquidity provider to the popular automated market makers (&quot;AMMs&quot;) has, implicitly or explicitly, held an underlying derivative: the <strong>liquidity pool token</strong> (&quot;LPT&quot;).</p><p>Primitive is not an AMM that trades derivatives, <strong>the LPT is the derivative</strong>. This specific niche of derivative market has seen some early growth, but has yet to reach the spotlight. For example, there are a few protocols that leverage the LPT as a derivative: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://blog.makerdao.com/executive-vote-february-5-2021/">Onboarding Uniswap V2 LPTs</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/aave/aave-amm-market-released-73ae76a7cbc0">Aave AMM Markets Released</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/balancer-protocol/balancer-v2-generalizing-amms-16343c4563ff">Balancer as a portfolio manager</a>, and the idea of &quot;Pool 2&quot;, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.nansen.ai/research/a-farmers-guide-to-yield">Yield Farmer&apos;s Guide</a>.</p><p>Primitive leans into this market as an AMM whose primary use-case is having financially useful LPTs. This makes the protocol different when compared to other AMMs, which have arbitrary LPTs that are not the most straightforward to value.</p><p>Using RMM liquidity pool tokens, virtually <strong>any</strong> derivative payoff can be offered or created. For example, in a decentralized lending market like <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/rari-capital/fuse-explained-3ef2e0747953">Fuse</a>, these LPTs can be <em>shorted</em>, expanding the possible derivative payoff range to call and put options, and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://pricing.online.fr/docs/TradingVolatilityStrat.pdf">therefore nearly any derivative payoff one could imagine</a>. Structured product and liquidity strategy protocols, like <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.ribbon.finance/">Ribbon</a> and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://charm.fi/">Charm</a>, can use a basket of LPTs to make novel products for <strong>any</strong> token on <strong>any</strong> EVM chain. <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://en.wikipedia.org/wiki/Binary_option">Binary options</a> can be created by selling the rights to one side of the LPT, as researched in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/2111.13740">Replicating Monotonic Payoffs</a>. A basket of these binary options can be used to replicate an unlimited number of instruments!</p><h2 id="h-spot-exchange" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Spot Exchange</h2><p>All of the liquidity which backs these LPT derivatives <strong>is productively used as a spot exchange</strong> for tokens, just like any other AMM. Better yet, <strong>concentrated liquidity curves</strong> make these swap rates competitive within the DEX ecosystem, which captures more trading flow and generates fees for liquidity providers.</p><p>Liquidity providers are exposed to the price risk of the underlying assets and are <em>not neutral</em>. While the swap fees compensate for the risk, being an LP on Primitive is almost the same as market making covered call options. With this complexity, positions will be optimally managed in a more active way and ideally delegated from most users to vault products like <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://yearn.finance/">Yearn</a> and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://charm.fi/">Charm</a>.</p><h2 id="h-tokenization" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Tokenization</h2><p>Liquidity within the RMM is not tokenized itself, enabling higher level smart contracts to make the decision on their own. This allows any token standard to be used: ERC-20, ERC-721, ERC-1155, etc.</p><p>Primitive&apos;s Manager contract uses the ERC-1155 standard to tokenize liquidity. This comes with several important features:</p><ul><li><p>All metadata of the liquidity pool token is aggregated into a single location, the token URI</p></li><li><p>Each token id matches the pool id</p></li><li><p>Multiple LPTs can be batch transferred, enabling more efficient structured products</p></li><li><p>Reduces on-chain state bloat by using one smart contract for all pool tokens, rather than one per pool</p></li><li><p>On-chain image constructed from the metadata, for easy viewing in any wallet!</p></li></ul><h2 id="h-cheap-liquidity-management" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Cheap Liquidity Management</h2><p>The core smart contracts can hold internal balances, allowing liquidity to be moved in and out of pools <strong>without paying the gas cost of transferring tokens</strong>. These token transfer costs are usually 1/3 of the total gas cost for providing liquidity to AMMs. Now liquidity can be moved in and out of pools (for the same pair) with much lower friction.</p><h2 id="h-twap-oracles-spot-and-implied-volatility" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">TWAP Oracles - Spot and Implied Volatility</h2><p>The state of reserves for these pools are valuable on-chain resources which can be weaponized into TWAP oracles. This is done by utilizing the <em>cumulative reserves</em> of a pool and viewing it over a select time range.</p><p>While this oracle would be for spot prices, a TWAP oracle for volatility can also be created using the <em>cumulative liquidity</em> of a pool. Mapping the most liquid pools to their respective volatility curves gives incredible insight into the implied volatility of the token pair.</p><p>Although ideally, oracles wouldn&apos;t be needed in an RMM world.</p><h2 id="h-audits-and-bug-bounty" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Audits and Bug Bounty</h2><p>Several professional smart contract security firms were engaged to review the core and peripheral contracts of the Protocol:</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/chain_security">ChainSecurity</a> audit over 8 audit weeks</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/Khovr">ABDK</a> audit over 4 audit weeks</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/dedaub">Dedaub</a> audit over 4 audit weeks</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/sherlockdefi">Sherlock</a> continuous review since August</p></li></ul><p>While we believe such a range of serious audits is the absolute minimum safety measure in the DeFi, the complexity of the protocol and the ecosystem means that a completely bug free codebase can&apos;t ever be guaranteed.</p><p>As such, an open bug bounty of $250,000 is offered through <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://immunefi.com/bounty/primitive/">Immunefi</a> to anyone who finds a critical bug within the smart contracts.</p><h2 id="h-launch-details" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Launch Details</h2><p>The Primitive Protocol will be deployed to testnet during the week of <strong>December 7, 2021</strong>, allowing anyone to use the protocol in advance of the launch.</p><ul><li><p>View the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-core">Primitive RMM Core</a> repository for the source code of the AMM.</p></li><li><p>The <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-manager">Primitive Manager</a> repository has the smart contracts which users will be interacting with.</p></li><li><p>Visit the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmm-examples">Primitive Examples</a> repository to check out some of the early ideas for products on top of the protocol.</p></li><li><p>Use the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/primitivefinance/rmms-py">RMM Simulator</a> developed by Experience to model LPT payoffs.</p></li></ul><p>For launch to go smoothly, we will focus during the remainder of December on these priorities:</p><ul><li><p>Testing and review of the protocol&apos;s smart contracts</p></li><li><p>Supporting integrations with other products and protocols</p></li><li><p>Interface design and functionality finalized</p></li><li><p>An analytics site to explore the Primitive pool ecosystem</p></li><li><p>Further documentation, tools, and examples to support the ecosystems growth</p></li></ul><h2 id="h-community" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Community</h2><p>Go tell your friends about the <strong>oracle-free</strong> derivative protocol launching this month with concentrated and fungible liquidity.</p><p>To meet the rest of us, join the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/rzRwJ4K">Primitive discord</a>.</p><h2 id="h-published-on-mirror" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Mirror</h2><p>Read this post on mirror: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/mirror.primitive.eth">mirror.primitive.eth</a>.</p><h2 id="h-published-on-primitive" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Published on Primitive</h2><p>Read this on the Primitive blog: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance/blog">blog</a>.</p><h2 id="h-learn-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Learn More</h2><p>Visit the website: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://primitive.finance">primitive.finance</a>. Visit the docs: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.primitive.finance">primitive documentation</a>. Follow Primitive on twitter: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/primitivefi">primitivefi</a>.</p>]]></content:encoded>
            <author>primitive@newsletter.paragraph.com (Primitive)</author>
        </item>
    </channel>
</rss>