Skip to main content

IBondFixedExpiryTeller

Git Source

Inherits: IBondTeller

Functions

getBondTokenForMarket

Get the OlympusERC20BondToken contract corresponding to a market

function getBondTokenForMarket(uint256 id_) external view returns (ERC20);

Parameters

NameTypeDescription
id_uint256ID of the market

Returns

NameTypeDescription
<none>ERC20ERC20BondToken contract address

deploy

Deploy a new ERC20 bond token for an (underlying, expiry) pair and return its address

ERC20 used for fixed-expiry

If a bond token exists for the (underlying, expiry) pair, it returns that address

function deploy(ERC20 underlying_, uint48 expiry_) external returns (ERC20);

Parameters

NameTypeDescription
underlying_ERC20ERC20 token redeemable when the bond token vests
expiry_uint48Timestamp at which the bond token can be redeemed for the underlying token

Returns

NameTypeDescription
<none>ERC20Address of the ERC20 bond token being created

create

Deposit an ERC20 token and mint a future-dated ERC20 bond token

function create(ERC20 underlying_, uint48 expiry_, uint256 amount_) external returns (ERC20, uint256);

Parameters

NameTypeDescription
underlying_ERC20ERC20 token redeemable when the bond token vests
expiry_uint48Timestamp at which the bond token can be redeemed for the underlying token
amount_uint256Amount of underlying tokens to deposit

Returns

NameTypeDescription
<none>ERC20Address of the ERC20 bond token received
<none>uint256Amount of the ERC20 bond token received