Each asset supported by the Onyx Protocol is integrated through a oToken contract, which is an EIP-20 compliant representation of balances supplied to the protocol. By minting oTokens, users (1) earn interest through the oToken's exchange rate, which increases in value relative to the underlying asset, and (2) gain the ability to use oTokens as collateral.
oTokens are the primary means of interacting with the Onyx Protocol; when a user mints, redeems, borrows, repays a borrow, liquidates a borrow, or transfers oTokens, she will do so using the oToken contract.
There are currently two types of oTokens: OErc20 and OEther. Though both types expose the EIP-20 interface, OErc20 wraps an underlying ERC-20 asset, while OEther simply wraps Ether itself. As such, the core functions which involve transferring an asset into the protocol have slightly different interfaces depending on the type, each of which is shown below.
Each market has its own Supply interest rate (APR). Interest isn't distributed; instead, simply by holding oTokens, you'll earn interest.
oTokens accumulate interest through their exchange rate — over time, each oToken becomes convertible into an increasing amount of its underlying asset, even while the number of oTokens in your wallet stays the same.
Let’s say you supply 1,000 USDC to the Onyx protocol, when the exchange rate is 0.020070; you would receive 49,825.61 oUSDC (1,000/0.020070).
A few months later, you decide it’s time to withdraw your USDC from the protocol; the exchange rate is now 0.021591:
- Your 49,825.61 oUSDC is now equal to 1,075.78 USDC (49,825.61 * 0.021591)
- You could withdraw 1,075.78 USDC, which would redeem all 49,825.61 oUSDC
- Or, you could withdraw a portion, such as your original 1,000 USDC, which would redeem 46,315.59 oUSDC (keeping 3,510.01 oUSDC in your wallet)
Each oToken is visible on Etherscan, and you should be able to view them in the list of tokens associated with your address
oToken balances have been integrated into Coinbase Wallet and MetaMask; other wallets may add oToken support
Yes, but exercise caution! By transferring oTokens, you’re transferring your balance of the underlying asset inside the Onyx protocol. If you send a oToken to your friend, your balance (viewable in the Onyx Interface) will decline, and your friend will see their balance increase.