Treasury
Last updated
Last updated
As of April 2023, those contracts have not been deployed, and there is no front-end for this module.
Module Name: Treasury Module
Contract Sources:
Oracles
This module is a custom creation made of two smart contracts: The first one, the Kolektivo Treasury, holds the natural capital assets (or their indexes) and creates the Kolektivo Treasury Token (KTT) which directly represents the treasuryβs value. KTT is a rebase token, influenced by Ampleforth. Through its elastic supply and the rebasing mechanics, the aim is to keep the token value close to a certain ratio. The treasury is comprised of the various LP index tokens as well as other currencies.
The Treasury Module has 2 core components consisting of the Treasury.sol
, and ElasticReceiptToken.sol
contracts.
The Treasury.sol
contract allows to:
Hold multiple tokens: ERC20, Index/Liquidity Tokens from Balancer, Stable Coins such as cUSD or cEUR, ERC721, and GeoNFTs.
Withdraw certain tokens up to a certain amount (limited to certain addresses and revokable). For example: A mapping of address => address
=> uint256
, where we can define βAddress X can withdraw Token Y up to a limit of 123β.
Send treasury assets to arbitrary addresses. For example, the Treasury has stables and wants to fund a Kolektivo community economy.
Sell and buy assets (bond and redeem) by minting/burning the Kolektivo Treasury Token (KTT). This implies that the treasury allows to:
List certain tokens as bondable/redeemable
List certain tokens to be unbonded/unredeemed
Dynamically set the price of the bonds based on the value of assets to un-/bond. Note that the pricing should depend on the average value for some time to prevent flash loan attacks.
Perform negative and positive rebases
Modify the rebase impact by applying a damping factor to the supply delta (e.g. 1/5)
What are supply delta and dampening factor?
The supply delta is the input of the rebasing function (i.e. by how much the rebase should be). A dampening factor decreases the supply delta parameter to stretch the rebasing out over multiple epoches (soft) vs. doing it at once (hard).
Create an elastic supply token (KTT).
Modify the deviation threshold defining supply boundaries in which no rebase should occur (e.g. 5%)
The Treasury Token is a vanilla ERC-20 token backed by the Treasury's assets. It is called the Kolektivo Treasury Token (KTT), and it is an elastic / rebasing token, which means that 1 KTT is always worth 1$ worth of treasury assets. The KTT contract is inspired by the well-tested Ampleforth. Here are some of the token's characteristics:
The maximum supply is one billion.
Each rebase happens at an epoch.
Each time someone interacts with a token, e.g. token transfer, rebase is triggered a rebase.
Rebase can also be called manually.
Please note that this experimental MVP software is provided on an "as is" and "as available" basis. As this module is an first attempt, be aware that different failures may occur. We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
Code | Description |
---|---|
Code | Description |
---|---|
Treasury__ERC20IsNotBondable(address erc20)
Function is only callable for bondable erc20's
Treasury__ERC721IdIsNotBondable(address erc721, uint id)
Function is only callable for bondable erc721Id's
Treasury__ERC20IsNotRedeemable(address erc20)
Function is only callable for redeemable erc20's
Treasury__ERC721IdIsNotRedeemable(address erc721, uint id)
Function is only callable for redeemable erc721Id's
Treasury__ERC20IsNotRegistered(address erc20)
Function is only callable for registered erc20's
Treasury__ERC721IdIsNotRegistered(address erc721, uint id)
Function is only callable for registered erc721Id's
Treasury__StaleERC20PriceDeliveredByOracle(address erc20, address oracle)
Functionality is limited due to stale price delivered by oracle
Treasury__StaleERC721IdPriceDeliveredByOracle(address erc721, uint id, address oracle)
Functionality is limited due to stale price delivered by oracle
InvalidRecipient
Invalid token recipient
InvalidAmount
Invalid token amount
MaxSupplyReached
Maximum supply reached