LogoLogo
  • Overview
    • Introduction
    • Proof-of-Stake Blockchains
    • Liquid Staking
  • Monad Blockchain
    • Liquid Staking on Monad
  • The Kintsu Protocol
    • How It Works
    • Staking and Unstaking with Kintsu
    • Earning Yield
    • Definitions
    • Architecture & Integration
      • Staking and Un-staking Mechanisms
      • StakedMonad Contract
      • 3rd Party Integration Guide
      • Contract Interface & Functions
      • Community Actions
    • Official Contract Addresses
  • Community
    • Community & Social Media
  • Development Team
    • Our Philosophy
    • Why We Build
  • Resources
    • Bug Reports
    • Feature Requests
    • Support
Powered by GitBook
LogoLogo
On this page
  1. The Kintsu Protocol
  2. Architecture & Integration

Contract Interface & Functions

Details on select functions, along with the full StakedMonad contract interface.

Condensed StakedMonad Contract Interface

The full interface can be found in our published package. This condensed interface contains the most important functions for integrating with the Kintsu core protocol.

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.26;

interface IStakedMonad {
    struct UnlockRequest {
        uint96 shares;
        uint40 batchId;
    }

    struct UnlockRequestBatch {
        uint96 shares;
        uint96 spotValue;
        uint40 submissionTime;
    }

    /// @notice Converts MON into LST shares at the current block timestamp
    /// @dev `totalShares()` accounts for both minted and mintable shares
    function convertToShares(uint96 assets) external view returns (uint96 shares);

    /// @notice Converts LST shares into MON at the current block timestamp
    /// @dev `totalShares()` accounts for both minted and mintable shares
    function convertToAssets(uint96 shares) external view returns (uint96 assets);

    function getBatchUnlockIdAtTime(uint256 timestamp) external view returns (uint40 batchId);

    /// @notice Deposit MON into the protocol and receive LST shares to represent your position
    /// @notice MON must be greater than minimum stake
    /// @dev Deposit amount must be specified by `msg.value`
    /// @dev First param `assets` satisfies ERC7535/ERC4626
    /// @param receiver - Recipient of the minted shares
    /// @return shares - Quantity of shares minted
    function deposit(uint96, address receiver) external payable returns (uint96 shares);

    function previewDeposit(uint96 assets) external view returns (uint96 shares);

    /// @notice Mint LST shares to represent your position of MON deposited into the protocol
    /// @notice MON must be greater than minimum stake
    /// @dev Deposit amount must be specified by `msg.value`
    /// @param shares - Number of shares desired
    /// @param receiver - Recipient of the minted shares
    /// @return assets - MON deposited
    function mint(uint96 shares, address receiver) external payable returns (uint96 assets);

    function previewMint(uint96 shares) external view returns (uint96 assets);

    /// @notice Step 1 of 2 in process of withdrawing staked MON
    /// @notice Transfers LST specified in `shares` argument to the vault contract
    /// @notice Unlock is batched into current batch request
    function requestUnlock(uint96 shares) external;

    /// @notice Allow user to cancel their unlock request
    /// @notice Most users will have 1 concurrent unlock request (`unlockIndex` == 0) but advanced users may have more
    /// @notice Must be done in the same batch interval in which the request was originally sent
    /// @dev Order of unlock requests is not guaranteed between cancellations
    function cancelUnlockRequest(uint256 unlockIndex) external;

    /// @notice Step 2 of 2 in process of withdrawing staked MON
    /// @notice Returns original deposit amount plus interest to depositor address
    /// @notice Transfers MON to caller
    /// @notice Associated batch unlock request must have been completed
    /// @dev Deletes the caller's unlock request
    function redeem(uint256 unlockIndex, address payable receiver) external returns (uint96 assets);

    /// @notice Compound earned rewards for all validators
    /// @dev Can be called by anyone
    function compound() external;

    /// @notice Trigger unlock requests of previous batched requests
    /// @notice Distributes unlock requests to nominators according to current stake imbalances
    /// @notice Calculates a batch spot values for LST in the batches
    /// @notice Burns associated LST
    /// @dev Batch IDs must be specified in ascending order (for gas efficient duplicate check)
    /// @dev Cannot be called for a batch that has not concluded
    /// @dev Cannot be called for a batch that has already been redeemed
    function sendBatchUnlockRequests(uint40[] calldata batchIds) external;

    /// @notice Attempts to claim unbonded MON from all nodes
    function withdrawUnbonded() external;

    /// @notice Shares that could exist at the current block timestamp
    /// @notice Includes both minted and mintable shares
    function totalShares() external view returns (uint96);

    /// @notice Shares that could be minted by the protocol at the current block timestamp
    function mintableProtocolShares() external view returns (uint96 shares);

    function getAllUserUnlockRequests(address user) external view returns (UnlockRequest[] memory);
}
Previous3rd Party Integration GuideNextCommunity Actions

Last updated 1 day ago