Skip to content

[Improvement] Load Compound rates faster #3

@pi0neerpat

Description

@pi0neerpat

Problem

Currently we are using the compound historical API to calculate interest sent over time. This requires a single call (potentially more in the future) to the API for each loan transfer event. The API has performed well so far, but I'd prefer if we moved to something faster, more robust, and that we not depend on a 3rd party for certain features to work.

Suggested Solution

Get the historical rate directly from Eth network using the getStorageAt(contract, slot, blockNumber) method. To make this easier, I suggest finding an existing library to help compute the Compound rate directly from contract state, without writing all this logic over again.

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