Market Maker Contract
Market Maker Contract
Interface
##Events
Maker(address maker, bool allow)
Add new or modify market maker permissionsMakerDeposit(address payToken,uint256 indexNo,uint8 poolId,address maker, uint256 amount, uint256 fee )
Market makers deposit marginMakerWithdraw(address payToken,uint256 indexNo,uint8 poolId,address maker, uint256 amount)
Market makers withdrow margin
Methods(read thmods)
Based on the market maker address to lookup: maker_index
1. Allow Maker
mapping(address => bool) public allowMaker
Whether to run deposite margin
2. Maker
address[] public maker;
Based on maker_index to ger address
node
3.Rate
uint256 public rate
**The rate of market maker deposits margin **
4. Maker Balance
mapping(uint256 => mapping(uint256 => uint256[16])) public makerBalance
View the balance of single market maker in option pool
index_no
uint256
index_no
maker_index
uint256
maker_index
pool_id
uint8
pool_id
balance
uint256
balance
node
5. Order Maker Length
function orderMakerLength( uint256 _orderNo ) external view returns (uint256)
Order maker length
6. Get Order Maker
function getOrderMaker( uint256 _orderNo, uint256 _start) external view returns (uint256[50] memory makerArr, uint256[50] memory makerMargin)
Get order maker
order_no
uint256
order_no
start
uint256
start from
makerArr
uint256[50]
maker_index list
makerMargin
uint256[50]
margin list
7. Pools
function pools(address _payToken, uint256 _indexNo, uint8 _poolId) external view returns (uint256)
Pools balance
Methods(write methods)
1. Make rDeposit
function makerDeposit(uint256 _payToken, uint256 _indexNo,uint8 _poolId, uint256 _amount ) external
Deposit margin
_payToken
address
base token
_index_no
uint256
index_no
_pool_id
uint8
pool_id
_amount
uint256
deposit margin
2. Maker Withdraw
function makerWithdraw(uint256 _payToken, uint256 _indexNo,uint8 _poolId, uint256 _amount ) external
Withdraw margin
_payToken
address
base token
_index_no
uint256
index_no
_pool_id
uint8
pool_id
_amount
uint256
withdraw amount
Last updated