Skip to content

Commit 8f2c1bb

Browse files
authored
Merge pull request #646 from VenusProtocol/feat/VPD-233
[VPD-233]: Repay logic improvisation
2 parents 88ad10e + 05d3cd3 commit 8f2c1bb

15 files changed

+2304
-117
lines changed
78.9 KB
Binary file not shown.

contracts/Tokens/VTokens/VToken.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,12 +1400,8 @@ abstract contract VToken is VTokenInterface, Exponential, TokenErrorReporter {
14001400
);
14011401
}
14021402

1403-
/* If repayAmount == type(uint256).max, repayAmount = accountBorrows */
1404-
if (repayAmount == type(uint256).max) {
1405-
vars.repayAmount = vars.accountBorrows;
1406-
} else {
1407-
vars.repayAmount = repayAmount;
1408-
}
1403+
// caps the repayAmount to the actual owed amount
1404+
vars.repayAmount = repayAmount >= vars.accountBorrows ? vars.accountBorrows : repayAmount;
14091405

14101406
/////////////////////////
14111407
// EFFECTS & INTERACTIONS

deployments/bscmainnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70440,7 +70440,7 @@
7044070440
]
7044170441
},
7044270442
"VBep20Delegate": {
70443-
"address": "0x33D17F1E6107CD4d711b56eB0094bf39a471a8B5",
70443+
"address": "0x1be1CE8352328278Ac4e0488436c0f1607282550",
7044470444
"abi": [
7044570445
{
7044670446
"inputs": [],

deployments/bscmainnet/VBep20Delegate.json

Lines changed: 54 additions & 54 deletions
Large diffs are not rendered by default.

deployments/bscmainnet/solcInputs/3109c13adfec5d643322698e24ec5733.json

Lines changed: 391 additions & 0 deletions
Large diffs are not rendered by default.

deployments/bscmainnet/solcInputs/adb99e9640c7f15389cb1ae1ac8b353d.json

Lines changed: 355 additions & 0 deletions
Large diffs are not rendered by default.

deployments/bscmainnet_addresses.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
"VBNBAdmin": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d",
217217
"VBNBAdmin_Implementation": "0xae2713FbdF95d914182f7055ec1Ff6C64F41c275",
218218
"VBNBAdmin_Proxy": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d",
219-
"VBep20Delegate": "0x33D17F1E6107CD4d711b56eB0094bf39a471a8B5",
219+
"VBep20Delegate": "0x1be1CE8352328278Ac4e0488436c0f1607282550",
220220
"VRT": "0x5f84ce30dc3cf7909101c69086c50de191895883",
221221
"VRTConverterProxy": "0x92572fB60f4874d37917C53599cAe5b085B9Facd",
222222
"VRTConverterProxy_Implementation": "0x3192d0fb11c15629c403a6416abfcd7587b180b7",

deployments/bsctestnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61748,7 +61748,7 @@
6174861748
]
6174961749
},
6175061750
"VBep20Delegate": {
61751-
"address": "0xb941C5D148c65Ce49115D12B5148247AaCeFF375",
61751+
"address": "0x8277E2a97dE0c0Fdb9Eb32810a47133AD986FE09",
6175261752
"abi": [
6175361753
{
6175461754
"inputs": [],

deployments/bsctestnet/VBep20Delegate.json

Lines changed: 52 additions & 52 deletions
Large diffs are not rendered by default.

deployments/bsctestnet/solcInputs/3109c13adfec5d643322698e24ec5733.json

Lines changed: 391 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)