D/Labs Docs
Search
⌃K

ERC-3475 Convertible

Convertible bonds are those bonds issued with the option that gives the bondholder or the issuer the right but not the obligation to convert the bond into common stock of the issuing entity.

Creating a convertible ERC3475 contract

Bondholders may chose to convert their bonds in case of a sustained uptrend in the underlying stock price of the issuing entity. The basic ERC-3475 contract does not include the convertible option, however this basic contract can be used to create a Convertible ERC-3475 contract that implements the logic for converting bonds. The Convertible ERC-3475 contract must inherit the basic ERC-3475 in order to inherits all methods and properties of the abstract storage bonds standard EIP-3475.
// SPDX-License-Identifier: CC0-1.0
​
pragma solidity ^0.8.0;
​
import "./ERC3475.sol";
​
contract ERC3475Convertible is ERC3475, IERC3475Convertible {
/**
* add the `convert` function that implements the logic for putting bonds
*
* function convert(Transaction[] calldata _transactions)
*/
}

Bonds class meta-datas

In addition to the four bonds meta-datas stored in the basic ERC-3475, new meta-datas describing the convert option must be stored in the class meta-datas. In the following example the sixth meta-data has been added and set to a boolean value that stores the value true that tells that bonds are convertible. Also, a new metadata that stores the conversion price of bonds to equity is stored.
classMetadatas = [
{stringValue: "", uintValue: couponRate, addressValue: address(0), boolValue: false},
{stringValue: "", uintValue: couponFrequency, addressValue: address(0), boolValue: false},
{stringValue: "", uintValue: 0, addressValue: currencyAddress, boolValue: false},
{stringValue: "", uintValue: bondDuration, addressValue: address(0), boolValue: false},
{stringValue: "", uintValue: bondDenomination, addressValue: address(0), boolValue: false},
{stringValue: "", uintValue: 0, addressValue: address(0), boolValue: true},
{stringValue: "", uintValue: conversionPrice, addressValue: address(0), boolValue: false},
];