The Fixed Expiry Teller is an implementation of the Base Teller contract specific to handling user bond transactions and tokenizing bond markets where all purchases vest at the same timestamp as ERC20 tokens. It implements the functions required by the Fixed-Expiry Teller Interface.
Specifically, it implements the _handlePayout
function to mint ERC20 tokens to the user to represent their bond position during a purchase.
Additionally, it implements the deploy
(deploys new ERC20 token contract if one does not exist for a combination of underlying token and the maturity date), create
(allows anyone to mint Bond Tokens for a combination of an underlying token and maturity date by paying a fee to the protocol), and redeem
(redeems ERC20 Bond Tokens that have vested for the underlying token).
By design, the tokenization of the Teller is not permissioned. This allows other participants to use the same ERC20 Bond Tokens that Bond Protocol is issuing to create a standard in the market and drive additional liquidity.
This section only includes methods not inherited from Base Teller.
ERC20BondToken reference implementation (deployed on creation to clone from)
Name | Type | Description |
---|---|---|
ERC20 bond tokens (unique to a underlying and expiry)
Deposit an ERC20 token and mint a future-dated ERC20 bond token
Deploy a new ERC20 bond token for an (underlying, expiry) pair and return its address
ERC20 used for fixed-expiryIf a bond token exists for the (underlying, expiry) pair, it returns that address
Get the OlympusERC20BondToken contract corresponding to a market
Redeem a fixed-expiry bond token for the underlying token (bond token must have matured)
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
reference
contract ERC20BondToken
reference address that each ERC20 bond token proxies to (using a Clone architecture)
underlying
contract ERC20
Address of the underlying ERC20 token
expiry
uint48
Expiry of the bond token
bondToken
contract ERC20BondToken
Address of the ERC20 bond token
underlying_
contract ERC20
ERC20 token redeemable when the bond token vests
expiry_
uint48
Timestamp at which the bond token can be redeemed for the underlying token
amount_
uint256
Amount of underlying tokens to deposit
bondToken
contract ERC20BondToken
Address of the ERC20 bond token received
amountOut
uint256
Amount of the ERC20 bond token received
underlying_
contract ERC20
ERC20 token redeemable when the bond token vests
expiry_
uint48
Timestamp at which the bond token can be redeemed for the underlying token
bondToken
contract ERC20BondToken
Address of the ERC20 bond token being created
id_
uint256
ID of the market
bondToken
contract ERC20BondToken
ERC20BondToken contract address
token_
contract ERC20BondToken
Token to redeem
amount_
uint256
Amount to redeem
bondToken
contract ERC20BondToken
Address of the bond token
underlying indexed
contract ERC20
Address of the underlying ERC20 token
expiry indexed
uint48
Timestamp when the bond token can be redeemed for the underlying token