// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC5095.sol"; import "./IJoin.sol"; import "./IOracle.sol"; interface IFYToken is IERC5095 { /// @dev Oracle for the savings rate. function oracle() view external returns (IOracle); /// @dev Source of redemption funds. function join() view external returns (IJoin); /// @dev Asset to be paid out on redemption. function underlying() view external returns (address); /// @dev Yield id of the asset to be paid out on redemption. function underlyingId() view external returns (bytes6); /// @dev Time at which redemptions are enabled. function maturity() view external returns (uint256); /// @dev Spot price (exchange rate) between the base and an interest accruing token at maturity, set to 2^256-1 before maturity function chiAtMaturity() view external returns (uint256); /// @dev Record price data at maturity function mature() external; /// @dev Mint fyToken providing an equal amount of underlying to the protocol function mintWithUnderlying(address to, uint256 amount) external; /// @dev Burn fyToken after maturity for an amount of underlying. function redeem(address to, uint256 amount) external returns (uint256); /// @dev Mint fyToken. /// This function can only be called by other Yield contracts, not users directly. /// @param to Wallet to mint the fyToken in. /// @param fyTokenAmount Amount of fyToken to mint. function mint(address to, uint256 fyTokenAmount) external; /// @dev Burn fyToken. /// This function can only be called by other Yield contracts, not users directly. /// @param from Wallet to burn the fyToken from. /// @param fyTokenAmount Amount of fyToken to burn. function burn(address from, uint256 fyTokenAmount) external; }