Public oracle network where anyone can be a data provider





Coset is a public oracle service designed to make off-chain data open, permissionless, and easy to monetize. Instead of relying on a small number of trusted providers, Coset allows anyone to create an oracle and provide data to applications.
In Coset, data providers use their private endpoints to communicate with Coset relayer node and provide data. Users can read data from the oracle contract, or use the Coset SDK. When a data update is required, the request responds with HTTP 402 (Payment Required). The requester completes the payment, and data is delivered.
Payments are made using USDC or the CST token. Data providers get paid instantly when a fresh data is requested.
Coset treats data as a public resource with an open market. Developers get reliable data when they need it, and providers are rewarded instantly for keeping their data up to date.
There are 2 perspectives to consider when understanding how Coset works:
Data provider
Data requester
If you are a data provider, your sole purpose is to serve data and secure your endpoint using Coset access tokens. Everything else is handled by the Coset relayer node.
Data providers earn money based on requests. For every update call, they earn USDC or CST tokens, based on their choice. Each provider has its own oracle contract, which is deployed by an oracle factory contract. Providers can easily create their oracles using the Coset web app and skip the complex deployment process.

Data providers are responsible to keep their private API endpoints using Coset's access tokens. Coset relayer node sends a request to private API endpoints every time an update is requested. During this server-to-server HTTP request, Coset node sends an authorization header so that private endpoint can check if the request is valid. You can create your access tokens on the platform.
As a data requester, you can access oracle data without fees. You can read every data freely. But here's a catch: You are likely to update oracle data periodically.
Imagine a price feed oracle. You can read the latest CST token price without fees. However, CST price changes over time and if no one calls an update, the oracle will be useless. That's why one of the requesters needs to call an update to have fresh data.
The update cycle looks like this:

Briefly, when a data requester calls an update function, the SDK sends a request to the relayer node. Relayer node demands a payment to cover gas fees, provider earnings, and platform fees. After requester settles the payment using brand new x402 technology, data is written on the blockchain and every oracle listener receives the new data as well as the requester itself.
Coset has tools for data providers and developers.
Providers can easily create and manage their oracles using Coset web app.
Developers can read and update data using the Coset SDK to seamlessly interact with Oracle contracts.
Coset SDK is a Typescript library for data requesters to interact with Coset oracles programmatically. It simplifies the process of requesting data from oracles, handling payments, and receiving data updates.

Coset SDK has some great features:
Easy data read
Easy data update
Automated payment handling
Support for USDC and CST token payments
Spending limits for data updates
To install Coset SDK, you can run;
npm install @coset-dev/sdkor
pnpm add @coset-dev/sdkAfter we installed the dependencies, we can start using Coset SDK.
Start by importing the SDK in your project:
import { Coset, Networks, PaymentToken } from "@coset-dev/sdk";Coset is the main class that we will use to interact with the Coset protocol.
Networks and PaymentToken are enums that help us specify the network and payment token we want to use.
In Coset SDK, every instance is tied to a specific oracle. So, we need to provide the oracle address when creating a Coset instance.
For this example, we will use a CST-USDT price feed oracle deployed on Mantle Sepolia Testnet. You can use whatever oracle address you want. You can search for oracles at Coset App.
Now we can create a Coset instance:
const coset = new Coset(
Networks.MANTLE_TESTNET,
PaymentToken.USDC,
"0xabc...", // Oracle Address
process.env.PRIVATE_KEY as `0x${string}` // Wallet Private Key
);Here, we created a new Coset instance for an oracle on Mantle Sepolia Testnet, using USDC as the payment token. We also provided a private key for signing transactions.
The wallet private key is required for data updates. Be sure you have enough USDC or CST tokens on the chosen network.
And now we can start reading data from our oracles and call data updates.
To learn more about the Coset SDK, refer to the developer documentation. Also, you can find the full API reference of the library there.
Coset Web App is the gateway for users who want to find useful oracle services, and for providers who want to monetize their data.
You can start by connecting your wallet using Privy.

And now you can create your own oracle on the platform.
To create an oracle, you need a name, description, update price (this will affect the money you earn from your service), private API endpoint, and an optional recommended update duration.
If a recommended update duration is provided, this will help data readers to decide whether they should update the oracle or not.

To deploy the oracle, you have to give authorization to transfer tokens for oracle deployment.

After paying the one-time deployment fee, you have your own oracle! You can manage your oracles at one place.

Coset is currently deployed on Mantle Sepolia Testnet. Web app supports mainnet Mantle as well, but it is not possible to deploy contracts since oracle factory is not deployed on mainnet yet.
Each oracle is a sub-contract, deployed by an Oracle Factory. And the CST token is an ERC20 contract with EIP-3009 support, to work fine with x402.
Oracle Factory | |
|---|---|
CST Token |
Coset's financial model is to collect initial payment from oracle creators, and collect fees from update calls.
In the smart contract, it is defined as:
struct FactoryConfig {
uint128 oracleDeployPrice; // in wei
uint8 oracleFactoryShare; // percentage
...
}Currently, platform fees are defined as 20%, and the oracle deploy price is 5 USDC or an equivalent amount of CST. Worth noting that CST on Mantle Sepolia Testnet has no real value, and the price is defined as a fixed rate of USDC.
Coset is an MVP, but it is not flawless yet. Our first goal is to make it perfect.
The next step is mainnet launch on Mantle and possibly on other EVM networks with the multichain native token CST. At the moment, the whole project will be deployed on Mantle as default.
Currently, we have one type of oracle contract template. This template only works for a single data type. We want to create more templates to support other data types as well. This little optimization trick will improve the scalability.
To accept payments in native currencies (E.g. MNT payments on Mantle network), we will improve the current x402 library and our own facilitator. Therefore, we will be able to accept payments with native currencies as well.
Ozan Andaç - Web3 developer - contact@oynozan.com
Halil Beycan - Smart contract developer - halilbeycan0@gmail.com
MVP version is live on testnet