Market Contract Execute
Execute a market contract interaction.
Lend
(Cw20HookMsg::Lend
) can be called with coins attached to lend the attached amount and earn lending annual percentage yield (APY).
When lending out an asset, the lender receives cw20 tokens, called the "receipt tokens". Lent assets are redeemed by sending the receipt tokens back to the market contract with Cw20HookMsg::Redeem
message attached.
DepositCollateral
(Cw20HookMsg::DepositCollateral
) can be called with coins attached to deposit the amount as collateral to an account to then be able to borrow against the deposited collateral.
WithdrawCollateral
can be called to withdraw the deposited collateral.
Borrow
can be called to borrow assets against the deposited collateral.
Return
(Cw20HookMsg::Return
) can be called to return the borrowed assets plus accumulated interest.
Liquidate
can be called to liquidate an account with an account_health
below 1.0. Account health is calculated as account_health = total_scaled_collateral_value / total_debt_value
. A liquidation allows the liquidator to receive a reward.
Note: some of the actions available for coins (native to Cosmos chains), can also be performed with cw20 tokens by sending tokens to the market with an attached Cw20HookMsg
.
Execute Messages
Where, LiquidationOperation
is defined below in this Common Data Type.