You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the next version of the contract will emit the price field in the Swap event, this Beta version the price need to be fetched somewhere else, either getLogs at that block or some 3rd-party API, and keep them in storage along with the wallet history.
Note: price = base/quote, priceR = R/USD which require client to pass an additional INDEX_R for reserve with a stablecoin.
Position Entry Price: price above
Position Entry Value = amountIn (in ETH) x priceR ($)
Position Current Value = (how value is currently calculated)
Value Changed = CurrentValue - EntryValue
PnL rate = ValueChanged / EntryValue (%)
The text was updated successfully, but these errors were encountered:
the next version of the contract will emit the
price
field in theSwap
event, this Beta version the price need to be fetched somewhere else, eithergetLogs
at that block or some 3rd-party API, and keep them in storage along with the wallet history.Or deploy a workaround Helper: https://github.com/derivable-labs/derivable-core/blob/dev/contracts/support/Helper.sol
Note:
price
= base/quote,priceR
= R/USD which require client to pass an additional INDEX_R for reserve with a stablecoin.Position Entry Price:
price
abovePosition Entry Value = amountIn (in ETH) x priceR ($)
Position Current Value = (how value is currently calculated)
Value Changed = CurrentValue - EntryValue
PnL rate = ValueChanged / EntryValue (%)
The text was updated successfully, but these errors were encountered: