Integrate your Dapp/Wallet

Protocols or projects may directly forward orders to the Hiding Book from a web3 interface through a simple integration.


To interface with the Hiding Book you will need the following:
  • Ability to format, sign, and manipulate the 0xv4 order format
  • Ability to interface with a wallet provider of your choice e.g. MetaMask, Ledger, etc
  • UX to gather the following user input:
    • tokenIn - the units of tokens to be paid
    • tokenOut - the units of tokens to be received
    • order expiration
    • price
  • UX for displaying orders
    • view open orders
    • cancel orders
    • view historic orders


Sample UX flow

User arrives at the trading interface
  • Make a call to the GET /info endpoint to get the information you need to initialize the trading screen. The response contains useful information like supported tokens and data needed to sign orders.
User is ready to sign an order
It's time to submit the signed order
  • Make a call to the POST /orders endpoint to post the order to the Hiding Book for validation. The server will alert you of any errors, insufficient balances, or insufficient allowances.
User is asked to approve allowances
  • Allowances are to be made where the spender is the 0xv4 verifyingContract provided in the GET /info endpoint.
User wants to view orders
User wants to cancel an order
Calculating an Order's Fill %
  • Use the order data and make a simple calculation: fillPercentage = filledAmount_takerToken / takerAmount
Determine order status

How to claim rewards

We have 4 reward programs, the claiming logic is the same for all rewards programs.
Step 1. Call Indibo API with your address.
  • Open your terminal and run following command or use your browser to get the response.
Step 2. Go to etherscan and connect your wallet.
  • Open your browser and copy the following link.
# for HidingGame (ACT 2 1st half) (hiding)
# for HidingGame (ACT 2 2nd half) (hiding2)
# for HidingGame (ACT 3 1st half) (hiding3)
# for HidingGame (ACT 3 2nd half) (hiding4)
# for HidingGame (ACT 4 1st half) (hiding5)
# for HidingGame (ACT 4 2nd half) (hiding6)
# for LiquidityPool-PreMining (lp-pre)
# for LiquidityPool-Act1 (lp)
# for LiquidityPool-Act2 (lpq2)
# for LiquidityPool-Act3 (lpq3)
# for LiquidityPool-Act4 (lpq4)
# for Lender-Act3 (lender)
# for Lender-Act4 (lender2)
  • Click Connect to Web3 to connect your MetaMask or WalletConnect.
Step 3. Claim your rewards.
  • Expand the claim function.
You will see 4 input fields: _to (address), _earningsToDate (uint256), _nonce (uint256), _signature (bytes)
  • Fill in the inputs with the Indibo API response.
owner --> _to (address)
earnings_to_date --> _earningsToDate (uint256)
nonce --> _nonce (uint256)
signature --> _signature (bytes)
  • Click Write and approve the claim in your wallet.
Step 4. Success! You will receive your rewards