Matthias
Matthias
Here's the logic of the golang code: position notional = amm.GetQuoteReserveAmt(position.Size_.Abs(), dir) * amm.P FundingPayment = marketLatestCumulativePremiumFraction - position.LatestCumulativePremiumFraction * position.Size_ RealizedPnl = UnrealizedPnl(currentPosition, positionNotional) positionValue = currentPosition.Margin + resp.RealizedPnl...
Should we require the base = quote at init by design?
maybe initialize pool with just phi instead of reserves
Here's the erorr message from the receipt (wasmcaller) ```ts error: transaction execution reverted (action="sendTransaction", data=null, reason=null, invocation=null, revert=null, transaction={ "data": "", "from": "0xC0f4b45712670cf7865A14816bE9Af9091EDdA1d", "to": "0x0000000000000000000000000000000000000802" }, receipt={ "_type": "TransactionReceipt", "blobGasPrice":...
Can be replicated on SAI by setting the value on this branch from 2_000_000 to 200_000 for the gas limit. https://github.com/NibiruChain/sai-perps/blob/3e2aa3a1711ad06a5b8b2d3c93f2df28f09e11ac/scripts/localnet_test/test_simple_evm.ts#L18
`debug_traceTransaction` was empty for me when running out of gas during wasm precompile operation: ```bash ❯ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xd7371d317b2b62591225ecbb852e6a9206a60078f946cdc4311ab04d54f99b10"],"id":1}' http://localhost:8545 {"jsonrpc":"2.0","id":1,"result":{"failed":true,"gas":30000000,"returnValue":"","structLogs":[]}} ```