# sellBond

### Requirements

The following conditions must be met to sell a KUMA NFT to the contract:

* The contract must be unpaused
* The maximum amount of unique coupons in reserve must not have be reached
* The sold bond risk category must match the `KUMASwap` risk category
* The sold bond must not have reached maturity
* The sold bond coupon must greater or equal to the current `RateFeed` rate.

<figure><img src="https://3605577161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkKQ5DiyLafcK3PW7fgAp%2Fuploads%2Ff9Xh6c6VEkiEoZHV1x1d%2FsellBondRequirements.svg?alt=media&#x26;token=a89349ca-986f-48f1-a7a9-99e33a3b73a4" alt=""><figcaption></figcaption></figure>

### Minted KIBT Calculation

The amount of minted `KIBToken` to the seller is calculated as follow :

$$bondValue = bond.principal \* (bond.coupon^{elapsedTime})$$

$$fee = (bondValue \* variableFee) + fixedFee$$

$$mintedAmount = bondValue - fee$$
