Skip to content

docs: clarify nominal interest rate semantics#259

Merged
liobrasil merged 35 commits intoholyfuchs/FLO-18-nominal-interetsfrom
lionel/interest-rate-terminology
Mar 11, 2026
Merged

docs: clarify nominal interest rate semantics#259
liobrasil merged 35 commits intoholyfuchs/FLO-18-nominal-interetsfrom
lionel/interest-rate-terminology

Conversation

@liobrasil
Copy link
Contributor

@liobrasil liobrasil commented Mar 10, 2026

Summary

  • clarify that configured interest curve values are nominal yearly rates
  • replace misleading APY and continuous compounding wording in docs and test comments
  • document that realized one-year growth can exceed the nominal rate due to per-second compounding
  • align fixed-curve commentary with the actual protocol-fee spread logic

Fixed-Curve Commentary Update

Some of the old comments described the fixed-curve lender-side math too simplistically, implying a relationship like creditRate = debitRate - insuranceRate.

The implementation in FlowALPModels does not use that simplified formula on the fixed-rate path. Instead, it computes a combined protocol fee factor from insuranceRate + stabilityFeeRate, then derives the credit rate from the debit rate after applying that combined fee factor.

This PR does not change protocol behavior. It only updates comments and documentation so they no longer imply that the spread is driven only by insurance, or that the lender-side rate is computed by a simple subtraction.

Testing

  • not run (comment and documentation changes only)

mts1715 and others added 21 commits February 18, 2026 20:24
…dation - fork_multiple_positions_per_user.cdc covering three scenarios:

- Multiple positions with distinct collateral types (FLOW, USDF, USDC,
  WETH, WBTC) and isolation guarantees between them
- Cross-position effects through shared liquidity pools
- Batch liquidation of 4 positions (2 full, 2 partial) in a single tx
…eates

100 positions across three collateral types (50 USDF, 45 USDC, 5 WBTC),
crashes all collateral prices 40% simultaneously, and batch-liquidates all
positions via MockDexSwapper in chunks of 10 to stay within computation limits.
…ion-per-user-scenarios-testing

# Conflicts:
#	flow.json
Co-authored-by: patrick <72362902+holyfuchs@users.noreply.github.com>
…testing

# Conflicts:
#	cadence/tests/test_helpers.cdc
#	flow.json
@liobrasil liobrasil requested a review from a team as a code owner March 10, 2026 18:19
@liobrasil liobrasil requested review from Gornutz and holyfuchs March 10, 2026 18:39
mts1715 and others added 8 commits March 10, 2026 22:23
…-scenarios-testing

Multi-Position Per User Scenarios: Fork Tests & Supporting Infrastructure
cadence/tests/fork_multiple_positions_per_user.cdc
Runs against mainnet at block 142528994 using real token holders and real token identifiers (FLOW, USDF, USDC, WETH, WBTC). Contains 4 tests: testMultiplePositionsPerUser, testPositionInteractionsSharedLiquidity, testBatchLiquidations, testMassUnhealthyLiquidations
Co-authored-by: Gornutz <90406700+Gornutz@users.noreply.github.com>
Co-authored-by: Gornutz <90406700+Gornutz@users.noreply.github.com>
Co-authored-by: Gornutz <90406700+Gornutz@users.noreply.github.com>
Co-authored-by: Gornutz <90406700+Gornutz@users.noreply.github.com>
Co-authored-by: Gornutz <90406700+Gornutz@users.noreply.github.com>
Co-authored-by: Gornutz <90406700+Gornutz@users.noreply.github.com>
@liobrasil liobrasil requested a review from Gornutz March 11, 2026 02:20
@liobrasil liobrasil changed the base branch from main to holyfuchs/FLO-18-nominal-interets March 11, 2026 04:28
@liobrasil liobrasil merged commit 4699e83 into holyfuchs/FLO-18-nominal-interets Mar 11, 2026
@liobrasil liobrasil deleted the lionel/interest-rate-terminology branch March 11, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants