You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
senamakel edited this page Nov 27, 2024
·
2 revisions
Solidity API
PegStabilityModuleYield
initialize
function initialize(address_zai, address_collateral, address_governance, uint256_supplyCap, uint256_debtCap, uint256_mintFeeBps, uint256_redeemFeeBps, address_feeDestination) external
rate
function rate() publicviewreturns (uint256)
Calculates the value of assets per share in the collateral pool.
Uses total assets and total supply from the collateral to compute the ratio.
Return Values
Name
Type
Description
[0]
uint256
The asset value per share in 18 decimal precision.
feesCollected
function feesCollected() publicviewreturns (uint256yield)
Transfers yield from the collateral to the fee distributor if yield exceeds debt.
Computes yield based on the collateral balance and transfers it to the fee distributor if
the current value of collateral exceeds the outstanding debt.
Uses safeTransfer to ensure secure transfer of assets.