Bail Bond

FINANCIALDOCUMENTS

Contract purpose

A bail bond is a written promise signed by a defendant and surety to ensure that a criminal defendant will appear in court at the scheduled time and date, as ordered by the court. The bail amount is set by the court. When someone is arrested for a crime, s/he is typically held in jail until the date s/he is meant to appear in court or until s/he is released on bail. Bail is set by a judge during a bail hearing, and is the amount of money that serves as insurance between the court and the person in jail. Since the bail can be set to unaffordable amounts, a defendant might seek the services of a surety bond company which is similar to a lender that only deals in payments required to get people out of jail. The bail bond company assigns a bail bond agent to post a bail bond for the defendant. The bail is paid by a surety (bail bond agent or bondsman), who usually collects a percentage of the amount of bail as a fee for services rendered. In order to pay the bail so that the defendant can be released while awaiting trial on criminal charges, the agent might require collateral in the form of valuable property, securities, or a statement of creditworthiness.

Exposed methods and variables

bondsman the ethereum address of the surety company representative, given as parameter at contract creation

defendant the ethereum address of the defendant, given as parameter at contract creation

courtRepresentative the ethereum address of the court representative, given as parameter at contract creation

serviceFee the amount the surety company will receive for its service

feePercentage the percentage from the bail amount based on which the service fee is calculated

bailAmount the total sum set as bail by the court

courtDate the date when the defendant has to show up in court (unix time)

collateralValue the total sum collected by the bondsman as collateral

present true if the defendant showed up in court at the designated date

setServiceFeePercentage allows the bondsman to set the fee percentage for his services

parameter nametypedetails
_feePercentageintegerthe percentage has to be lower than 20

setBailDetails payable function called by the bondsman to set the bail details and send to the contract the bail amount

parameter nametypedetails
_bailAmountintegerthe sum the court will receive if the defendant does not show up
_courtDateintegerthe date when the defendant has to show up
_collateralValueintegeramount of represented by collateral

payServiceFee payable function called by the defendant to send to the contract the service fee sum for the surety company

defendantNotPresent function called by the court representative in case the defendant did not come in court. If more than 12 hours have passed since the set court date, it sends the bail amount to the court representative account and the service fee to the bondsman

defendantPresent function called by the court representative when the defendant showd up during the right time. It gives a 12 hour window since the court date. It sends the bail and the service fee to the bondsman. He will keep the service fee and give back the collaterals he collected for covering the bail, if any

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract