Emitted when a user mints or deposits an asset into the protocol. The asset starts earning interest at the current supply rate. In return, the user is given kTokens, calculated by dividing the supplied tokens by the current Exchange Rate.
Emitted when a user exchange kTokens for the underlying asset based on the current Exchange Rate. The received asset amount is determined by multiplying the kTokens redeemed by the Exchange Rate. The redemption must not exceed the user's Account Liquidity or the market's available liquidity.
The redeem underlying function enables users to exchange kTokens for a specified amount of the underlying asset based on the current Exchange Rate. The kTokens redeemed are determined by dividing the received asset amount by the Exchange Rate. The redemption must not exceed the user's Account Liquidity or the market's available liquidity.
Emitted when a user obtains an asset from the protocol, creating a balance that accrues interest at the borrow rate. The borrowed amount must not exceed the user's account liquidity or the market's available liquidity. To borrow Matic, the borrower must meet the 'payable' requirement in Solidity.
Emitted when a user has negative account liquidity, they can be liquidated by other users to restore positive liquidity. Liquidators repay part or all of the borrower's debt and receive discounted collateral as a liquidation incentive. Liquidators can close a fixed percentage of the outstanding borrow and they must interact with each kToken contract to repay and seize collateral. Upon seizing collateral, liquidators receive kTokens, which can be redeemed like supplied assets. Liquidators must approve each kToken contract before initiating liquidation.