Endpoint. An endpoint is the actual dAPI endpoint that might represent an individual feature the dAPI provider offers (e.
21 May 2021, 19:35
Endpoint
An endpoint is the actual dAPI endpoint that might represent an individual feature the dAPI provider offers (e.g., GetWeather, GetAccountBalance). A Consumer will always call an Endpoint published by the Provider.
Design
The core idea is to run a more efficient decentralized system (with its own nodes) that can relay data to and from main chains (Ethereum, Binance Smart Chain, Cosmos, Polkadot, etc.). Sether 2.0 is a new trustless, permissionless, open blockchain that eliminates the security risks and usability hassles of working with off-chain data.
In Sether 2.0, dAPI call hashes are stored on-chain, along with transaction calls and arguments. The actual execution of the dAPI call happens off-chain because it can involve complex things like routing, load-balancing, rate-limiting, complex authentication schemes, and more. Performance is gained by grouping many off-chain dAPI responses into a single on-chain state transition. Security is guaranteed by the chain contract's ability to verify the correctness of state transitions.
Nodes submit rollup blocks that summarize off-chain transactions along with a Merkle proof of the result of the dAPI call, together with other related information like the provider's public key, API call parameters, and time of execution. This provides higher throughput, lower costs, and improved security.
SethChain nodes reach consensus through Byzantine-Fault Tolerant state machine replication on many machines. It is based on DPoA (Delegated Proof of Stake), with consensus based on proportions of the voting power of the nodes. Our functional pilot is built now with the Cosmos SDK and utilizes Tendermint's BFT consensus algorithm to reach immediate finality. This finality is reached upon getting enough confirmations from enough block producers.
SethChain nodes are responsible for producing new blocks. They participate in the network consensus protocol by broadcasting votes which contain cryptographic signatures signed by each node's private key. It is like other Cosmos-based delegated proof-of-stake chains.
A node will always belong to an API provider. The provider is free to choose the dAPIs it provides, their configuration, high-availability, security, and rate-limiting parameters, along with a trust pool (described later).
A request-response protocol will be available in the first version of Sether 2.0. Later versions will also implement a publish-subscribe mechanism. Configuring a dAPI is not a complex task. The provider needs to set dAPI Endpoints and how Endpoints map to external APIs by setting a Base URL, paths and authentication schemes. Various rules can be set to handle external service malfunction like load-balancing and failover, circuit-breaker mechanisms, rate limits, and more.
The Sether 2.0 protocol is built for easy adoption, especially from the API provider side. Current oracle solutions constrain providers to accept payment for their services in the native oracle cryptocurrency (e.g., LINK, BAND, etc.). However, due to compliance, accounting, and legal reasons, accepting cryptocurrency as payment is not an option for most API providers.
Sether 2.0 allows providers to keep accepting payments as they are today. The SETH2 token is not involved in dAPI service subscriptions. Providers are free to use any currency they want, and the subscription agreement between the provider and the consumer is made off-chain. The SETH2 token will be used for voting power and staking in trust pools.
Features
Sether 2.0 brings a lot of new features targeted at dAPI providers. It is more than a typical proxy that forwards API calls to backend services. It's a full-fledged API Gateway that interacts with different microservices to provide consumers a single interface that improves response times, saves bandwidth, and delivers a better user experience.