Research

Understanding Primex Finance: A Comprehensive Overview

Mar 25, 2024 ⋅  11 min read

Introduction to Primex V1

Primex V1 enables spot margin trading on decentralized exchanges (DEXs) without the need for over-collateralization. It is a permissionless, smart-contract-operated prime brokerage available on Ethereum, Polygon, and Arbitrum. Primex V1 addresses the challenge of enabling users to trade undercollateralized leveraged spot assets onchain. As the team adds new primitives and assets, Primex could offer portfolio margining on various DeFi positions such as spot, LP, and lending.


Primex was first announced in June of 2021 by Primex Labs out of Estonia. The team raised $5.7 million for a seed round in February 2022, led by CoinFund and Stratos Technologies, with participation from Wintermute, GSR, GoldenTree Asset Management, and others. Primex Labs is led by co-founders Vlad Kostanda and Dmitry Tolok, as well as CTO Alex Marukhnenko and CMO Anton Demenko. In May 2022, the team launched the alpha testnet, with the beta launch on Polygon in October 2023. In Q4’23, Primex expanded to Arbitrum and Ethereum.


The Protocol

Primex is building a marketplace where lenders and borrowers can interact. Primex liquidity pools (called credit buckets) offer different parameters and associated risks and rewards for lenders than traditional DEXs or lending protocols. There are different pools for different assets, so lenders can choose to allocate to pools that meet their risk tolerance. Traders are the typical borrowers, and they can access that liquidity by choosing an asset to borrow and a credit bucket that matches their needs.

There are four key players in the Primex ecosystem:

  1. Lenders provide liquidity to the credit buckets. This liquidity is then accessed by traders for leveraged trading. Lenders earn interest from the borrowing fees paid by traders, offering a mechanism for passive income generation.
  2. Traders seek to leverage their positions to gain exposure to a wide range of assets listed on DEXs. Rather than receiving borrowed funds directly in their wallets, traders perform their trades through credit bucket contracts. Doing so enables more capital efficiency and ensures that positions can be liquidated efficiently.
  3. Keepers are bots that monitor positions and orders to perform various actions such as executing limit orders, closing positions under certain conditions, and liquidating risky positions. Keepers play a crucial role in maintaining the stability and security of the Primex ecosystem.
  4. Notaries (in future versions) will be trusted participants responsible for making decisions about parameter updates within the Primex protocol. These parameters can be global, affecting the entire ecosystem, or specific to credit buckets (such as supported pairs, leverages, and interest rates). Notaries will be nominated by the community through a staking process, and both the notaries and their nominators would be rewarded for their successful contributions. The core team will be responsible for these parameter changes at genesis. As the protocol matures and gets battle-tested, this role will decentralize to notaries.

The smart contract architecture of Primex V1 is designed to facilitate the four key players’ interactions seamlessly. Credit buckets are fundamental smart contracts that include a set of parameters defining pool usage rules, such as supported pairs, leverage options, liquidation rules, interest rates for lenders, and fees for traders. These buckets act as an intermediary between lenders, traders, and other DeFi protocols like DEXs, enabling a decentralized and efficient trading environment.


Source: Primex Whitepaper


Credit buckets enable a mechanism of leveraging liquidity for trading while maintaining a controlled environment for risk management. The product is key to Primex V1 facilitating leveraged spot trading in a decentralized manner.

Primex differentiates itself from perp DEXs by giving exposure to spot instead of synthetic assets. With this mechanism, collateral only needs to be sufficient to cover losses, not capital at risk. As with perp DEXs, Primex users post collateral on the DEX and can have leveraged exposure. If the losses become greater than the collateral, then their positions would get liquidated and they would lose their collateral. Users can tap into their margin to access DEX liquidity instead of relying on market makers or LP collateral.

For instance, imagine a user had 1 ETH worth $3,000 and wanted to buy UNI. Using Primex, she could combine her assets with liquidity deposited by lenders to get an undercollateralized loan. If she borrowed $6,000 in ETH she could buy $9,000 worth of UNI on Uniswap (using her $3,000 and the $6,000 loan from Primex). She would owe interest on the amount borrowed, and she could only use it to buy UNI (assuming those are the rules of the bucket, for this example). If UNI were to fall by 33%, or whatever the liquidation rules of the credit bucket are, she would be liquidated, lose her ETH, and repay the loan. However, if UNI were to rise by 33%, she could sell the UNI for $12,000 in USDC, pay back her $6,000 loan, and take home $3,000 in profit (a 100% return).

However, Primex V1 has certain dependencies and limitations. For instance, the protocol's efficiency and flexibility in cross-chain operations are contingent upon the capabilities of decentralized bridges. Additionally, the protocol must rely on keepers for the execution of critical protocol functions. This introduces a layer of complexity, as Primex requires a robust network of bots to ensure the accurate execution of trades and liquidations. Lastly, Primex needs oracles to validate the actions of keepers and protect users from price manipulation. To enforce this, the protocol incorporates the concept of Oracle Tolerance (OT). OT accounts for the maximum price deviation from the oracle price when executing significant asset swaps on DEXs. This parameter is crucial for defining liquidation conditions as well as conditional orders like limits and stops. Primex also recently updated their docs and added the ability to be oracle-agnostic, adding flexibility and enabling new assets. The first oracles added are Chainlink, Pyth, and TWAP oracles from Uniswap v3 pools.

Vision for Primex V2

Primex V2 represents an evolution from its predecessor, Primex V1, marking a transition towards a more comprehensive and versatile platform within the decentralized finance (DeFi) ecosystem. The vision for Primex V2 is to transform the protocol from a spot margin trading platform into a DeFi-native prime brokerage.


Prime brokerage solves the problem of liquidity and capital efficiency for users by offering access to borrowing and trading against a portfolio of assets, rather than just one-to-one. This consolidation allows clients to optimize their investment strategies, leveraging the brokerage's resources to enhance their market position and performance.


One of the core innovations of Primex V2 is the introduction of the portfolio concept, which replaces individual positions as the central element of the protocol. A portfolio in Primex V2 can consist of various types of cryptoassets, DeFi positions, or debt, represented through both fungible assets (like cryptocurrencies and lending LP tokens) and non-fungible assets (such as Uniswap V3 LP position NFTs). This allows for a more flexible and dynamic approach to managing leveraged operations. To protect lenders and manage risks, the portfolio's value and liquidation value are recalculated in real time with price changes of the underlying assets.

Furthermore, Primex V2 aims to democratize access to leveraged trading by removing constraints that previously limited borrowers to interacting only with pre-integrated protocols. By enabling users to specify contracts and engage with any protocol of their choice, Primex V2 facilitates a more open and versatile trading environment. This approach is somewhat analogous to flash loans, focusing on the repayment of the debt plus fees rather than the specifics of how the liquidity is utilized.

An interesting feature of Primex V2 is the ability to create hedged strategies by combining leveraged LP positions with spot margin positions. This allows traders to manage risk more effectively within a single protocol, without the need to rebalance positions across multiple platforms. Moreover, the introduction of flash loan functionality to credit buckets in Primex V2 enables borrowers to take out loans without collateral, provided the funds are repaid within the same transaction. This feature is designed for experienced users who can leverage these loans for arbitrage or other quick trading opportunities.


In summary, Primex V2's vision is to establish a more inclusive, flexible, and secure platform for leveraged trading and financial operations within the DeFi space. By expanding the range of supported assets, introducing innovative features like portfolios to credit buckets, and facilitating universal leveraged interaction with any protocol, Primex V2 might be able to deliver a smart contract-based prime brokerage service.


PMX Token

The PMX token serves both as a governance and utility token within the Primex ecosystem. The token has not launched yet, and the protocol currently uses ePMX with restricted transferability. ePMX holders will be able to convert to PMX after the token launch. PMX will primarily be used for keeper incentivization and protocol fee payments. This limited functionality is designed to ensure stability and security as the protocol transitions from its initial launch phase to more stable operations.

In the long term, the utility of PMX will expand significantly. It will enable holders to vote on critical protocol decisions, thereby participating in the community governance process. Additionally, PMX will be used to incentivize various participants in the ecosystem, including traders, lenders, and keepers, playing a vital role in the consensus mechanisms for keepers and notaries. This broad range of utilities aims to ensure the active and engaged participation of all stakeholders in the protocol's governance and operations, fostering a decentralized and efficient trading environment.

The initial distribution of 1 billion PMX tokens is categorized into community, treasury, team and advisors, strategic investors, and inflation. Specifically, the distribution percentages are as follows:

  • 35% to the community.
    • 30% of which goes to the early users and lenders.
    • 18% of which goes to the public sale pool.
    • 9% of which goes to Grants.
    • 3% of which goes to audits and bug bounties.
    • 20% of which goes to market making.
    • 20% to early bucket notaries (18-month lock-up).
  • 11% to the treasury.
  • 21% to the foundation and advisors (48-month vesting period).
  • 23% to strategic investors (18-month vesting period).
  • 10% dedicated to inflation.


In the Primex protocol, fees are paid by traders depending on how they use the protocol. The exact amount of each fee might be dynamic, as details have not been released yet.

  • Traders encounter fees in the following areas:
    • Interest Rate: This is charged for using lenders' liquidity and is paid in the borrowed asset. It's a direct cost associated with the leverage provided to the Trader for their trading activities.
      • Reserve Fee: A portion of the Borrowing Fee, which goes to the Reserve in the form of pTokens (the interest-bearing version of the token). This fee contributes to the protocol's risk management and liquidity provision mechanisms.
    • Protocol Fee: Pays for protocol usage and keepers’ job, which can be settled in either the chain's native token (such as ETH) or in PMX, and is collected and stored in the Treasury. This fee is assessed once when a position is opened and depends on the total asset amount (the borrowed asset plus the deposit) without relying on the time during which this asset is being utilized. The total protocol fee will not exceed 0.3%, with a target value of 0.15% with protocol volume growth. The team has announced the update of the fee model splitting this fee in the following way:
      • Protocol Usage Fee: Paid for protocol usage, can be settled in either the position asset or in PMX. This fee is assessed when a position is closed as a percentage of the total position size. This enables traders to generate higher returns from small positions as the value of their positions is not reduced by the size of the fees from the outset, offering greater potential for growth.
      • Condition Action Fee: If traders use a condition order like limit buys or stop-loss selling, they must pay a fee to keepers for their services. This makes fees more fair as traders only pay for services they use.
  • Lenders are subject to:
    • Withdrawal Fee: Charged when they withdraw liquidity from buckets, calculated as a percentage of the funds they withdraw. This fee is part of the protocol's mechanism to manage liquidity efficiently and ensure stability within the credit buckets.

These fees are collected and stored in the Treasury. The Reserve and Treasury periodically exchange accumulated fees to PMX or other necessary tokens, which are then distributed to keepers as needed. This mechanism ensures that the PMX token plays a central role in the protocol's economic activities, incentivizing participation and contributing to the protocol's sustainability.


Conclusion

Primex V1 and V2 present a robust platform for spot margin trading on DEXs without the need for overcollateralization. Through the introduction of credit buckets, keepers, and notaries, Primex creates a decentralized ecosystem that allows for efficient liquidity management, risk assessment, and governance, ensuring a secure and flexible trading environment. The PMX token plays a central role in this ecosystem. It serves as both a governance and utility token, incentivizes participation, and facilitates various protocol operations, including keeper rewards and protocol fee payments. V2 brings an even bigger vision for Primex, introducing decentralized portfolio margining to crypto.

Despite its innovative approach, Primex's design has dependencies and limitations. For example, it must rely on decentralized bridges for cross-chain operations and needs oracle prices to inform keepers. Primex will be adding more collateral capabilities and trading venues to the current protocol in 2024. Its roadmap promises more complex DeFi actions and margin to be made available to onchain traders.

Let us know what you loved about the report, what may be missing, or share any other feedback by filling out this short form. All responses are subject to our Privacy Policy and Terms of Service.

This report was commissioned by Primex Labs. All content was produced independently by the author(s) and does not necessarily reflect the opinions of Messari, Inc. or the organization that requested the report. The commissioning organization does not influence editorial decision or content. Author(s) may hold cryptocurrencies named in this report. This report is meant for informational purposes only. It is not meant to serve as investment advice. You should conduct your own research, and consult an independent financial, tax, or legal advisor before making any investment decisions. Past performance of any asset is not indicative of future results. Please see our Terms of Service for more information.

No part of this report may be (a) copied, photocopied, duplicated in any form by any means or (b) redistributed without the prior written consent of Messari®.

Upgrade to Messari Pro

Gain an edge over the market with professional grade tools, data and research.

Already a member? Sign in

Upgrade to Messari Pro

Gain an edge over the market with professional grade tools, data and research.

Already a member? Sign in

Before joining Messari as a Senior Research Analyst, John worked in Equity Derivatives on the buy-side and sell-side for over five years. He studied macroeconomics and markets for almost a decade. Now, John spends time thinking about token design, DeFi protocols, and governance.

Mentioned in this report

Read more

Research Reports

Read more

Based on your watchlists

Create a new watchlist
Read more

Research Reports

Read more

Based on your watchlists

Create a new watchlist

About the author

Before joining Messari as a Senior Research Analyst, John worked in Equity Derivatives on the buy-side and sell-side for over five years. He studied macroeconomics and markets for almost a decade. Now, John spends time thinking about token design, DeFi protocols, and governance.

Mentioned in this report