Skip to content

sor: extra gas calc #298

@ondreez

Description

@ondreez

not necessary dispatch with extra gas all the time in router - do it dynamically, based on users position, if no position in MM we dont need to add extra gas

ideal solution:

  1. dryrun tx to see if it fails or not on out of gas
  2. if success = no extra gas
  3. if it fails = wrap it with dispatch

solution no.2:

  • estimate gas to determine that accurately - estimate with non 0 gas - the current estimator works as well

solution no.3:

  • fix for looping positions
  • for 1 supply and 1 borrow position - this doesn't need extra gas
  • We have lot of these accounts and those accounts are sending lot of swaps, so using extra gas for each of these is very inefficient

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/sdkRelated to trading routerkind/enhancementEnhancement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions