The Base Teller implements standard functionality shared by both types of Bond Tellers, including the core purchase logic, fee handling, and helper functions for generating token names for bond positions.
Logic for handling payouts and tokenizing bond positions is left to contract implementations.
Claim fees accrued for input tokens and sends to protocolMust be guardian
Name | Type | Description |
---|---|---|
'Create' function fee discount. Amount standard fee is reduced by for partners who just want to use the 'create' function to issue bond tokens. Configurable by policy.
Name | Type | Description |
---|---|---|
Get current fee charged by the teller based on the combined protocol and referrer fee
Fee paid to protocol. Configurable by policy, must be greater than 30 bps.
Exchange quote tokens for a bond in a specified market
Fee paid to a front end operator. Set by the referrer, must be less than or equal to 5e4.
There are some situations where the fees may round down to zero if quantity of baseToken is < 1e5 wei (can happen with big price differences on small decimal tokens). This is purely a theoretical edge case, as the bond amount would not be practical.
Fees earned by an address, by token
Set protocol feeMust be guardian
Set your fee as a referrer to the protocolFee is set for sending address
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 |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
tokens_
contract ERC20[]
Array of tokens to claim fees for
to_
address
Address to send fees to
feeDiscount
uint48
Discount from base protocol purchase fee when creating bond tokens for external use
referrer_
address
Address of the referrer
fee
uint48
Fee in basis points (3 decimal places)
protocolFee
uint48
undefined
recipient_
address
Address of recipient of bond. Allows deposits for other addresses
referrer_
address
Address of referrer who will receive referral fee. For frontends to fill. Direct calls can use the zero address for no referrer fee.
id_
uint256
ID of the Market the bond is being purchased from
amount_
uint256
Amount to deposit in exchange for bond
minAmountOut_
uint256
Minimum acceptable amount of bond to receive. Prevents frontrunning
payout
uint256
Amount of payout token to be received from the bond
expiry
uint48
Timestamp at which the bond token can be redeemed for the underlying token
referrer
address
undefined
fee
uint48
undefined
referrer
address
undefined
token
contract ERC20
undefined
feeBalance
uint256
undefined
fee_
uint48
Protocol fee in basis points (3 decimal places)
fee_
uint48
Referrer fee in basis points (3 decimal places)
id indexed
uint256
Market ID
referrer indexed
address
Referrer address
amount
uint256
Amount of quote tokens in
payout
uint256
Amount of payout tokens out
underlying
contract ERC20
undefined
expiry
uint48
undefined
maturesOn
uint48
undefined