Skip to content

PegStabilityModule

senamakel edited this page Nov 25, 2024 · 6 revisions

Solidity API

PegStabilityModule

Used to mint ZAI with collateral at a pre-defined rate

https://docs.maha.xyz/mechanics/peg-mechanics/peg-stablility-module-psm

initialize

function initialize(address _zai, address _collateral, address _governance, uint256 _newRate, uint256 _supplyCap, uint256 _debtCap, uint256 _mintFeeBps, uint256 _redeemFeeBps, address _feeDestination) external

updateRate

function updateRate(uint256 _newRate) external

rate

function rate() public view returns (uint256)

_updateRate

function _updateRate(uint256 rate_) internal

Updates the rate of ZAI/Collateral

Parameters

Name Type Description
rate_ uint256 the new rate of ZAI/Collateral

feesCollected

function feesCollected() public pure returns (uint256)

How much fees has been collected by the protocol

Return Values

Name Type Description
[0] uint256

Clone this wiki locally