IBondController
IBondController
Controller for a ButtonTranche bond system
collateralToken() → address (external)
tranches(uint256 i) → contract ITranche token, uint256 ratio (external)
trancheCount() → uint256 count (external)
feeBps() → uint256 fee (external)
maturityDate() → uint256 maturityDate (external)
isMature() → bool isMature (external)
creationDate() → uint256 creationDate (external)
totalDebt() → uint256 totalDebt (external)
deposit(uint256 amount) (external)
Deposit amount tokens from msg.sender, get tranche tokens in return
Requirements:
msg.sendermust haveapprovedamountcollateral tokens to this contract
mature() (external)
Matures the bond. Disables deposits, fixes the redemption ratio, and distributes collateral to redemption pools Redeems any fees collected from deposits, sending redeemed funds to the contract owner Requirements:
- The bond is not already mature
- One of:
msg.senderis ownermaturityDatehas passed
redeemMature(address tranche, uint256 amount) (external)
Redeems some tranche tokens Requirements:
- The bond is mature
msg.senderowns at leastamounttranche tokens from addresstranchetranchemust be a valid tranche token on this bond
redeem(uint256[] amounts) (external)
Redeems a slice of tranche tokens from all tranches. Returns collateral to the user proportionally to the amount of debt they are removing Requirements
- The bond is not mature
- The number of
amountsis the same as the number of tranches - The
amountsare in equivalent ratio to the tranche order
setFee(uint256 newFeeBps) (external)
Updates the fee taken on deposit to the given new fee
Requirements
msg.senderhas admin rolenewFeeBpsis in range [0, 50]