mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
updated reentracy attack chances
This commit is contained in:
parent
91b23303fc
commit
d25a048fbd
|
@ -78,7 +78,7 @@ contract InstaImplementationM1 is Constants {
|
||||||
* @param _targetNames Array of Connector address.
|
* @param _targetNames Array of Connector address.
|
||||||
* @param _datas Array of Calldata.
|
* @param _datas Array of Calldata.
|
||||||
*/
|
*/
|
||||||
function cast(
|
function castMigrate(
|
||||||
string[] calldata _targetNames,
|
string[] calldata _targetNames,
|
||||||
bytes[] calldata _datas,
|
bytes[] calldata _datas,
|
||||||
address _origin
|
address _origin
|
||||||
|
@ -115,4 +115,5 @@ contract InstaImplementationM1 is Constants {
|
||||||
eventParams
|
eventParams
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -79,6 +79,8 @@ contract MigrateResolver is Helpers, Events {
|
||||||
_amt = maxAmt;
|
_amt = maxAmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deposits[msg.sender][_token] = sub(maxAmt, _amt);
|
||||||
|
|
||||||
if (_token == maticAddr) {
|
if (_token == maticAddr) {
|
||||||
TokenInterface _tokenContract = TokenInterface(wmaticAddr);
|
TokenInterface _tokenContract = TokenInterface(wmaticAddr);
|
||||||
uint _maticBal = address(this).balance;
|
uint _maticBal = address(this).balance;
|
||||||
|
@ -98,8 +100,6 @@ contract MigrateResolver is Helpers, Events {
|
||||||
}
|
}
|
||||||
|
|
||||||
_amts[i] = _amt;
|
_amts[i] = _amt;
|
||||||
|
|
||||||
deposits[msg.sender][_token] = sub(maxAmt, _amt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isPositionSafe();
|
isPositionSafe();
|
||||||
|
|
|
@ -95,6 +95,8 @@ contract LiquidityResolver is Helpers, Events {
|
||||||
_amt = maxAmt;
|
_amt = maxAmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deposits[msg.sender][_token] = sub(maxAmt, _amt);
|
||||||
|
|
||||||
// TODO: @everyone check this throughly. Saving 1000 WEI for flashloan WETH. Also, should we make a different contract to handle 2 WEI dydx gas, I think this would be better.
|
// TODO: @everyone check this throughly. Saving 1000 WEI for flashloan WETH. Also, should we make a different contract to handle 2 WEI dydx gas, I think this would be better.
|
||||||
if (_token == ethAddr) {
|
if (_token == ethAddr) {
|
||||||
TokenInterface _tokenContract = TokenInterface(wethAddr);
|
TokenInterface _tokenContract = TokenInterface(wethAddr);
|
||||||
|
@ -115,8 +117,6 @@ contract LiquidityResolver is Helpers, Events {
|
||||||
}
|
}
|
||||||
|
|
||||||
_amts[i] = _amt;
|
_amts[i] = _amt;
|
||||||
|
|
||||||
deposits[msg.sender][_token] = sub(maxAmt, _amt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isPositionSafe();
|
isPositionSafe();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user