Replies: 1 comment
-
hashedMae verdict:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
Dutch Auction most appropriate for selling protocol tokens.
Maturation is linear, doesn’t appear to have an option for a cliff.
Would be possible to sell credits at a discount, easiest to do for other stable coins, possible to do for LP tokens but trickier.
Uses Solbase libraries
auth/Owned
tokens/ERC20
utils/Clone
utils/SelfPermit
utils/SafeCastLib
utils/SafeTransferLib
utils/FixedPointMathLib
utils/SafeMulticallable
utils/LibClone
Library Contracts
auth/Owned
Simple authorisation contract, only allows for owner role and for one address to be authorised at a time. Emits a OwnershipTransferred event at deployment and on a new address being authorised.
tokens/ERC20
Standard ERC20 contract, may of been more appropriate to have used an interface
utils/Clone
Helper/reader contract for clones (minimal proxy contracts) that contain immutable args.
Can read immutable args for types:
bytes (variable length)
address
uint256
uint256[] (variable length)
uint64
utils/SelfPermit
Signature permit helper for any EIP-2612/Dai-style token. For use in a multicall to allow EOAs to approve a contract and call a function in a single transaction.
utils/SafeCastLib
Library for casting uint256 to smaller units that reverts on overflow
utils/SafeTranferLib
Library for transfers of ETH and ERC20 tokens. Handles ERC20 contracts that don’t return any values on successful transfer and throws error if revert
utils/FixedPointMathLib
Math library with functionality specifically for WAD values
utils/SafeMultiCallable
Allows for a single call to call multiple methods on itself
utils/LibClone
Used to deploy minimal proxy contracts aka clones
Primary Contracts
TinyBondsFactory
Uses LibClone to deploy clones of TinyBonds with immutable args. Can use multicall to create multiple markets in a single call.
Immutable args are:
bytes32 salt
address outputToken
address inputToken
uint256 term
TinyBonds
Used for creating simple bond markets. Is pausable.
Allows for setting of max output tokens, tracks separately how many are already owed in bonds vs reserves.
Allows for partial redemption of bonds that haven’t fully matured.
Allows for msg.sender to transfer one of their bonds to another address, allows for transferring bond ownership to 0x0.
Allows for owner to update Pricing variables one at a time or multiple in a single call.
Using
SafeTransferLib for address
FixedPointMathLib for uint256
SafeCastLib for uint256 and uint128 and uint64
Beta Was this translation helpful? Give feedback.
All reactions