 nikol
|
|
Total Posts: 1483 |
Joined: Jun 2005 |
|
|
How to estimate gas cost of smart contract such as derivative?
Suppose it is reversal perpetual. And lets it be like the one by MCDEX AMM https://github.com/mcdexio/mai-protocol-v3
- trade at margin / collateral - bids/asks are calculated from demand/supply and account some risk profile measured upon the current book
If I sell option and use B-S to price it, why do I have to calculate exponentas and logs at gas cost?
I need very high level idea only to make optimal contract design. |
... What is a man
If his chief good and market of his time
Be but to sleep and feed? (c) |
|
|
 |
|
i know very little about commodities (even less about "smart contracts")
however, following last years negative oil price spike,
I think a normal (rather than log-normal) model for prices makes more sense. So Bachelier rather than B/S.
|
|
|
 |
 pj
|
|
Total Posts: 3669 |
Joined: Jun 2004 |
|
|
. |
The older I grow, the more I distrust the familiar doctrine that age brings wisdom
Henry L. Mencken |
|
|
 |
 nikol
|
|
Total Posts: 1483 |
Joined: Jun 2005 |
|
|
@silverside
It was not about option price... But about this: EVM "spends" mining resource to calculate B/S (or whatever) price. The calculator-program can be represented as low level assembly code. So my question is how to estimate that cost. |
... What is a man
If his chief good and market of his time
Be but to sleep and feed? (c) |
|
 |
 jslade
|
|
Total Posts: 1250 |
Joined: Feb 2007 |
|
|
You have to predict network congestion. I guess you can also hedge with this depending on your application: https://gastoken.io/ |
"Learning, n. The kind of ignorance distinguishing the studious." |
|
|
 |
|
ok ... computational cost rather than gas (petrol) cost ... clearly i have a lot to learn. |
|
|
 |
 nikol
|
|
Total Posts: 1483 |
Joined: Jun 2005 |
|
|
@jslade
Thank you very much ! Exactly what I was looking for. |
... What is a man
If his chief good and market of his time
Be but to sleep and feed? (c) |
|
|
 |
 among1
|
|
Total Posts: 18 |
Joined: Apr 2022 |
|
|
Great article, I think I have the same opinion as you. I hope you will have many more good articles. fall guys |
|
|
 |