Skip to content

Commit

Permalink
feat: add external project integration section (#228)
Browse files Browse the repository at this point in the history
* feat: try adding external project

* feat: try adding barebone

* feat: add Integration External Project readme

* feat: aDd external projects

* feat: chagne to external projects
  • Loading branch information
mattverse authored Nov 14, 2023
1 parent 1b37bb9 commit bfe9615
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/overview/endpoints/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This section serves the purpose of different endpoints for different projects on
## Table of Contents
[Endpoints](#endpoints)
- [Mainnet Chain Endpoints](#mainnet-chain-endpoints)
- [Historical Data](#historical-data)
- [Historical Data / Indexed Data](#historical-data--indexed-data)
- [Testnet Networks](#testnet-networks)
- [Frontend](#frontend)
- [Chain Registry](#chain-registry)
Expand All @@ -36,7 +36,7 @@ Please visit [API Playground](/api) for more docs and to try interacting with th

For more information how to integrate with each endpoints, please refer to the [integrate section](/overview/integrate)

## Historical Data
## Historical Data / Indexed Data

Osmosis keeps indexed chain data in a separate endpoint:
- [api.osmosis.zone](api.osmosis.zone)
Expand Down
10 changes: 10 additions & 0 deletions docs/overview/integrate/external_projects/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# External Projects

Osmosis supports integration with a diverse range of external projects.

For detailed guidance on integration processes, please consult the links below:

- Pyth: [How to Integrate with Pyth](./pyth.md)
- SubQuery: [How to Integrate with SubQuery](./subquery.md)

If you represent a project interested in being listed, we welcome your contribution. Kindly submit a Pull Request at [github.com/osmosis-labs/docs](https://github.com/osmosis-labs/docs).
35 changes: 35 additions & 0 deletions docs/overview/integrate/external_projects/pyth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Pyth

## Introduction

Pyth Network is an oracle that publishes financial market data to multiple blockchains. Our market data is contributed by over 90 first-party publishers(opens in a new tab), including some of the biggest exchanges and market making firms in the world. We offer price feeds for a number of different asset classes, including US equities, commodities, and cryptocurrencies(opens in a new tab). Each price feed publishes a robust aggregate of publisher prices that updates multiple times per second.

## Pyth on Cosmwasm
Cosmwasm contracts can update and fetch the Pyth prices using the Pyth Cosmwasm Contract, deployed on their network. The documented source code can be found [here](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/cosmwasm/contracts/pyth). The Cosmwasm API reference lets you interactively explore the complete API of the Pyth contract.


## Update Price Feeds

The mechanism by which price feeds are updated on Cosmwasm is explained in the [Pyth documentation](https://docs.pyth.network/documentation/pythnet-price-feeds/pull-updates). The [`@pythnetwork/price-service-client` TypeScript package](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/client/js) can be used to fetch the latest price feed data which then can be passed to the contract as the `UpdatePriceFeeds` ExecuteMsg.

Pyth publishes prices for two kinds of feeds:

- **Stable price feeds** consist of prices generated on the pythnet blockchain. These feeds are available on both mainnet and testnet blockchains. Use stable feeds if you would like your test environment to be identical to your production environment.

- **Edge price feeds** consist of prices generated on the pythtest blockchain, which is Pyth's test environment for new features. Consequently, these feeds are not as reliable as the stable feeds, and there are other differences as well (e.g., different price feed ids). These feeds are only available on testnets.

## Examples

- A minimal on-chain [contract example](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/cosmwasm/examples/cw-contract) which queries the Pyth contract.

## Contract Address for `Osmosis Test 5`

- Stable: `osmo1hpdzqku55lmfmptpyj6wdlugqs5etr6teqf7r4yqjjrxjznjhtuqqu5kdh`
- Beta: `osmo1lltupx02sj99suakmuk4sr4ppqf34ajedaxut3ukjwkv6469erwqtpg9t3`

## Price Feed IDs

The price feed IDs for stable and edge feeds are different and can be found at the following links:

- [List of stable ids](https://pyth.network/developers/price-feed-ids#cosmwasm-stable)
- [List of beta ids](https://pyth.network/developers/price-feed-ids#cosmwasm-edge)
33 changes: 33 additions & 0 deletions docs/overview/integrate/external_projects/subquery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SubQuery

## Intro

SubQuery is a leading blockchain data indexer that provides developers with fast, flexible, universal, open source and decentralised APIs for web3 projects. SubQuery SDK allows developers to get rich indexed data and build intuitive and immersive decentralised applications in a faster and more efficient way. SubQuery supports 100+ ecosystems including Osmosis, Cosmos, Ethereum, Polygon, Polkadot, Algorand, NEAR, and Avalanche.

Another one of SubQuery's competitive advantages is the ability to aggregate data not only within a chain but across multiple blockchains all within a single project. This allows the creation of feature-rich dashboard analytics, multi-chain block scanners, or projects that index IBC transactions across zones.

Other advantages include superior performance with multiple RPC endpoint configurations, multi-worker capabilities and a configurable caching architecture. To find out more, visit our documentation.

## Useful resources

- SubQuery General Docs: <https://academy.subquery.network/>
- Quick Start Guide: <https://academy.subquery.network/quickstart/quickstart.html>
- Osmosis Starter Project: <https://github.com/subquery/cosmos-subql-starter/tree/main/Osmosis>
- SubQuery Osmosis Example Project: <https://academy.subquery.network/quickstart/quickstart_chains/cosmos-osmosis.html> and article <https://blog.subquery.network/subquery-example-project-osmosis/?lng=en?>
- SubQuery Osmosis Workshop Recording: <https://www.youtube.com/watch?v=t6QfK8g5sCw&t=39s>

# Getting started

Take a look at this SubQuery starter project that indexes all swaps on Osmosis' on-chain DEX.

You can also follow along with this step-by-step guide to get familiar with SubQuery.

## Running and Hosting your Osmosis SubQuery APIs

SubQuery is open-source, meaning you have the freedom to run it in the following three ways:

1. Locally on your own computer (or a cloud provider of your choosing), view the instructions on how to run SubQuery Locally.

2. By publishing it to SubQuery's enterprise-level Managed Service, where we'll host your SubQuery project in production-ready services for mission-critical data with zero-downtime blue/green deployments. There even is a generous free tier. Find out how.

3. By publishing it to the decentralised SubQuery Network, the most open, performant, reliable, and scalable data service for dApp developers. The SubQuery Network indexes and services data to the global community in an incentivised and verifiable way and supports Osmosis from launch.
6 changes: 3 additions & 3 deletions docs/overview/integrate/incentives.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ sidebar_position: 7

Liquidity Providers on Osmosis receive swap fees by default, but can choose to bond to pools and receive additional liquidity incentives from many sources.

* [External Incentives](https://docs.osmosis.zone/overview/getting-started/#external-incentives)
* [External Incentives](#external-incentives)

Osmosis allows for the permissionless creation of (external) liquidity mining gauges, allowing projects to add thier own rewards to further incentivize users to provide liquidity into a pool.

* [Internal Incentives](https://docs.osmosis.zone/overview/getting-started/#internal-incentives)
* [Internal Incentives](#internal-incentives)

Osmosis allocates up to 20% of inflation to incentivize users to bond their liquidity on Osmosis. If a pool is included then it will be allocated a share of incentives based on several factors such as type of asset, swap fees generated in the pool, age of listing and sustained volumes.
Osmosis currently only incentivises pools composed of a very limited set of tokens as of [Proposal 638](https://www.mintscan.io/osmosis/proposals/638).

* [Superfluid Staking](https://docs.osmosis.zone/overview/getting-started/#superfluid-staking)
* [Superfluid Staking](#superfluid-staking)

If enabled on a pool, a portion of the OSMO within can also be staked. Providing additional security to Osmosis as well as giving the liquidity providers additional staking rewards and the ability to participate in governance.
Superfluid staking is only available on Classic pools or full range Supercharged Pools.
Expand Down

1 comment on commit bfe9615

@vercel
Copy link

@vercel vercel bot commented on bfe9615 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.