Technical Considerations
System Assumptions
The system uses USDC with 6 decimals as the base asset on all networks
All lending pool interactions go through the
LendingPoolManagercontract — users never interact with lending pools, tranches, or pending pools directlyAll contracts are upgradeable via TransparentUpgradeableProxy (per-proxy ProxyAdmin)
Constants
FULL_PERCENT
100_00
100% with 2 decimal places (used for ratios, fees)
INTEREST_RATE_FULL_PERCENT
1e18
100% with 16 decimal places (used for interest rates)
KSU_PRICE_MULTIPLIER
1e18
Multiplier for KSU price oracle values
Epoch duration
7 days
System-wide, cannot be customized per pool
Clearing period
48 hours
Final portion of each epoch
Interest rate change delay
4 epochs (default)
Configurable by Kasu Admin
Max tranches per pool
3
Junior, Mezzanine, Senior
Min tranches per pool
1
Single investment offer
Max loyalty levels
10
Configurable thresholds
Solidity Configuration
Solidity version
0.8.23
Optimizer runs (Foundry)
200
Optimizer runs (Hardhat)
800 (200 for PendingPool)
OpenZeppelin
v5.0.2
Limitations
USDC Only
Kasu currently only accepts USDC from Liquidity Providers. Multi-asset support is not available.
Uniform Epochs
All lending pools share the same system-wide epoch timing. Custom per-pool epochs are not supported. This simplifies the system but means Pool Creators cannot configure lending pools with independent epoch schedules.
Unrealized Loss Token Supply
In theory, if a lending pool reports losses so many times that the total supply of tranche share tokens would exceed 2^256, the tranche can no longer accept new deposits. In practice, this should not occur.
Block Gas Limits
Clearing Steps 2 and 4 loop over user requests and may exceed block gas limits for large pools. The batch size parameters allow splitting these steps across multiple transactions.
Source Code
The Kasu smart contracts source code is available at github.com/Kasu-Finance.
Last updated