Skip to content

Data scaling upgrade #20

@adamewozniak

Description

@adamewozniak

We currently are limited on the amount of price updates the axelar bridge can make in one transaction due to a restriction on this memo field:

This message is expected to fail if:
...
- `PacketData` contains an `UNSPECIFIED` type enum, the length of `Data` bytes is zero or the `Memo` field exceeds 256 characters in length.

As a result, we need to find a way to shorten the msg field while allowing us to relay the same amount of information. The fix seems to be hashing the data as a verification method instead of relaying it through the bridge.

  1. When the user transacts against an ojo contract, the frontend javascript queries an ojo node for the current set of exchange rates and block number. This is passed into the EVM contract.
  2. The EVM contract makes a call to ojo through axelar, asking for a hash of the set of exchange rates at the particular block height
  3. The EVM contract receives the hash from Ojo.
  4. The EVM contract hashes the user-supplied exchange rates and compares it against the ojo-supplied hash. If they are the same, allow the transaction to go through.
  5. If not, roll back the transaction.

There are a few different components to this change. We need to:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions