flash loan

This commit is contained in:
mingda
2020-11-06 00:31:30 +08:00
parent b31f1a30e2
commit cdb5a3ba62
8 changed files with 65 additions and 39 deletions

View File

@@ -110,11 +110,15 @@ contract DVMVault is InitializableOwnable {
}
function transferBaseOut(address to, uint256 amount) public onlyOwner {
IERC20(_BASE_TOKEN_).safeTransfer(to, amount);
if (amount > 0) {
IERC20(_BASE_TOKEN_).safeTransfer(to, amount);
}
}
function transferQuoteOut(address to, uint256 amount) public onlyOwner {
IERC20(_QUOTE_TOKEN_).safeTransfer(to, amount);
if (amount > 0) {
IERC20(_QUOTE_TOKEN_).safeTransfer(to, amount);
}
}
// Shares related