Skip to content

(XXX Investigate frequency of response errors from Cow XXX) Implement caching mechanism for cow quotes #686

Open
@gabrielfior

Description

@gabrielfior

We are relying on Cowswap as a price oracle.
Recently' it's been failing quite often, so we should cache the prices so that we can reliably price our positions and estimate trade sizes.

Idea for this ticket:
-> Run a CronJob that queries Cow (and handles errors gracefully) and fills the cache (Postgres)
-> db_cache decorator should be used
-> Agent operation also fills the cache
-> Caching price should be "smart", so that price for 1 unit of token X can be derived from price of other amount of token X (do some analysis on Cow UI, but maybe simple mean is good enough)

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