Increase size of deposit required for contracts to remove defaulting exploit

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5535 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Chris Morris 2012-11-25 10:30:08 +00:00
parent 60b5ffc602
commit f8e0f48cc8

View File

@ -354,6 +354,13 @@ this._initialiseCargoContractsForSystem = function()
}
share = 100-share;
// safety: now multiply the fee by 2 compared with 1.76 contracts
// prevents exploit discovered by Mad Hollander at
// http://aegidian.org/bb/viewtopic.php?p=188127
localValue *= 2;
// this may need to be raised further
// absolute value of profit remains the same
var fee = localValue + Math.floor(profit * (share/100));
fee -= fee % 20; // round to nearest 20 credits;