Developer Page

This page talks about how to make money with the Onyx ecosystem and keep the price of our tokens stable. There are many arbitrage opportunities available interacting with our token contracts and exchanges and here is a list of some of them. To see the list of exchanges our tokens are trading on, and their token addresses, check out our tokens page.



Uniswap Pooling

In order to add to the Uniswap liquidity pool, and make 0.3% everytime a transaction is made on Uniswap, send 50% of the ETH you want to pool to the tokens contract, and you will get back the correct amount of the token.


OUSD  token address - 0xd2d01dd6aa7a2f5228c7c17298905a7c7e1dfe81
OSPV  token address - 0xfcce9526e030f1691966d5a651f5ebe1a5b4c8e4
OSPVS token address - 0xf7d1f35518950e78c18e5a442097ca07962f4d8a

Then send the remaining ETH and the tokens you received using the Uniswap pool dapp: OUSD, OSPV, OSPVS.


Warning: Prices and Uniswap balances may change mid transaction and eliminate an arbitrage opportunity!

OUSD Arbitrage

  • Dai<->OUSD arb loading...
  • Sai<->OUSD arb loading...
  • USDC<->OUSD arb loading...
  • TUSD<->OUSD arb loading...
  • sUSD<->OUSD arb loading...
  • Contract->Uniswap arb loading...
  • Uniswap->Contract arb loading...
  • Contract->Uniswap withdraw arb loading...
  • Uniswap->Contract withdraw arb loading...

OSPV Arbitrage

  • OSPV arb loading...

OSPVS Arbitrage

  • OSPVS arb loading...

General rules for how to interact with our token contracts for arbitrage

  1. Onyx USD token contract can receive ETH and will return Onyx USD tokens.
  2. To withdraw, send Onyx USD tokens less than withdrawMAX() back to Onyx USD token contract.
  3. All asset token contracts can receive ETH and Onyx USD tokens and will return asset tokens.
  4. To withdraw, send the asset tokens back to the asset token contract.

Arbitrage examples

The price of ETH relative to our tokens is constantly changing, so there is constantly opportunity to make money interacting with Uniswap and our contracts. A more detailed look into pricing calculation and contract interaction on Uniswap can be found in the Uniswap docs. The price of our Onyx S&P 500 token is based on VOO. The price of our Onyx S&P 500 Short token is based on SH.


As the price changes through out the day, there will be constant arbitrage opportunity to buy our token from Uniswap and sell it to our contracts, or buy our tokens from our contracts and sell it to Uniswap for profit.


  1. Volatility arbitrage  -  such as for OUSD/DAI or OETH/ETH when it comes out, buying when its .99 and selling when its 1.01 for a profit.
  2. If there is a limit order for Onyx USD for greater than $1, you can buy Onyx USD for $1 by sending ETH to the Onyx USD contract address. You will get sent back Onyx USD tokens at the correct price. You can then sell the tokens at the elevated price on the exchange for a profit.
  3. If there is a limit order on an exchange for greater than the price of VOO, you can buy OSPV at the correct price by sending ETH(or Onyx USD) to the Onyx S&P 500 contract address and getting Onyx S&P 500 tokens back. You can then sell the tokens at the elevated price on the exchange for profit.
  4. If there is a limit order on an exchange for greater than the price of SH, you can buy OSPVS at the correct price by sending ETH(or Onyx USD) to the Onyx S&P 500 Short contract address and getting Onyx S&P 500 Short tokens back.You can then sell the tokens at the elevated price on the exchange for profit.
  5. If any of our asset tokens, OSPV or OSPVS is trading lower than their respective asset prices on an exchange, you can buy the discounted tokens on the exchange and sell them for the correct price by transferring the tokens to their respective token contract addresses for a profit.
  6. If the price of Onyx USD is trading at less than $1 on an exchange, you can buy the discounted token and sell it to the contract by sending the token to the contract and get the correct amount of ETH back for a profit. Make sure the amount you send is less than withdrawMAX() or the transaction will fail. If you wish to withdraw more than withdrawMAX(), send the Onyx USD tokens multiple times.
    pragma solidity 0.5.12;
    
    interface OnyxUSD{
        //max amount you can withdraw in Onyx USD;
        function withdrawMAX() external view returns (uint256);
        function transfer(address input, uint amount) external;
    }
    
    contract myContract{
        
        //contract address of Onyx USD
        address OnyxUSDAddress = 0xD2d01dd6Aa7a2F5228c7c17298905A7C7E1dfE81;
        uint tokenAmount; //Amount you want to withdraw in Onyx USD
        
        function withdraw() public{
        
            //if the amount you want to withdraw is less than or equal to withdrawMAX,
            //then you can withdraw.
            if(tokenAmount <= OnyxUSD(OnyxUSDAddress).withdrawMAX()){
                OnyxUSD(OnyxUSDAddress).transfer(OnyxUSDAddress, tokenAmount);
            
            //otherwise, just withdraw the MAX amount.
            }else{
                OnyxUSD(OnyxUSDAddress).transfer(OnyxUSDAddress, OnyxUSD(OnyxUSDAddress).withdrawMAX());
            }
        }
    }
    											

ETH Price and Gas Price Contract

0x352154a03cFb4Bb5AE4f95dD1480b63d8404235c


Onyx provides the current ETH price and Recommended Gas Prices as calculated by Ethgasstation.info on the blockchain for the public to use. It is updated anytime someone interacts with any of our contracts. ethPrice is stored as 10^18. The gas prices are stored as 10^9. Below is the current data.


ethPrice:

safeLow:

standard:

fast:

fastest:


Time since last update(ddd:hh:mm:ss):




If you find a bug or something doesn't seem to be calculating correctly, please let us know at contact@onyx.to