Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-1m98wce lending docs and fixes #441

Merged
merged 8 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion frame/composable-traits/src/defi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use frame_support::{pallet_prelude::MaybeSerializeDeserialize, Parameter};
use scale_info::TypeInfo;
use sp_runtime::{
traits::{CheckedAdd, CheckedMul, CheckedSub, Zero},
ArithmeticError, DispatchError, FixedPointOperand,
ArithmeticError, DispatchError, FixedPointOperand, FixedU128,
};

use crate::{
Expand Down Expand Up @@ -166,3 +166,8 @@ pub trait DeFiComposableConfig: frame_system::Config {
+ Into<u128>; // cannot do From<u128>, until LiftedFixedBalance integer part is larger than 128
// bit
}

/// The fixed point number from 0..to max.
/// Unlike `Ratio` it can be more than 1.
/// And unlike `NormalizedCollateralFactor`, it can be less than one.
pub type Rate = FixedU128;