Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data scaling upgrade #20

Open
5 tasks
adamewozniak opened this issue Feb 2, 2024 · 0 comments
Open
5 tasks

Data scaling upgrade #20

adamewozniak opened this issue Feb 2, 2024 · 0 comments

Comments

@adamewozniak
Copy link
Member

adamewozniak commented Feb 2, 2024

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant