Buttonwood
  • Buttonwood Basics
    • Introduction to Buttonwood
    • First Principles
    • FAQ
    • DeFi for Beginners
  • Learn
    • Glossary
    • Elastic Supply Assets
      • ButtonToken
      • UnbuttonToken
    • Tranche
      • Deposit Flow
      • Redemption Flow
    • ButtonZero
      • System Design
      • Lending
      • Borrowing
    • ButtonAuctions
    • ButtonSwap
      • Core Concepts
      • Pool Interactions
  • User Guides
    • ButtonSwap User Guide
      • Create a Pool
      • Swap
      • Add Liquidity
      • Remove Liquidity
    • ButtonZero User Guide
      • Primer
      • Borrow (Sell & Ask)
      • Lend (Buy & Bid)
      • Redemption
    • ButtonAuctions User Guide
      • Join an Auction
        • Redemptions
      • Create an Auction
      • Settle an Auction
      • Note on Rebasing Assets
    • Provide Liquidity on Uniswap
    • Mint Tranches
      • Mint Tranches via Contract
        • Minting AMPL Tranches
        • Minting ETH Tranches
        • Minting WBTC Tranches
        • Bond List
  • Developers
    • Deployed Contracts
      • Ethereum Mainnet
      • Görli Testnet
      • Kovan Testnet
      • Avalanche C-Chain
      • Base Mainnet
      • Arbitrum
      • Optimism
    • Tranche
      • Tranche
      • TrancheFactory
      • Bond
      • BondFactory
      • UniV3LoanRouter
    • Button Wrappers
      • ButtonToken
      • UnbuttonToken
      • ButtonTokenFactory
      • UnbuttonTokenFactory
    • Audits
    • Bug Bounty
  • Additional Resources
    • Apps
    • Github
    • Discord
    • Twitter
    • Website
    • ButtonZero
    • Zero Whitepaper
Powered by GitBook
On this page
  • API Documentation
  • constructor() (public)
  • init(string name, string symbol, address admin, address _collateralToken) (public)
  • mint(address to, uint256 amount) (external)
  • burn(address from, uint256 amount) (external)
  • redeem(address from, address to, uint256 amount) (external)
  • decimals() → uint8 (public)

Was this helpful?

  1. Developers
  2. Tranche

Tranche

ERC20 token to represent a single tranche for a ButtonTranche bond

API Documentation

constructor() (public)

Constructor for Tranche ERC20 token

init(string name, string symbol, address admin, address _collateralToken) (public)

Constructor for Tranche ERC20 token

mint(address to, uint256 amount) (external)

Mint amount tokens to to Only callable by the owner (bond controller). Used to manage bonds, specifically creating tokens upon deposit

burn(address from, uint256 amount) (external)

Burn amount tokens from from's balance Only callable by the owner (bond controller). Used to manage bonds, specifically burning tokens upon redemption

redeem(address from, address to, uint256 amount) (external)

Burn amount tokens from from and return the proportional value of the collateral token to to

decimals() → uint8 (public)

Returns the number of decimals used to get its user representation. For example, if decimals equals 2, a balance of 505 tokens should be displayed to a user as 5,05 (505 / 10 ** 2).

Uses the same number of decimals as the collateral token

NOTE: This information is only used for display purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.

PreviousTrancheNextTrancheFactory

Last updated 3 years ago

Was this helpful?