Skip to content
This repository was archived by the owner on Oct 14, 2022. It is now read-only.
This repository was archived by the owner on Oct 14, 2022. It is now read-only.

Unify Account Calculations Between Liquidator and SDK #36

@benedictbrady

Description

@benedictbrady

There is a lot of repeat logic to parse obligation states in both the SDK (https://github.com/solendprotocol/solend-sdk) and the liquidator. In some situations I have noticed meaningful divergence in the implementations.

One example. When parsing a deposit account the SDK introduces the notion of cTokenExchangeRate and uses this to adjust the supply. On the other hand the liquidator uses the getCollateralExchangeRate function which performs a calculation that is directionally the same but reads quite a bit differently.

I am somewhat skeptical that these implementations are exactly the same in all cases which raises some questions as to which one to follow when building logic that sits on top of Solend

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