Keom Protocol
  • Keom Protocol
  • About Keom
    • ⚙️Products
    • 🛡️Security
      • ✅Audits
      • 🦸‍♂️Security Approach
        • Continuous stress-testing
        • Asset due diligence
        • AMM slippage modelling
        • Toxic liquidation spirals
        • Security Partners
    • 🏛️Organisation
      • 🎮Legal Entity
      • 👾Community
  • How it works
    • Lending Pools
      • Pool Types
      • Supply
        • Supply Assets
        • kTokens
        • Interest
        • Rewards
      • Borrow
        • Borrow
        • Health Factor
        • Liquidation Probability
        • Liquidation
      • Withdraw & Repay
      • Interest rate model
  • 🔴INTERFACE TERMS OF USE
    • Terms of Use
    • Definitions
    • Restricted Jurisidictions
    • ⛔Prohibited Uses
    • You acknowledge and accept
      • About the Interface
      • About the Protocol
      • About Listed Assets
      • About Yield and Rewards
      • About the Association
    • You represent and warrant
      • About yourself
      • About your understanding
    • Regulations
    • Access Restrictions
    • Fees
    • Downtime
    • Shutdown
    • Indemnification Clause
    • Absence of warranties
    • Liability
    • Applicable Law and Jurisdiction
    • Risk Disclosure
      • ‼️Important Reminders
      • Technology Risk
        • Blockchains
          • General Blockchain Risk
          • L1 vs L2
            • Ethereum
            • Polygon PoS
            • Polygon zkEVM Beta
            • Polygon CDK
          • Testnet vs Mainnet
        • Bridges
        • Crypto Assets
        • Oracles
        • Wallets
      • Financial Risk
      • Regulatory Risk
      • Systemic Risk
  • Developers
    • Contract Addresses
      • Polygon PoS
      • Polygon zkEVM
      • Manta Pacific
      • Astar
      • X1-Testnet
    • Key Events
    • Exchange Rate
    • Dynamic Liquidation Parameters
    • Oracles
  • Support
    • FAQ
    • Video Tutorials
  • References
    • Social Media Links
    • Brand Materials
Powered by GitBook
On this page
  1. Developers

Key Events

This page describes the events Keom Protocol emits when core protocol functions are called

PreviousX1-TestnetNextExchange Rate

Last updated 1 year ago

Event
Underlying function
Description

Mint(address minter, uint mintAmount, uint mintTokens)

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 .

Redeem(address redeemer, uint redeemAmount, uint redeemTokens)

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 . The redemption must not exceed the user's Account Liquidity or the market's available liquidity.

Redeem(address redeemer, uint redeemAmount, uint redeemTokens)

The redeem underlying function enables users to exchange kTokens for a specified amount of the underlying asset based on the current . The kTokens redeemed are determined by dividing the received asset amount by the . The redemption must not exceed the user's Account Liquidity or the market's available liquidity.

Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows)

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.

RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows)

Emitted when a user transfers an asset into the protocol, reducing the user’s borrow balance.

RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows)

Emitted when users deposit an asset into the protocol, which reduces the target user's outstanding borrow balance.

LiquidateBorrow(address liquidator, address borrower, uint repayAmount, address kTokenCollateral, uint seizeTokens)

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.

function mint(uint mintAmount) 
returns (uint)
function redeem(uint redeemTokens) 
returns (uint)
function redeemUnderlying(uint redeemAmount) 
returns (uint)
function borrow(uint borrowAmount) 
returns (uint)
function repayBorrow(uint repayAmount) 
returns (uint)
function repayBorrowBehalf(address borrower, uint repayAmount) 
returns (uint)
function liquidateBorrow(address borrower, uint amount, address collateral) 
returns (uint)
Exchange Rate
Exchange Rate
Exchange Rate
Exchange Rate