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

Unify Account Calculations Between Liquidator and SDK #36

Open
benedictbrady opened this issue Jul 2, 2022 · 0 comments
Open

Unify Account Calculations Between Liquidator and SDK #36

benedictbrady opened this issue Jul 2, 2022 · 0 comments

Comments

@benedictbrady
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant