@@ -36,7 +36,7 @@ contract EtherCollateral is Owned, Pausable, ReentrancyGuard, MixinResolver, IEt
36
36
// ========== SETTER STATE VARIABLES ==========
37
37
38
38
// The ratio of Collateral to synths issued
39
- uint256 public collateralizationRatio = SafeDecimalMath.unit () * 150 ;
39
+ uint256 public collateralizationRatio = SafeDecimalMath.unit () * 125 ; // SCCP-27
40
40
41
41
// If updated, all outstanding loans will pay this interest rate in on closure of the loan. Default 5%
42
42
uint256 public interestRate = (5 * SafeDecimalMath.unit ()) / 100 ;
@@ -48,7 +48,7 @@ contract EtherCollateral is Owned, Pausable, ReentrancyGuard, MixinResolver, IEt
48
48
// Maximum amount of sETH that can be issued by the EtherCollateral contract. Default 5000
49
49
uint256 public issueLimit = SafeDecimalMath.unit () * 5000 ;
50
50
51
- // Minimum amount of ETH to create loan preventing griefing and gas consumption. Min 1ETH = 0.6666666667 sETH
51
+ // Minimum amount of ETH to create loan preventing griefing and gas consumption. Min 1ETH = 0.8 sETH
52
52
uint256 public minLoanSize = SafeDecimalMath.unit () * 1 ;
53
53
54
54
// Maximum number of loans an account can create
@@ -201,8 +201,8 @@ contract EtherCollateral is Owned, Pausable, ReentrancyGuard, MixinResolver, IEt
201
201
}
202
202
203
203
// returns value of 100 / collateralizationRatio.
204
- // e.g. 100/150 = 0.666666666666666667
205
- // or in wei 100000000000000000000/150000000000000000000 = 666666666666666667
204
+ // e.g. 100/125 = 0.8
205
+ // or in wei 100000000000000000000/125000000000000000000 = 800000000000000000
206
206
function issuanceRatio () public view returns (uint256 ) {
207
207
// this Rounds so you get slightly more rather than slightly less
208
208
// 4999999999999999995000
@@ -372,26 +372,26 @@ contract EtherCollateral is Owned, Pausable, ReentrancyGuard, MixinResolver, IEt
372
372
// Calculate and deduct interest(5%) and minting fee(50 bips) in ETH
373
373
uint256 interestAmount = accruedInterestOnLoan (synthLoan.loanAmount, _loanLifeSpan (synthLoan));
374
374
uint256 mintingFee = _calculateMintingFee (synthLoan);
375
- uint256 totalFees = interestAmount.add (mintingFee);
375
+ uint256 totalFeeETH = interestAmount.add (mintingFee);
376
376
377
377
// Burn all Synths issued for the loan
378
378
synthsETH ().burn (msg .sender , synthLoan.loanAmount);
379
379
380
380
// Fee Distribution. Purchase sUSD with ETH from Depot
381
381
require (
382
- IERC20 (address (synthsUSD ())).balanceOf (address (depot ())) >= totalFees ,
382
+ IERC20 (address (synthsUSD ())).balanceOf (address (depot ())) >= depot (). synthsReceivedForEther (totalFeeETH) ,
383
383
"The sUSD Depot does not have enough sUSD to buy for fees "
384
384
);
385
- depot ().exchangeEtherForSynths.value (totalFees )();
385
+ depot ().exchangeEtherForSynths.value (totalFeeETH )();
386
386
387
387
// Transfer the sUSD to distribute to SNX holders.
388
388
IERC20 (address (synthsUSD ())).transfer (FEE_ADDRESS, IERC20 (address (synthsUSD ())).balanceOf (address (this )));
389
389
390
390
// Send remainder ETH to caller
391
- address (msg .sender ).transfer (synthLoan.collateralAmount.sub (totalFees ));
391
+ address (msg .sender ).transfer (synthLoan.collateralAmount.sub (totalFeeETH ));
392
392
393
393
// Tell the Dapps
394
- emit LoanClosed (account, loanID, totalFees );
394
+ emit LoanClosed (account, loanID, totalFeeETH );
395
395
}
396
396
397
397
function _getLoanFromStorage (address account , uint256 loanID ) private view returns (SynthLoanStruct memory ) {
0 commit comments