Skip to content

APY Calculation Based on Utilization Rate #8

@DanielEmmanuel1

Description

@DanielEmmanuel1

Description:

Develop a smart contract logic to calculate APY for lending and borrowing based on the utilization rate of the asset reserve. The APY should increase as the reserve gets utilized and decrease as available liquidity increases.

The task is completed when:

✅ APY dynamically adjusts based on the utilization rate of the reserve.
✅ A base rate + multiplier model is implemented where APY follows a non-linear curve as utilization increases.
✅ Smart contract stores and updates APY changes efficiently.
✅ The contract allows retrieval of APY for any given asset at any time.
✅ Gas costs are optimized to avoid excessive computational expenses.
✅ Security measures are implemented to prevent APY manipulation.
✅ A formula is implemented to calculate utilization rate (U), where:

Image
  • B (Borrowed assets): Represents the portion of the reserve that has been lent out.
  • R (Available assets): Represents the portion of the reserve that is still available for borrowing.
  • B + R (Total assets in reserve): This ensures we calculate utilization as a fraction of the total

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions