编译器
0.8.20+commit.a1b79de6
文件 1 的 10:IERC20.sol
pragma solidity ^0.8.20;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
文件 2 的 10:ILPGateway.sol
pragma solidity ^0.8.13;
interface ILPGateway {
function addLiquidity(
address tokenB,
uint256 amountNXDDesired,
uint256 amountBDesired,
uint256 amountNXDMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
}
文件 3 的 10:ISwapRouter.sol
pragma solidity >=0.7.5;
pragma abicoder v2;
import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';
interface ISwapRouter is IUniswapV3SwapCallback {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
struct ExactInputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
}
function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);
struct ExactOutputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}
function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);
struct ExactOutputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
}
function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}
文件 4 的 10:IUniswapV2Pair.sol
pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to) external returns (uint256 amount0, uint256 amount1);
function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
文件 5 的 10:IUniswapV2Router01.sol
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external returns (address);
function WETH() external returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountOut);
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
文件 6 的 10:IUniswapV2Router02.sol
pragma solidity >=0.6.2;
import "./IUniswapV2Router01.sol";
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
文件 7 的 10:IUniswapV3SwapCallback.sol
pragma solidity >=0.5.0;
interface IUniswapV3SwapCallback {
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external;
}
文件 8 的 10:IV2Oracle.sol
pragma solidity ^0.8.13;
interface IV2Oracle {
function update() external;
function consult(address token, uint256 amountIn) external view returns (uint256 amountOut);
function canUpdate() external view returns (bool);
}
文件 9 的 10:IV3Oracle.sol
pragma solidity ^0.8.13;
interface IV3Oracle {
function getHumanQuote(
address uniswapV3Pool,
uint32 secondsAgo,
uint128 baseAmount,
address baseToken,
address quoteToken
) external view returns (uint256 quoteAmount);
}
文件 10 的 10:QDistributor.sol
pragma solidity >=0.8.0;
import "./interfaces/IV3Oracle.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./interfaces/IV2Oracle.sol";
import "./interfaces/ILPGateway.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
contract QDistributor {
error GotNothing();
error NotGovernance();
error FailedToSend();
error SumNot10000();
event Received(
address from, uint256 ethAmount, uint256 amountToVault, uint256 amountToProtocol, uint256 amountToLP
);
event SentToProtocol(uint256 amount);
event SentToVault(uint256 amount);
event AddedLP(uint256 amount);
event UpdatedPercentages(uint256 vaultPercentage, uint256 protocolPercentage, uint256 lpPercentage);
event UpdatedMaxSlippage(uint256 maxSlippageForETHDXNSwap, uint256 maxSlippageForDXNNXDSwap);
event UpdatedLPGateway(address lpGateway);
event UpdatedGovernance(address governance);
uint256 public constant PERCENTAGE_DIVISOR = 10000;
address public constant nxdStakingVault = 0xa1B56E42137D06280E34B3E1352d80Ac3BECAF79;
address public constant nxdProtocol = 0xE05430D42842C7B757E5633D19ca65350E01aE11;
uint256 public vaultPercentage = 3334;
uint256 public protocolPercentage = 3333;
uint256 public lpPercentage = 3333;
uint256 public pendingAmountVault;
uint256 public pendingAmountProtocol;
uint256 public pendingAmountLP;
address public governance;
ISwapRouter public constant UNISWAP_V3_ROUTER = ISwapRouter(payable(0xE592427A0AEce92De3Edee1F18E0157C05861564));
address public constant DXN_WETH_POOL = 0x7F808fD904FFA3eb6A6F259e6965Fb1466A05372;
address public constant WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IERC20 public constant dxn = IERC20(0x80f0C1c49891dcFDD40b6e0F960F84E6042bcB6F);
IERC20 public constant nxd = IERC20(0x70536D44820fE3ddd4A2e3eEdbC937b8B9D566C7);
IUniswapV2Router02 public constant UNISWAP_V2_ROUTER =
IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IV3Oracle public constant v3Oracle = IV3Oracle(0x21c6e0427fb2bA0E827253f48241aAbDd8051eAa);
IUniswapV2Pair constant nxdDXNPair = IUniswapV2Pair(0x98134CDE70ff7280bb4b9f4eBa2154009f2C13aC);
IV2Oracle public constant v2Oracle = IV2Oracle(0x14D558267A97c7a61554d7F7b23a594781E04495);
uint256 public maxSlippageForETHDXNSwap = 300;
uint256 public maxSlippageForDXNNXDSwap = 300;
ILPGateway public lpGateway;
constructor(address _lpGateway) {
governance = msg.sender;
lpGateway = ILPGateway(_lpGateway);
}
function setLPGateway(address _lpGateway) public {
if (msg.sender != governance) {
revert NotGovernance();
}
lpGateway = ILPGateway(_lpGateway);
emit UpdatedLPGateway(_lpGateway);
}
function setMaxSlippageForSwap(uint256 _maxSlippageForETHDXNSwap, uint256 _maxSlippageForDXNNXDSwap) public {
if (msg.sender != governance) {
revert NotGovernance();
}
maxSlippageForETHDXNSwap = _maxSlippageForETHDXNSwap;
maxSlippageForDXNNXDSwap = _maxSlippageForDXNNXDSwap;
emit UpdatedMaxSlippage(_maxSlippageForETHDXNSwap, _maxSlippageForDXNNXDSwap);
}
function setGovernance(address _governance) public {
if (msg.sender != governance) {
revert NotGovernance();
}
governance = _governance;
emit UpdatedGovernance(_governance);
}
function sendToVault() public {
uint256 amount = pendingAmountVault;
pendingAmountVault = 0;
(bool sent,) = nxdStakingVault.call{value: amount}("");
if (!sent) {
revert FailedToSend();
}
emit SentToVault(amount);
}
function sendToProtocol(uint256 amount) public {
if (amount > pendingAmountProtocol) {
amount = pendingAmountProtocol;
}
pendingAmountProtocol -= amount;
(bool sent,) = nxdProtocol.call{value: amount}("");
if (!sent) {
revert FailedToSend();
}
emit SentToProtocol(amount);
}
function addLP(uint256 amount) public {
if (amount > pendingAmountLP) {
amount = pendingAmountLP;
}
pendingAmountLP -= amount;
uint256 quote = v3Oracle.getHumanQuote(DXN_WETH_POOL, 5 minutes, 1 ether, WETH9, address(dxn));
uint256 minOut = (amount * quote) / 1e18;
minOut = (minOut * (10000 - maxSlippageForETHDXNSwap)) / 10000;
UNISWAP_V3_ROUTER.exactInputSingle{value: amount}(
ISwapRouter.ExactInputSingleParams(
WETH9, address(dxn), 10000, address(this), block.timestamp, amount, minOut, 0
)
);
uint256 dxnPriceInEth = (1e18 * 1 ether) / quote;
uint256 dxnAmountToAdd = (amount / 2) * 1e18 / dxnPriceInEth;
uint256 dxnToSwapForNXD = dxn.balanceOf(address(this)) - dxnAmountToAdd;
if (v2Oracle.canUpdate()) {
v2Oracle.update();
}
uint256 amountOutMin = v2Oracle.consult(address(dxn), dxnToSwapForNXD);
amountOutMin = (amountOutMin * (10000 - maxSlippageForDXNNXDSwap)) / 10000;
address[] memory path = new address[](2);
path[0] = address(dxn);
path[1] = address(nxd);
dxn.approve(address(UNISWAP_V2_ROUTER), dxnToSwapForNXD);
uint256[] memory amounts = UNISWAP_V2_ROUTER.swapExactTokensForTokens(
dxnToSwapForNXD, amountOutMin, path, address(this), block.timestamp
);
if (amounts[1] == 0) {
revert GotNothing();
}
dxn.approve(address(lpGateway), dxn.balanceOf(address(this)));
nxd.approve(address(lpGateway), nxd.balanceOf(address(this)));
lpGateway.addLiquidity(
address(dxn),
nxd.balanceOf(address(this)),
dxn.balanceOf(address(this)),
0,
0,
address(this),
block.timestamp
);
emit AddedLP(amount);
}
function setPercentages(uint256 _vaultPercentage, uint256 _protocolPercentage, uint256 _lpPercentage) public {
if (msg.sender != governance) {
revert NotGovernance();
}
if (_vaultPercentage + _protocolPercentage + _lpPercentage != PERCENTAGE_DIVISOR) {
revert SumNot10000();
}
vaultPercentage = _vaultPercentage;
protocolPercentage = _protocolPercentage;
lpPercentage = _lpPercentage;
emit UpdatedPercentages(_vaultPercentage, _protocolPercentage, _lpPercentage);
}
receive() external payable {
uint256 amount = address(this).balance;
uint256 amountToVault = (amount * vaultPercentage) / PERCENTAGE_DIVISOR;
uint256 amountToProtocol = (amount * protocolPercentage) / PERCENTAGE_DIVISOR;
uint256 amountToLP = (amount * lpPercentage) / PERCENTAGE_DIVISOR;
pendingAmountVault += amountToVault;
pendingAmountProtocol += amountToProtocol;
pendingAmountLP += amountToLP;
emit Received(msg.sender, amount, amountToVault, amountToProtocol, amountToLP);
}
}
{
"compilationTarget": {
"src/QDistributor.sol": "QDistributor"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":@uniswap/lib/=lib/solidity-lib/",
":@uniswap/v2-core/=lib/v2-core/",
":@uniswap/v3-core/=lib/v3-core/",
":@uniswap/v3-periphery/=lib/v3-periphery/",
":abdk-libraries-solidity/=lib/abdk-libraries-solidity/",
":base64-sol/=lib/base64/",
":base64/=lib/base64/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":solidity-lib/=lib/solidity-lib/contracts/",
":v2-core/=lib/v2-core/contracts/",
":v3-core/=lib/v3-core/contracts/",
":v3-periphery/=lib/v3-periphery/contracts/"
]
}
[{"inputs":[{"internalType":"address","name":"_lpGateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedToSend","type":"error"},{"inputs":[],"name":"GotNothing","type":"error"},{"inputs":[],"name":"NotGovernance","type":"error"},{"inputs":[],"name":"SumNot10000","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddedLP","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToVault","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToProtocol","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToLP","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SentToProtocol","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SentToVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"governance","type":"address"}],"name":"UpdatedGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lpGateway","type":"address"}],"name":"UpdatedLPGateway","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxSlippageForETHDXNSwap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxSlippageForDXNNXDSwap","type":"uint256"}],"name":"UpdatedMaxSlippage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"vaultPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpPercentage","type":"uint256"}],"name":"UpdatedPercentages","type":"event"},{"inputs":[],"name":"DXN_WETH_POOL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENTAGE_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V2_ROUTER","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V3_ROUTER","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dxn","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpGateway","outputs":[{"internalType":"contract ILPGateway","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSlippageForDXNNXDSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSlippageForETHDXNSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nxd","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nxdProtocol","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nxdStakingVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAmountLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAmountProtocol","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAmountVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendToProtocol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendToVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpGateway","type":"address"}],"name":"setLPGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSlippageForETHDXNSwap","type":"uint256"},{"internalType":"uint256","name":"_maxSlippageForDXNNXDSwap","type":"uint256"}],"name":"setMaxSlippageForSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vaultPercentage","type":"uint256"},{"internalType":"uint256","name":"_protocolPercentage","type":"uint256"},{"internalType":"uint256","name":"_lpPercentage","type":"uint256"}],"name":"setPercentages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"v2Oracle","outputs":[{"internalType":"contract IV2Oracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"v3Oracle","outputs":[{"internalType":"contract IV3Oracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]