---
# System prepended metadata

title: Band <> Injective tech optimization (Sort by effort/result)

---

# Band <> Injective tech optimization (Sort by effort/result)

## 1. Batch 3 requests to 1 request

Now, Injective chain has 3 tasks to request with 10 block intervals, so we propose to merge all requests into one, but also keep the security level as same as 3 requests 

### Specification
https://hackmd.io/o_N7xWFcRyaL1WPQfAy6Zw

### Action item
- Injective
    - Make change how to encode all symbols into one.
    - Implement new logic on the responded result that saves new price when data is success
    - Test on testnet
- Band
    - Implement data sources that can return valid prices along with invalid to make sure when 1 symbol failed, we can still get other prices (eg. `16,823.92,1,213.02,1.71,-`)
    - Implement on oracle script side allow to skip bad price/symbol and write aggregation logic to make sure integrity of data
    - Deploy to laozi-testnet6

## 2. Reduce relayers + implement emergency script/program to immediately relay packets
Now we face our network cost is more than what should be due to we have many relayers trying to relay the same packet to BandChain and each transaction needs to set the gas limit for executing requests that cost around ~1M per transaction but only 1 transaction that will be processed to create a request but other transactions will waste but need to pay fees equal to the successful one.

We can reduce the number of relayers that run for us, just select the good validators (3 validators) to relay data between us.

And make a monitoring script to poll your latest data, and immediately send packets if they spot the pending packets. 

### Action item
- Injective
    - Share/implement a monitoring script to poll the latest data price on Injective chain
- Band & Injective
    - Implement script to query unsend packets and send transaction to relay them

## 3. Add backup mode on relayer

We propose to add a feature to relayer programs that allow it to wait to send packets for a given time (~10 seconds) and will only try to send transactions to relay if that packet is still not delivered.

That we can set up 1 relayer to be the main one, then we have 2 relayers that delay 5 seconds, and the last 2 to delay 10 seconds.

### Action item
- Band & Injective
    - Discuss and research which one we will want to modify (Hermes, go-relayer, ts-relayer) to add this feature
    - Implement and try use on testnet track token usage + packet delay


