Under Review


Contract purpose

This smart contract manages the bonds issued by a company. Depending on the set rate, the buyer will receive, after the bond matures, the face value along with the amount accumulated yearly from the interest.

Contract parameters

issuePrice: price of bond at issue time

maturityTime : the number of years until maturity

faceValue: the amount the buyer receives when the bond reaches maturity

couponRate: the annual rate the buyer receives at the end

Exposed methods and variables

issuer address of the bond issues

bondIDs list of unique identifiers of the bonds

addBond called by the issuer when he wants to add bonds to the list, the bonds can be added in batches of no more than 200.

parameter nametypedetails
bondIDinteger arraylist of unique IDs for the bonds

buyBond payable function called by anyone who wants to buy a bond and emits the bondBought event

parameter nametypedetails
_bondIDintegerthe id of the bond the buyer wants to purchase

isMature called by a buyer who wants to check if his bond is mature and, if so, it emits the matureBond event

parameter nametypedetails
_bondIDintegerthe id of the checked bond

payLender allows the issuer to send to the contract the amount which will be transferred to the buyer's account if the bond is mature and emits bondPaid event

parameter nametypedetails
_bondIDintegerthe id of the matured bond



parameter nametypedetails
idintegerbought bond id


parameter nametypedetails
idintegermature bond id


parameter nametypedetails
idintegerpaid bond id
Reviewed by Modex

Copyright © Modex Marketplace