Integration Guide For Exchanges

Centralized exchanges will play an important role in helping us reach our goal of making OUSD and OETH ubiquitous. We are happy to help any exchange that wants to make oTokens available to its users. We believe OUSD and OETH will make a great addition to any exchange that wants to offer both a superior stablecoin and a new high-yield opportunity for their users.

These docs are a great starting point for understanding how oTokens works. Here are some important questions for exchanges that wish to integrate oTokens 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 oTokens without participating in the rebasing nature of oTokens since it's the fastest and simplest integration. For exchanges that want to list oTokens, 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 oTokens non-rebasing you can call rebaseOptOut() from each EOA wallet that holds OUSD or OETH, or do nothing if you are storing oTokens on smart contracts. Non-rebasing oTokens behaves just like any other ERC-20 token.

Another option is to list wrapped OUSD (wOUSD) or wrapped OETH (wOETH) which is a non-rebasing version of oTokens that still earns yield. wOUSD and wOETH can be wrapped or unwrapped anytime for native OUSD and OETH.

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

Any smart contract that is holding oTokens needs to manually opt-in to receive the yield by calling rebaseOptIn(). This is due to the elastic supply and the rebasing nature of oTokens. 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?

oTokens dynamically updates 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 and OETH 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 or OETH. There are also 9 figures worth of liquidity available on decentralized exchanges like Curve.

If you are interested in using oTokens to power your own staking or earning program, you will probably want to be able to access OUSD and OETH on demand. OUSD and OETH can always be minted or redeemed using the Origin Dollar DApp and Origin Ether DApp, or directly from the OUSD and OETH smart contracts. If you are planning on providing liquidity yourself, you should be aware that the exact amount of oTokens you will receive in exchange for the underlying collateral depends on the current exchange rates as determined by the oracles. If you are planning on redeeming oTokens for the underlying collateral, you should know there is a 0.25% exit fee and oTokens will return a basket of coins in proportion to the backing collateral in the pool. We encourage exchanges to leverage existing pools of liquidity to avoid those fees. If possible, mints or redeems should be done in large batches for maximum efficiency.

Do you have other questions?

The best way to get help from both our engineering and business teams is usually on Discord.

Last updated