Skip to content

Commit

Permalink
Merge pull request #618 from Syn-McJ/fix/crowdnode-apy
Browse files Browse the repository at this point in the history
chore(crowdnode): APY calculation for v20
  • Loading branch information
Syn-McJ authored Nov 14, 2023
2 parents bd5fd54 + aa6d01f commit 414a1eb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
10 changes: 3 additions & 7 deletions DashWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11243,12 +11243,8 @@
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = TodayExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 7.0.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 7.1.1;
PRODUCT_BUNDLE_IDENTIFIER = org.dashfoundation.dash.TodayExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -11557,7 +11553,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 7.0.2;
MARKETING_VERSION = 7.1.1;
PRODUCT_BUNDLE_IDENTIFIER = org.dashfoundation.dash.TodayExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
9 changes: 8 additions & 1 deletion DashWallet/Sources/Categories/DSChain+DashWallet.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ - (uint64_t)calculateMasternodePaymentWithHeight:(uint64_t)height blockReward:(u
// Activated but we have to wait for the next cycle to start realocation, nothing to do
return ret;
}

if (height >= chain_core20_activation_height(self.chainType)) {
// Once MNRewardReallocated activates, block reward is 80% of block subsidy (+ tx fees) since treasury is 20%
// Since the MN reward needs to be equal to 60% of the block subsidy (according to the proposal), MN reward is set to 75% of the block reward.
// Previous reallocation periods are dropped.
return blockReward * 3 / 4;
}

NSUInteger reallocCycle = superblockCycle * 3;
NSUInteger nCurrentPeriod = MIN((height - reallocStart) / reallocCycle, periodsCount - 1);
return (blockReward * periods[nCurrentPeriod]) / 1000;
Expand Down Expand Up @@ -311,7 +319,6 @@ - (uint64_t)budgetPaymentsStartBlock {
}
}


@end

NS_ASSUME_NONNULL_END
16 changes: 8 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ PODS:
- abseil/base/base_internal
- abseil/base/config
- abseil/meta/type_traits
- Alamofire (5.8.0)
- Alamofire (5.8.1)
- BlueCryptor (1.0.32)
- BlueECC (1.2.5)
- BlueRSA (1.0.200)
Expand All @@ -591,11 +591,11 @@ PODS:
- "!ProtoCompiler-gRPCPlugin (~> 1.0)"
- DAPI-GRPC/Messages
- gRPC-ProtoRPC
- DashSharedCore (0.4.11)
- DashSharedCore (0.4.12)
- DashSync (0.1.0):
- CocoaLumberjack (= 3.7.2)
- DAPI-GRPC (= 0.22.0-dev.8)
- DashSharedCore (= 0.4.11)
- DashSharedCore (= 0.4.12)
- DSDynamicOptions (= 0.1.2)
- DWAlertController (= 0.2.1)
- TinyCborObjc (= 0.4.6)
Expand Down Expand Up @@ -707,7 +707,7 @@ PODS:
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- PromisesObjC (2.3.1)
- Protobuf (3.24.3)
- Protobuf (3.24.4)
- SDWebImage (5.13.2):
- SDWebImage/Core (= 5.13.2)
- SDWebImage/Core (5.13.2)
Expand Down Expand Up @@ -819,7 +819,7 @@ SPEC CHECKSUMS:
"!ProtoCompiler": e9c09244955a8565817aa59a4787b6bb849a63c6
"!ProtoCompiler-gRPCPlugin": 755f0ee414a0d5f0028e0dcfe98c23bdbc3e6fa3
abseil: 926fb7a82dc6d2b8e1f2ed7f3a718bce691d1e46
Alamofire: 0e92e751b3e9e66d7982db43919d01f313b8eb91
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24
BlueECC: 0d18e93347d3ec6d41416de21c1ffa4d4cd3c2cc
BlueRSA: dfeef51db96bcc4edec654956c1581adbda4e6a3
Expand All @@ -828,8 +828,8 @@ SPEC CHECKSUMS:
CocoaImageHashing: 8656031d0899abe6c1c415827de43e9798189c53
CocoaLumberjack: b7e05132ff94f6ae4dfa9d5bce9141893a21d9da
DAPI-GRPC: 138d62523bbfe7e88a39896f1053c0bc12390d9f
DashSharedCore: d4dc11749f3555702dbe10c563087e6b48399394
DashSync: 2d80784e399b869aede6d5bd476a149733451651
DashSharedCore: 842f752df2a9cdb357b377c1a1abebdac5c0cefa
DashSync: 86a678ae3bc1600245ade93c22acd90377ffb3b6
DSDynamicOptions: 347cc5d2c4e080eb3de6a86719ad3d861b82adfc
DWAlertController: 5f4cd8adf90336331c054857f709f5f8d4b16a5b
Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
Expand All @@ -853,7 +853,7 @@ SPEC CHECKSUMS:
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
Protobuf: 970f7ee93a3a08e3cf64859b8efd95ee32b4f87f
Protobuf: 351e9022fe13a6e2af00e9aefc22077cb88520f8
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
SQLite.swift: 903bfa3bc9ab06345fdfbb578e34f47cfcf417da
SQLiteMigrationManager.swift: 5383578f5bc8955c06695e8bf04835ee0e6673a8
Expand Down

0 comments on commit 414a1eb

Please sign in to comment.