April 6, 2023

Built on SxT: Primex

Primex announces a partnership with Space and Time.

Built on SxT is a customer-authored blog series that showcases the many use cases across Web3 that are being built on top of Space and Time. This blog post was authored by the team at Primex to highlight how Space and Time is a critical part of their stack.

Recently, we have forged a partnership with Space and Time, a decentralized Web3 data warehouse backed by prominent firms like Samsung, M12 (Microsoft’s Venture Fund), and Digital Currency Group.

This collaboration means great news for all our users. As part of the partnership, our team will leverage Space and Time's Web3-native SQL and blockchain indexing service to improve the Primex ecosystem, making some of the protocol's critical mechanisms (e.g., Trader Scoring) more decentralized, trustless, and efficient.

Today, we will introduce Space and Time and how its solution could benefit Primex users in the long run through our recent partnership.

Let's get started!

What is Space and Time?

Space and Time (SxT) is a decentralized data warehouse that provides industry projects Web3-native SQL for smart contracts. To understand what this means, it is essential to look into the market challenges SxT aims to solve.

As you may already know, dApps and decentralized protocols like Primex leverage smart contracts to operate. To work efficiently, many contracts rely on data outside the blockchain networks they are executed in.

But due to their nature, blockchains can only connect to data in their networks on their own. This means they can't access information via off-chain sources and records on other chains without the help of a third-party solution.

In the crypto space, the above challenge is tackled by oracles that connect blockchains to external chains or off-chain sources to provide valuable data for smart contracts. Of course, projects like Chainlink have already built decentralized oracle networks that are up and running. However, the current Web3 infrastructure still struggles with high latency data access on blockchains, a lack of permanence of off-chain data, and records fragmented across multiple chains.

In contrast, corporations have been keeping massive amounts of data in traditional databases with fast access, no storage limits, and the ability to analyze the records at any time to gather important insights for their businesses.

As a result, organizations can use Structured Query Language (SQL) queries to store, manipulate, and retrieve information in these relational databases. However, while they operate efficiently, these solutions are centralized and suffer from issues like data tampering and single points of failure.

And this is where Space and Time comes into the picture.

SxT operates a decentralized data warehouse where it indexes data from multiple blockchains (currently Ethereum, Polygon, Avalanche, BNB Chain, etc). The project's solution supports Web3-native SQL execution, enabling developers (and their smart contracts and dApps) to run any query workload on datasets via a single platform. Furthermore, Web3 projects can load their off-chain data from external sources and join it with indexed on-chain records from major blockchains.

At the same time, the high-performance design of Space and Time's data warehouse enables developers to execute fast queries with low latency at an enterprise scale (even for huge datasets). And most importantly, the project's Proof of SQL cryptography guarantees that both query results and the underlying data are verifiably tamperproof.

Like popular blockchains like Bitcoin or Ethereum, Space and Time operates without intermediaries. Instead, validators use a Byzantine Fault-Tolerant (BFT) consensus mechanism to validate records in the network in a peer-to-peer (P2P) way.

How can Primex users benefit from our partnership with Space and Time?

Now that we have introduced Space and Time, it's time to see how Primex users can benefit from our new partnership with the decentralized data warehouse project.

In a nutshell, the main advantage of Space and Time is that it allows Web3 developers to perform low-latency SQL queries in real-time on indexed on-chain data and off-chain records with verifiably tamperproof results while remaining fully decentralized.

Regarding that, Primex has several important components that need large amounts of data to operate.

Launching as a future feature, AI-based Trader scoring is among them, as the protocol aims to classify Traders based on their experience and profitability. Consequently, the mechanism empowers the best Traders with the ability to access riskier assets, higher leverage, and under-deposited positions. Notaries will assign this score to each Trader based on their previous trading activity on Primex, DEXs, and other protocols.

To achieve the above, the scoring system will utilize machine learning (ML) techniques that require significant historical data volume. With Space and Time, we now have seamless access to the data we need without the necessity to reindex the long on-chain history of Traders' activity.

At the same time, leveraging our new partner's data warehouse, it will be possible to host ML models in a decentralized way. Consequently, we can now finally create a fully transparent and trustless Trader scoring system.

Besides ML process and Trader scoring, another area where we really need historical data is the calculation of protocol risk parameters, such as the maximum leverage for a trading pair or the liquidation condition.

Space and Time's solution significantly speeds up the data collection process. As a result, instead of trying to figure out how to access it, we can now focus on using this information to benefit Primex and its users.

Primex becomes more decentralized and efficient

At Primex, we are building a non-custodial prime brokerage protocol that connects Lenders, Traders, Liquidity Providers, and Market Makers to enable spot margin trading on DEXs with decentralized trade execution backed directly by lender liquidity.

But to make this possible, Primex has to rely on large volumes of historical data necessary for the seamless operation of the Trader scoring mechanism and protocol risk parameter calculations. That's why we have decided to partner with Space and Time, so we can leverage the project's decentralized data warehouse to access tamperproof on-chain and off-chain records with low-latency queries and in a trustless manner.

Consequently, we can make our processes more efficient while saving valuable resources and time to focus on building and improving Primex.