-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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:
- 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