Basis Cash
Search…
Treasury
The Treasury contract handles bond purchases and redemptions

Code

Treasury.sol
Deployed at [0xcontract_address] on the Ethereum mainnet, [other_testnets] testnets.
This contract is yet to be deployed.

Events

RedeemedBonds

1
event RedeemedBonds(address indexed from, uint256 amount);
Copied!
Emitted when Basis Bonds are redeemed via redeemBonds.

BoughtBonds

1
event BoughtBonds(address indexed from, uint256 amount);
Copied!
Emitted when Basis Bonds are bought via buyBonds.

TreasuryFunded

1
event TreasuryFunded(uint256 timestamp, uint256 seigniorage);
Copied!
Emitted when new Basis Cash is minted to the Treasury via allocateSeigniorage.

BoardroomFunded

1
event BoardroomFunded(uint256 timestamp, uint256 seigniorage);
Copied!
Emitted when new Basis Cash is minted to the Boardroom via allocateSeigniorage.

Modifiers

allocationTimeRipe

1
modifier allocationTimeRipe
Copied!
Checks whether a day has passed since the last successful execution of allocateSeigniorage.

Functions

getCashPrice

1
function getCashPrice() internal returns (uint cashPrice)
Copied!
Returns the oracle price of Basis Cash denominated in DAI.

buyBonds

1
function buyBonds(uint256 amount) external
Copied!
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.

redeemBonds

1
function redeemBonds(uint256 amount) external
Copied!
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.

allocateSeigniorage

1
function allocateSeigniorage() external allocationTimeRipe
Copied!
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.
Last modified 1yr ago