Canopy
  • About Canopy
    • What is Canopy?
  • Canopy's Four Layers
    • Application Layer
    • Rewards Layer
    • Strategy Layer
      • Single Sided Liquidity
      • Simple Lending Strategy
        • Echelon Simple Lend
        • MovePosition Lend
        • Layerbank Lend
      • Vault Rebalancing Strategies
        • Ascend Strategy
    • Protocol Layer
      • Echelon Integration
      • MovePosition Integration
      • Layerbank Integration
  • Audits
    • Audit Reports
  • Tutorials
    • Cornucopia Campaign
    • Depositing on Canopy
    • Withdrawing from Cornucopia and Earning Rewards
    • Withdrawing from Cornucopia
    • MoveDrop Stake to Earn Rewards
  • Operations
    • Terms of Service
    • Canopy Smart Contracts
    • Fee Structure
      • FAQ
Powered by GitBook
On this page
  • Overview
  • Public Functions
  • Lending Operations
  • Account Information
  1. Canopy's Four Layers
  2. Protocol Layer

MovePosition Integration

Overview

The moveposition_block::moveposition_block module contains the block implementation for MovePosition. Modules in the blocks package are modules that contain convenience functions that interface with an underlying protocol(e.g. echelon, moveposition, etc). These block functions are used by concrete strategy implementations to interact with an underlying protocol, instead of interacting with it directly.

Public Functions

Lending Operations

  • lend<CoinType>(account: &signer, packet: vector<u8>): Lends coins to the protocol using the provided packet data.

  • borrow<CoinType>(account: &signer, packet: vector<u8>): Borrows coins from the protocol using the provided packet data.

  • redeem<CoinType>(account: &signer, packet: vector<u8>): Redeems previously lent coins using the provided packet data.

  • repay<CoinType>(account: &signer, packet: vector<u8>): Repays borrowed coins using the provided packet data.

Account Information

  • get_collateral_balance<CoinType>(account: address): u64: Returns the collateral balance for a specific coin type in an account.

PreviousEchelon IntegrationNextLayerbank Integration

Last updated 2 months ago