Guide: How to Swap oneTokens for Ally Tokens via Etherscan

This guide will walk you through the process of swapping your oneUNI, oneBTC, or oneDODO tokens for Ally tokens using Etherscan. The process involves interacting with the AllySwap smart contracts.

Prerequisites

  • An Ethereum wallet with your oneTokens (oneUNI, oneBTC, or oneDODO)
  • Enough ETH in your wallet to cover gas fees
  • Your wallet connected to Etherscan

Step 1: Check if You've Accepted the Terms

  1. Go to the appropriate AllySwap contract on Etherscan
  2. Connect your wallet to Etherscan
  3. Navigate to "Contract" → "Read Contract"
  4. Find the isAgreedToTerms function
  5. Enter your wallet address
  6. Click "Query"
  7. Note the result:
    • If true → proceed to Step 3 (Checking Balance)
    • If false → proceed to Step 2 (Accepting Terms)

Step 2: Accept Terms and Conditions

If you haven't accepted the terms yet:

  1. First, read the terms by calling the termsAndConditions view function
  2. Get your terms hash:
    • Navigate to "Read Contract"
    • Find the termsHash function
    • Enter your wallet address
    • Click "Query"
    • Copy the returned hash value
  3. Accept the terms:
    • Navigate to "Contract" → "Write Contract"
    • Connect your wallet if not already connected
    • Find the consentAndAgreeToTerms function
    • Paste the hash value you copied earlier
    • Click "Write"
    • Confirm the transaction in your wallet and pay the gas fee
    • Wait for the transaction to be confirmed

Step 3: Check Your oneToken Balance

  1. Go to your specific oneToken contract address
  2. Navigate to "Contract" → "Read Contract"
  3. Find the balanceOf function
  4. Enter your wallet address
  5. Click "Query"
  6. Note down your balance - you'll need this for the next step

Step 4: Approve the AllySwap Contract

Before swapping, you need to approve the AllySwap contract to spend your oneTokens:

  1. Go to your oneToken contract on Etherscan
  2. Navigate to "Contract" → "Write Contract"
  3. Find the approve function
  4. Enter:
    • spender: The AllySwap contract address for your token
    • amount: Your oneToken balance (in wei)
  5. Click "Write"
  6. Confirm the transaction in your wallet

Step 5: Perform the Swap

  1. Return to the AllySwap contract
  2. Navigate to "Contract" → "Write Contract"
  3. Find the swap function
  4. Enter:
    • amountIn: The amount of oneTokens you want to swap (in wei)
    • to: Your wallet address
  5. Click "Write"
  6. Confirm the transaction in your wallet

Note: The swap rate is fixed at 7.22491224 Ally tokens per 100 oneTokens.

Verifying Your Swap

After the swap transaction is confirmed:

  1. Check your Ally token balance in your wallet
  2. The amount of Ally tokens received should be:
    • (Your oneToken amount ÷ 100) × 7.22491224

Troubleshooting

If you encounter any errors:

  • Ensure you have enough ETH for gas fees
  • Verify you've approved enough oneTokens for the swap
  • Double-check all addresses are correct
  • Confirm your oneToken balance is sufficient