Base Teller
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.
Methods
claimFees
Claim fees accrued for input tokens and sends to protocolMust be guardian
Parameters
createFeeDiscount
'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.
Returns
getFee
Get current fee charged by the teller based on the combined protocol and referrer fee
Parameters
Returns
protocolFee
Fee paid to protocol. Configurable by policy, must be greater than 30 bps.
Returns
purchase
Exchange quote tokens for a bond in a specified market
Parameters
Returns
referrerFees
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.
Parameters
Returns
rewards
Fees earned by an address, by token
Parameters
Returns
setProtocolFee
Set protocol feeMust be guardian
Parameters
setReferrerFee
Set your fee as a referrer to the protocolFee is set for sending address