Skip to content

Improvement: use appdata to identify flash loan orders that should have be allowed zero balances and invalid EIP1271 signatures  #3906

@fafk

Description

@fafk

Background

Recently we introduced flags to allows EIP1271 orders be allowed to go through even if the account doesn't have enough balance to perform the trade or the signature is not valid. This is to allow AAVE orders with flashloans, which get the necessary balance and make the signature pass as part of the preHooks which the autopilot doesn't take into account.

Details

This is not ideal and instead we get inspect the appdata of such orders and allow them to go trough if they have a flashloan hit and/or originate from AAVE.

Acceptance criteria

disable_1271_order_sig_filter and disable_1271_order_balance_filter are both false, but AAVE orders with flash loans work. Ideally we this functionality covered by an e2e tests as testing is currently lacking. Refactoring after introducing such tests is welcome to make this code more easily readable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions