MSD Token is the synthetic asset in the dForce Lending & Synthetic system. It conforms to the ERC-20 standard and has a Mint interface with permissions. Only MsdController has permission to call mint function. Users can mint MSD Token when the certain collateral ratio is satisfied.
Minting MSD Token from the system has similar behavior to borrowing, and repay borrow means burn the MSD Token. When the collateral rate is lower than the requirement, the MSD loan can be liquidated. The liquidation of MSD is consistent with the liquidation of the loan.
All standard EIP20 methods are implemented, such as
Allows a user to permit another account (or contract) to use their funds using a signed message. This enables gas-less transactions and single approval/transfer transactions.
function mint(address to, uint256 amount) external onlyMinter
Mint MSD token with limited authority, only MSD Controller has authority to mint, account who has enough collateral can call borrow from iMsdToken to mint MSD.
function burn(address from, uint256 amount) external;
iMSDToken inherits most functions of iToken, explores interfaces to interact with protocol to mint or burn MsdTokens. Borrowing from iMsdToken results in minting MsdToken under collaterals, and repaying from iMsdToken results in burning MsdToken, no Mint & Redeem function needed.
Users call Borrow function to mint MSD token if the certain collateral ratio is satisfied.
function borrow(uint256 _borrowAmount) external;
Users call RepayBorrow function to burn MSD token, this will repay the outstanding loan of user.
function repayBorrow(uint256 _repayAmount) external;
Repay a loan on behalf of borrower.
function repayBorrowBehalf(address _borrower, uint256 _repayAmount) external;
Repay a loan on behalf of the borrower and seize the same value of iToken plus incentive as a reward.