Orimex AI - Whitepaper
  • Welcome to Orimex AI
  • Launch App
  • BUY ON PUBLIC SALE
  • Overview
    • Create AI Agent
    • USDT Agent trader
  • Our token
    • Tokenomics
  • Useful Links
    • Audit
    • KYC
    • Twitter
    • Telegram
    • Website
Powered by GitBook
On this page
  1. Overview

USDT Agent trader

PreviousCreate AI AgentNextTokenomics

Last updated 2 months ago

taking Benefits:

  • High APY: 730%

How to Stake:

Join:

  1. Connect your Wallet: Start by connecting your compatible wallet to the USDT platform

  2. Deposit USDT: Deposit your USDT tokens into the staking pool.

  3. Confirm Staking: Confirm your transaction, and you're all set to start earning rewards!

Referral Program: Additionally, USDT offers a lucrative referral program where you can earn extra rewards. Share your unique referral link with friends, family, or your community, and earn a generous 9% commission on their staking rewards.

How to Refer and Earn:

  1. Get Your Referral Link: Find your unique referral link in your account dashboard.

  2. Share with Your Network: Spread the word about USDT and encourage others to join using your referral link.

Please be aware that deposited balances will be locked for a duration of 35 days

How does this work?

Orimex Trader receives the USDT from the contract and performs an arbitrage, distributing the profit to the investors.

Our AI Agent looks for ways to make trades every second

   function checkArbitrageOpportunity(uint amountIn) external view returns (uint bnbOut, bool hasProfit) {
         require(msg.sender == aiAgent, "Only AI Agent");
         address[] memory pathBnbToUsdc = new address[](2);
         pathBnbToUsdc[0] = WBNB;
         pathBnbToUsdc[1] = USDC;

         address[] memory pathUsdcToThird = new address[](2);
         pathUsdcToThird[0] = USDC;
         pathUsdcToThird[1] = thirdToken;

         address[] memory pathThirdToBnb = new address[](2);
         pathThirdToBnb[0] = thirdToken;
         pathThirdToBnb[1] = WBNB;

         try PancakeswapRouter.getAmountsOut(amountIn, pathBnbToUsdc) returns (uint[] memory usdcOut) {
             try PancakeswapRouter.getAmountsOut(usdcOut[1], pathUsdcToThird) returns (uint[] memory thirdOut) {
                 try PancakeswapRouter.getAmountsOut(thirdOut[1], pathThirdToBnb) returns (uint[] memory bnbOutArray) {
                     bnbOut = bnbOutArray[1];
                     hasProfit = bnbOut > amountIn;
                     return (bnbOut, hasProfit);
                 } catch {
                     return (0, false);
                 }
             } catch {
                 return (0, false);
             }
         } catch {
             return (0, false);
         }
     }

Here, it performs the function by receiving the profit directly into its wallet

```remix-solidity
  function executeTriangularTrade() external payable {
         require(msg.sender == aiAgent, "Only ai Agent");
         require(msg.value > 0, "Must send BNB");
         uint initialBnb = msg.value;
         emit Debug("BNB Received", initialBnb);
         emit Debug("Initial BNB Balance", address(this).balance);
         emit DebugAddress("WBNB Address", WBNB);
         emit DebugAddress("USDC Address", USDC);
         emit DebugAddress("Third Token Address", thirdToken);

        
         address[] memory pathBnbToUsdc = new address[](2);
         pathBnbToUsdc[0] = WBNB;
         pathBnbToUsdc[1] = USDC;

         address[] memory pathUsdcToThird = new address[](2);
         pathUsdcToThird[0] = USDC;
         pathUsdcToThird[1] = thirdToken;

         address[] memory pathThirdToBnb = new address[](2);
         pathThirdToBnb[0] = thirdToken;
         pathThirdToBnb[1] = WBNB;

         // 1. BNB -> USDC
         emit Debug("Preparing BNB to USDC swap", initialBnb);
         emit Debug("Calling swapExactETHForTokens for BNB->USDC", initialBnb);
         uint[] memory usdcAmounts;
         try PancakeswapRouter.swapExactETHForTokens{value: initialBnb}(
             0,
             pathBnbToUsdc,
             address(this),
             block.timestamp + 300
         ) returns (uint[] memory amounts) {
             usdcAmounts = amounts;
             emit Debug("USDC Received", usdcAmounts[1]);
         } catch Error(string memory reason) {
             emit Error(string(abi.encodePacked("BNB to USDC swap failed: ", reason)));
             revert(string(abi.encodePacked("Swap BNB to USDC failed: ", reason)));
         } catch {
             emit Error("BNB to USDC swap failed - Unknown reason");
             revert("Swap BNB to USDC failed - Unknown");
         }
         uint usdcReceived = usdcAmounts[1];

         // 2. USDC -> Third Token
         emit Debug("Preparing USDC to Third Token swap", usdcReceived);
         uint[] memory thirdAmounts;
         try PancakeswapRouter.swapExactTokensForTokens(
             usdcReceived,
             0,
             pathUsdcToThird,
             address(this),
             block.timestamp + 300
         ) returns (uint[] memory amounts) {
             thirdAmounts = amounts;
             emit Debug("Third Token Received", thirdAmounts[1]);
         } catch Error(string memory reason) {
             emit Error(string(abi.encodePacked("USDC to Third Token swap failed: ", reason)));
             revert(string(abi.encodePacked("Swap USDC to Third Token failed: ", reason)));
         } catch {
             emit Error("USDC to Third Token swap failed - Unknown reason");
             revert("Swap USDC to Third Token failed - Unknown");
         }
         uint thirdReceived = thirdAmounts[1];

          3. Third Token -> BNB
         emit Debug("Preparing Third Token to BNB swap", thirdReceived);
         uint[] memory bnbAmounts;
         try PancakeswapRouter.swapExactTokensForETH(
             thirdReceived,
             0,
             pathThirdToBnb,
             address(this),
             block.timestamp + 300
         ) returns (uint[] memory amounts) {
             bnbAmounts = amounts;
             emit Debug("BNB Received Back", bnbAmounts[1]);
         } catch Error(string memory reason) {
             emit Error(string(abi.encodePacked("Third Token to BNB swap failed: ", reason)));
             revert(string(abi.encodePacked("Swap Third Token to BNB failed: ", reason)));
         } catch {
             emit Error("Third Token to BNB swap failed - Unknown reason");
             revert("Swap Third Token to BNB failed - Unknown");
         }
         uint bnbReceived = bnbAmounts[1];

         emit Debug("Checking profit", bnbReceived);
         if (bnbReceived > initialBnb) {
             payable(aiAgent).transfer(bnbReceived);
             emit Debug("Profit", bnbReceived - initialBnb);
         } else {
             emit Error("No profit");
             revert("No arbitrage profit");
         }
     }
 
  

```
https://agent.orimex.app/