UniMexMargin

Verified contract

Active on Ethereum with 189 txns
Deployed by via 0xd04924f0 at 12000052
Slot
32
30
28
26
24
22
20
18
16
14
12
10
8
6
4
2
0
ERC-20
Value $2,510.81
0xd968a57845ac05925fcb01fe2c9745c6c37551c57ddcc29b381e97ed6a641a90
0xd8ffdc2f4c66194054214c34d983e2df89e15a4714ef88690e37b219b804d6d4
0x661c40bf0e8b135bd647273506fd2ebd310ce2b3d30d283f641853a87ef44def
0x970d521334878216c1e288dcf2d26b035fcd8fe0ab846fd9029a908ac5fb8253
0x9264309eda306fe7b5455ea403766efb51c45839ffcd483deb3ba98c3d443356
0x2260ed48b0ce8efc5e07d8d5961ef3ed9adf292ba5d8f89df5a48518b8f68af4
0x6f9c6cbd5dc5a8d9a88e40ea0e75bfa4c8c3aca964ce94308d525a6f4a4a9a2f
0x5e2412dd5e132e8d6c81c9d78eac444b67a198e947f87437fcc5e5ad94a27c07
0x2ca85c34eb42d27409fd40ad63430762c78fae6508f12f82fbd92d737109ad47
0xb5a9769cb75cb183a5e911a4b714f4cbba711a2b4c501f9213355f518cec878a

Functions
Getter at block 21272345
DEFAULT_ADMIN_ROLE(view returns (bytes32)
0x0000000000000000000000000000000000000000000000000000000000000000
LIQUIDATION_MARGIN(view returns (uint256)
1100000000000000000
LIQUIDATOR_ROLE(view returns (bytes32)
0x5e17fc5225d4a099df75359ce1f405503ca79498a8dc46a7d583235a0ee45c16
MAG(view returns (uint256)
1000000000000000000
WETH(view returns (address)
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
YEAR(view returns (uint256)
31536000
amountThresholds(view returns (uint256)
275
borrowInterestPercentScaled(view returns (uint32)
100
calculateAutoCloseBonus(view returns (uint256)
135000000000000000
calculateAutoOpenBonus(view returns (uint256)
255000000000000000
owner(view returns (address)
0x4387040b86bad26908b02c44e8428b2ddab4455d
paused(view returns (bool)
false
positionNonce(view returns (uint256)
17
staking(view returns (address)
0x8dc85b6056b40c950e6119899cac90be9eeb4da7
thresholdGasPrice(view returns (uint256)
500000000000
unimex_factory(view returns (address)
0xc80b0efb594df8be90a643c7f7a462541cd7f6ee
uniswap_factory(view returns (address)
0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
uniswap_router(view returns (address)
0x7a250d5630b4cf539739df2c5dacb4c659f2488d
Read-only
balanceOf(addressview returns (uint256)
calculateBorrowInterest(bytes32 positionIdview returns (uint256)
canLiquidate(bytes32 positionIdview returns (bool)
checkPositionAmount(address tokenuint256 amountuint256 leverageScaledview returns (bool)
escrow(addressview returns (uint256)
getRoleAdmin(bytes32 roleview returns (bytes32)
getRoleMember(bytes32 roleuint256 indexview returns (address)
getRoleMemberCount(bytes32 roleview returns (uint256)
hasRole(bytes32 roleaddress accountview returns (bool)
limitOrders(bytes32view returns (uint256 amountuint256 minimalSwapAmountaddress tokenbool isShortuint32 validBeforeuint32 leverageScaledaddress owneruint32 takeProfitPercentuint32 stopLossPercentuint256 escrowAmount)
positionInfo(bytes32view returns (uint256 oweduint256 inputuint256 commitmentaddress tokenbool isShortuint32 startTimestampuint32 borrowInterestaddress owneruint32 stopLossPercentuint32 takeProfitPercent)
State-modifying
addCommitmentToPosition(bytes32 positionIduint256 amount
autoClose(bytes32 positionId
autoOpen(bytes32 limitOrderId
cancelLimitOrder(bytes32 limitOrderId
closePosition(bytes32 positionIduint256 minimalSwapAmount
deposit(uint256 _amount
grantRole(bytes32 roleaddress account
liquidatePosition(bytes32 positionIduint256 minimalSwapAmount
openLimitOrder(address tokenbool isShortuint256 amountuint256 minimalSwapAmountuint256 leverageScaleduint32 validBeforeuint32 takeProfitPercentuint32 stopLossPercent
openLongPosition(address tokenuint256 amountuint256 scaledLeverageuint256 minimalSwapAmount
openLongPositionWithSlTp(address tokenuint256 amountuint256 scaledLeverageuint256 minimalSwapAmountuint256 takeProfitPercentuint256 stopLossPercent
openShortPosition(address tokenuint256 amountuint256 scaledLeverageuint256 minimalSwapAmount
openShortPositionWithSlTp(address tokenuint256 amountuint256 scaledLeverageuint256 minimalSwapAmountuint256 takeProfitPercentuint256 stopLossPercent
pause(
renounceOwnership(
renounceRole(bytes32 roleaddress account
revokeRole(bytes32 roleaddress account
setAmountThresholds(uint32 leverage5
setBorrowPercent(uint32 _newPercentScaled
setStaking(address _staking
setStopLoss(bytes32 positionIduint32 percentAmount
setTakeProfit(bytes32 positionIduint32 percentAmount
setThresholdGasPrice(uint256 gasPrice
transferOwnership(address newOwner
unpause(
withdraw(uint256 _amount
Events
OnAddCommitment(bytes32 indexed positionIduint256 amount
OnClosePosition(bytes32 indexed positionIdaddress tokenaddress indexed owneruint256 oweduint256 inputuint256 commitmentuint32 startTimestampbool isShortuint256 borrowInterestuint256 liquidationBonusuint256 scaledCloseRate
OnLimitOrder(bytes32 indexed limitOrderIdaddress indexed owneraddress tokenuint256 amountuint256 minimalSwapAmountuint256 leverageScaleduint256 validBeforeuint256 escrowAmountuint32 takeProfitPercentuint32 stopLossPercentbool isShort
OnLimitOrderCancelled(bytes32 indexed limitOrderId
OnLimitOrderCompleted(bytes32 indexed limitOrderIdbytes32 positionId
OnOpenPosition(address indexed senderbytes32 positionIdbool isShortaddress indexed tokenuint256 scaledLeverage
OnStopLoss(bytes32 indexed positionIduint256 positionInputuint256 swapAmountaddress tokenbool isShort
OnTakeProfit(bytes32 indexed positionIduint256 positionInputuint256 swapAmountaddress tokenbool isShort
OwnershipTransferred(address indexed previousOwneraddress indexed newOwner
RoleAdminChanged(bytes32 indexed rolebytes32 indexed previousAdminRolebytes32 indexed newAdminRole
RoleGranted(bytes32 indexed roleaddress indexed accountaddress indexed sender
RoleRevoked(bytes32 indexed roleaddress indexed accountaddress indexed sender
Constructor
constructor(address _stakingaddress _factoryaddress _wethaddress _uniswap_factoryaddress _uniswap_router
Fallback and receive

This contract contains no fallback and receive objects.

Errors

This contract contains no error objects.