Open mz7mz7mz7 opened 1 year ago
{
"makerToken": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"takerToken": "0xe41d2489571d322189246dafa5ebde1f4699f498",
"makerAmount": "100000000000000",
"takerAmount": "2000000000000000000000",
"maker": "0x56EB0aD2dC746540Fab5C02478B31e2AA9DdC38C",
"taker": "0x0000000000000000000000000000000000000000",
"pool": "0x0000000000000000000000000000000000000000000000000000000000000000",
"expiry": "1614956256",
"salt": "2752094376750492926844965905320507011598275560670346196138937898764349624882",
"chainId": 1,
"verifyingContract": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"takerTokenFeeAmount": "0",
"sender": "0x0000000000000000000000000000000000000000",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"signature": {
"v": 27,
"r": "0x983a8a8dad663124a52609fe9aa82737f7f02d12ed951785f36b50906041794d",
"s": "0x5f18ae837be4732bcb3dd019104cf775f92b8740b275be510462a7aa62cdf252",
"signatureType": 3
}
}
This is a sample of the limit order object containing feeRecipient
and takerTokenFeeAmount
gotten from https://0x.org/docs/0x-orderbook-api/api-references/post-orderbook-v1-order
This is a sample of the limit order object containing feeRecipient and takerTokenFeeAmount gotten from https://0x.org/docs/0x-orderbook-api/api-references/post-orderbook-v1-order
So the values both for the fee and the recipient are 0x0 here. Can we find an example with non-zero fees, ideally with the tx hash (i.e., the order that was settled and the fees paid)?
Yes, I showed this in the loom video i attached to the ticket, if you check here, https://polygonscan.com/token/0xAcBFc51186a5104BEA8DDc98c9C45569e86d2e0E?a=0x4274e6eedd682721d938ea6d63b294a92abe949f all the transactions to this address are fees
It’s not the same, the protocol fee was the fee 0x was charging i think
But they say they distribute that fee to makers as a liquidity reward. And again: I did not see that fee being paid, in ETH, on your video/examples.
I will verify this and revert to you with answers
Hello @mz7mz7mz7 i have been able to test and answer this question
What happens with the fee for partially filled orders? How much is paid?
I created an order to sell 2 token A for 8 token B and set the fee amount to be 8 token B, I partially filled 1 token A for 4 of token B and ended up also paying 4 token B as the fee amount, this means i paid 8 token B in total for 1 token A. I expected it to work this way and i think it's fine
Research how 0x fees work. Can we set them to an arbitrary value? Who is being paid the fee? Is there a way for other trading participants to overwrite it?
Review the docs/code but maybe also build simple PoC (even in the form of unit tests) showing how the fees can be used.