Skip to content

Commit d56e95b

Browse files
authored
Merge pull request #1980 from parallel-finance/loans-update
Update MIN_VALID_EXCHANGE_RATE for loans
2 parents b105626 + 637d950 commit d56e95b

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

pallets/loans/src/interest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ impl<T: Config> Pallet<T> {
151151
Ok(Ratio::from_rational(borrows, total))
152152
}
153153

154-
/// The exchange rate should be greater than 0.02 and less than 1
154+
/// The exchange rate should be greater than 0.015 and less than 1
155155
pub(crate) fn ensure_valid_exchange_rate(exchange_rate: Rate) -> DispatchResult {
156156
ensure!(
157-
exchange_rate >= Rate::from_inner(MIN_EXCHANGE_RATE)
157+
exchange_rate >= Rate::from_inner(MIN_VALID_EXCHANGE_RATE)
158158
&& exchange_rate < Rate::from_inner(MAX_EXCHANGE_RATE),
159159
Error::<T>::InvalidExchangeRate
160160
);

pallets/loans/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pub const MIN_INTEREST_CALCULATING_INTERVAL: u64 = 100; // 100 seconds
8080

8181
pub const MAX_EXCHANGE_RATE: u128 = 1_000_000_000_000_000_000; // 1
8282
pub const MIN_EXCHANGE_RATE: u128 = 20_000_000_000_000_000; // 0.02
83+
pub const MIN_VALID_EXCHANGE_RATE: u128 = 15_000_000_000_000_000; // 0.015
8384

8485
type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
8586
type AssetIdOf<T> =

runtime/heiko/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
180180
spec_name: create_runtime_str!("heiko"),
181181
impl_name: create_runtime_str!("heiko"),
182182
authoring_version: 1,
183-
spec_version: 209,
183+
spec_version: 210,
184184
impl_version: 33,
185185
apis: RUNTIME_API_VERSIONS,
186186
transaction_version: 17,

runtime/kerria/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
180180
spec_name: create_runtime_str!("kerria"),
181181
impl_name: create_runtime_str!("kerria"),
182182
authoring_version: 1,
183-
spec_version: 209,
183+
spec_version: 210,
184184
impl_version: 33,
185185
apis: RUNTIME_API_VERSIONS,
186186
transaction_version: 17,

runtime/parallel/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
185185
spec_name: create_runtime_str!("parallel"),
186186
impl_name: create_runtime_str!("parallel"),
187187
authoring_version: 1,
188-
spec_version: 209,
188+
spec_version: 210,
189189
impl_version: 33,
190190
apis: RUNTIME_API_VERSIONS,
191191
transaction_version: 17,

runtime/vanilla/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
180180
spec_name: create_runtime_str!("vanilla"),
181181
impl_name: create_runtime_str!("vanilla"),
182182
authoring_version: 1,
183-
spec_version: 209,
183+
spec_version: 210,
184184
impl_version: 33,
185185
apis: RUNTIME_API_VERSIONS,
186186
transaction_version: 17,

scripts/collator.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ VOLUME="chains"
2020
NODE_KEY="$1"
2121
KEYSTORE_PATH="$2"
2222
NODE_NAME="$3"
23-
DOCKER_IMAGE="parallelfinance/parallel:v2.0.9"
23+
DOCKER_IMAGE="parallelfinance/parallel:v2.1.0"
2424
BASE_PATH="/data"
2525

2626
if [ $# -lt 3 ]; then

0 commit comments

Comments
 (0)