-
Notifications
You must be signed in to change notification settings - Fork 8
PegStabilityModuleYield
senamakel edited this page Nov 27, 2024
·
2 revisions
function initialize(address _zai, address _collateral, address _governance, uint256 _supplyCap, uint256 _debtCap, uint256 _mintFeeBps, uint256 _redeemFeeBps, address _feeDestination) externalfunction rate() public view returns (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.
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | The asset value per share in 18 decimal precision. |
function feesCollected() public view returns (uint256 yield)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.