Treasury.sol
Deployed at [0xcontract_address]
on the Ethereum mainnet, [other_testnets] testnets.
This contract is yet to be deployed.
event RedeemedBonds(address indexed from, uint256 amount);
Emitted when Basis Bonds are redeemed via redeemBonds
.
event BoughtBonds(address indexed from, uint256 amount);
Emitted when Basis Bonds are bought via buyBonds
.
event TreasuryFunded(uint256 timestamp, uint256 seigniorage);
Emitted when new Basis Cash is minted to the Treasury via allocateSeigniorage
.
event BoardroomFunded(uint256 timestamp, uint256 seigniorage);
Emitted when new Basis Cash is minted to the Boardroom via allocateSeigniorage
.
modifier allocationTimeRipe
Checks whether a day has passed since the last successful execution of allocateSeigniorage
.
function getCashPrice() internal returns (uint cashPrice)
Returns the oracle price of Basis Cash denominated in DAI.
function buyBonds(uint256 amount) external
Mints amount / bondPrice
Basis Bonds, in exchange for amount
Basis Cash burnt.
amount
is the amount of Basis Cash used in the purchase.
Emits BoughtBonds
.
function redeemBonds(uint256 amount) external
If the Basis Cash price is above 1 DAI, mints amount
Basis Cash, in exchange for amount
Basis Bonds burnt.
amount
is the number of Basis Bonds to redeem.
Emits RedeemedBonds
.
function allocateSeigniorage() external allocationTimeRipe
If the oracle price of Basis Cash is above (1+ε) DAI, mints ((BAC Oracle Price) - 1) * cashSupply
number of Basis Cash to either the Boardroom contract or the Treasury contract.
If the Treasury's balance is below 1,000 BAC, seigniorage is given to the Treasury. Emits TreasuryFunded
.
If the Treasury's balance is above 1,000 BAC, seigniorage is given to the Boardroom. Emits BoardroomFunded
.