👩‍💻
Builder Portal
  • Sovryn Builder Portal
    • Contribution
  • Design System
    • Design principles
    • Structure
    • Usage by Sovryn
  • UI Library
    • Overview
    • Getting Started
    • Atoms
      • Accordion
      • Badge
      • HealthBar
      • Button
      • DynamicValue
      • Heading
      • ErrorBadge
      • Icon
      • Input
      • Lottie
      • Paragraph
      • Toggle
      • Link
      • Checkbox
    • Molecules
      • AmountInput
      • ContextLink
      • Dialog
      • Dropdown
      • ErrorList
      • Footer
      • FormGroup
      • Header
      • HelperButton
      • Menu
      • NavMenuItem
      • Notification
      • Overlay
      • Pagination
      • RadioButton
      • RadioButtonGroup
      • Select
      • SimpleTable
      • StatusItem
      • Table
      • TableBase
      • Tabs
      • Tooltip
      • TransactionId
      • VerticalTabs
      • VerticalTabsMobile
      • WalletContainer
      • WalletIdentity
    • Working with Components
    • Links
    • Contribution
  • Sovryn SDK
    • Smart Router
      • Creating a New Swap Route
      • Available routes
        • AMM
        • MoC integration
        • MYNT bAsset
        • MYNT fixed rate
    • Sovryn Onboard
      • Installation
      • Usage
      • Custom Connectors
      • Custom UI
      • Contribution
    • The Graph
      • Overview
      • Usage
      • Sovryn Subgraphs
      • Advanced Usage
  • sovryn.app
    • Overview
    • Sovryn UI Library Usage
    • The Graph Usage
    • Links
    • Contribution
    • Dapp specific components
      • MaxButton
  • Smart Contracts
    • Overview
    • AMM
      • Liquidity
        • V1 Converters
        • V2 Converters
      • Conversion
      • Wrapper
        • V1 liquidity
        • V2 liquidity
        • Swaps
    • Sovryn Protocol
      • Lending
        • Mint
        • Burn
      • Borrowing
        • Borrow
        • Repay
      • Margin Trading
        • Open
        • Close
      • Collateral Management
    • Liquidity Mining
      • Deposit
      • Withdraw
      • Rewards
    • FastBTC
      • RSK->BTC
    • Bitocracy
      • Staking
      • Governor
      • Fee Sharing
      • Vesting
    • Zero
      • Borrower operations
      • Trove Manager
      • Satability Pool
      • Rewards
    • Mynt & DLLR
      • Basset to Masset Conversion
      • Masset to Basset Conversion
      • MOC Integration Conversion
Powered by GitBook
On this page
  • Burn to ERC20
  • Burn to RBTC
  1. Smart Contracts
  2. Sovryn Protocol
  3. Lending

Burn

Users may burn their iTokens to retrieve the underlying assets. One cannot withdraw more assets than are currently available in the pool.

Burn to ERC20

Call burn to withdraw the underlying assets from the lending pool. If the iTokens reside on the Liquidity Mining Contract, they can be retrieved in the same transaction.

function burn(address receiver, uint256 burnAmount, bool useLM) external nonpayable nonReentrant globallyNonReentrant 
returns(uint256 redeemed)

Arguments

Name
Type
Description

receiver

address

the receiver of the underlying tokens. note: potential LM rewards are always sent to the msg.sender

burnAmount

uint256

the amount of pool tokens to redeem.

useLM

bool

if true -> retrieve the pool tokens into the Liquidity Mining contract

Returns

The amount of tokens redeemed.

Burn to RBTC

function burnToBTC(address receiver, uint256 burnAmount, bool useLM) external nonpayable nonReentrant globallyNonReentrant 
returns(uint256 loanAmountPaid)

Arguments

Name
Type
Description

receiver

address

the receiver of the underlying tokens. note: potential LM rewards are always sent to the msg.sender

burnAmount

uint256

the amount of pool tokens to redeem.

useLM

bool

if true -> retrieve the pool tokens into the Liquidity Mining contract

PreviousMintNextBorrowing

Last updated 1 year ago