# Integration Guide For Exchanges

Centralized exchanges will play an important role in helping us reach our goal of making Origin's yield-bearing tokens ubiquitous. We are happy to help any exchange that wants to make OUSD, OETH, Super OETH or OS available to its users.&#x20;

These docs are a great starting point for understanding how Origin's yield-bearing tokens work. Here are some important questions for exchanges that wish to integrate them to consider:

**Do you want to participate in the yield that is generated?**

We're assuming the answer will be yes and we highly encourage this as well! However, there may be some instances where you would prefer to move fast and list our yield-bearing tokens without participating in their [rebasing nature](https://app.gitbook.com/s/XpteHgdlBmeE9YJzupcl/core-concepts/elastic-supply/rebasing-and-smart-contracts) since it's the fastest and simplest integration. For exchanges that want to list Origin's yield-bearing tokens, but are strapped for engineering resources, you may want to launch the non-rebasing version first while your engineers make whatever changes are necessary. To make Origin's yield-bearing tokens non-rebasing, you can call `rebaseOptOut()` from each EOA wallet that holds OUSD, OETH, Super OETH, or OS or do nothing if you are storing the tokens on smart contracts. Origin yield-bearing tokens that are not opted in to rebasing behave just like any other ERC-20 token.

Another option is to list wrapped versions of the tokens (wOUSD, wOETH, wsuperOETH, wOS) which are non-rebasing versions of our yield-bearing tokens that still earn yield. The wrapped tokens can be unwrapped anytime for native OUSD, OETH, superOETH, and OS.

**Are you storing customer balances on smart contracts (ie. multi-sigs) or EOA wallets?**

Any smart contract that is holding Origin's yield-bearing tokens needs to manually opt-in to receive the yield by calling `rebaseOptIn()`. This is due to the [elastic supply](https://app.gitbook.com/s/XpteHgdlBmeE9YJzupcl/core-concepts/elastic-supply) and the [rebasing nature of oTokens](https://app.gitbook.com/s/XpteHgdlBmeE9YJzupcl/core-concepts/elastic-supply/rebasing-and-smart-contracts). Many exchanges sweep customer funds into a multi-sig wallet for cold storage. If you do this, you'll want to make sure that you opt-in to rebasing so that you are always earning.

**Are you caching user balances?**

Origin's yield-bearing tokens dynamically update the value returned by the `balanceOf()` function on our ERC20 contract. Users' balances will update at unpredictable times as new yield is generated by the protocol. As long as you aren't caching this value, users will always see the correct amount of oTokens that they are holding.

It's important to note that while OUSD, OETH, Super OETH and OS are rebasing tokens, user balances will only rebase in a positive direction (your balance will never go down). This makes things a lot simpler than integrating with other rebasing coins like AMPL or other algo-stables.

**Are you comingling user funds?**

If you are comingling funds, you'll want to be sure that each user gets their pro-rata amount of the yield that is generated by the protocol. Probably the easiest way to do this is to track each user's balance as a percentage of a pool instead of as a fixed amount.

**Are you planning to provide liquidity?**

The Origin team is often willing to provide a market maker and initial liquidity for exchanges that wish to integrate OUSD, OETH, Super OETH, and OS. There are also 9 figures worth of liquidity available on decentralized exchanges like [Curve](https://curve.fi/factory/9).

If you are interested in using Origin's yield-bearing tokens to power your own staking or earning program, you will probably want to be able to access them on demand. They can always be minted or redeemed using the [Origin Dapp](https://app.originprotocol.com/) or directly from the [smart contracts](/registry/contracts.md). If you are planning on providing liquidity yourself, you should be aware that the exact amount of OETH, OUSD, Super OETH, and OS you will receive in exchange for the underlying collateral depends on the current exchange rates as determined by the [oracles.](https://docs.originprotocol.com/registry/contracts/ousd-registry)&#x20;

**Do you have other questions?**

The best way to get help from both our engineering and business teams is usually on [Discord](https://www.originprotocol.com/discord).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.originprotocol.com/resources/guides/integration-guide-for-exchanges.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
