- Peg stability
- The basics:
- if USDH below peg -> need to create demand
- if USDH above peg -> need to create supply
- Before: Redemptions / Burn
- if USDH below peg 0.95 -> start with 100 UST -> buy 105 USDH
- The basics:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn calc_system_mode( | |
global_deposited_collateral: &CollateralAmounts, | |
global_debt: u64, | |
prices: &TokenPrices, | |
) -> BorrowResult<(SystemMode, Decimal)> { | |
let _150 = Decimal::from_percent(150); | |
let tcr = CollateralInfo::calculate_collateral_value( | |
global_debt, | |
global_deposited_collateral, | |
prices, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type user = int | |
type task = { | |
desc: string; | |
priority: int; | |
is_finished: bool; | |
} | |
let to_string (t : task) : string = | |
Printf.sprintf | |
"Task { desc: %s; priority: %d; is_finished: %b" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Original solution via StackOverflow: | |
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t | |
# | |
# | |
# Install via `conda` directly. | |
# This will fail to install all | |
# dependencies. If one fails, | |
# all dependencies will fail to install. |