Skip to content

Commit d59bb76

Browse files
authored
Merge pull request #148 from malgus01/dev-branch
feat: Add `authorizedTraders` mapping and minimum flash loan amount safeguard
2 parents 2f24015 + 2600257 commit d59bb76

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/onchain/TestArbitrage.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ contract TestArbitrage is IFlashLoanRecipient, ReentrancyGuard, Ownable, Pausabl
135135
/// @dev When true, enables additional testing features
136136
bool public testMode;
137137

138+
/// @notice Authorized addresses that can execute trades
139+
/// @dev Prevents unauthorized access while allowing testing
140+
mapping(address => bool) public authorizedTraders;
141+
142+
/// @notice Minimum flash loan amount (for testing safety)
143+
/// @dev Prevents dust attacks and very small unprofitable trades
144+
uint256 public minFlashAmount = 1000; // Adjustable for different tokens
145+
138146
//////////////////////////////////////////////////////////////
139147
// CONSTRUCTOR //
140148
//////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)