Improve Event Data #753
Replies: 3 comments 5 replies
-
During offsite, we discussed a solution that will allow on-chain calculation for relayerFee. Highlights:
// @param price from the VAMM
// The invariant data should also include a `sendingChainAmount`
function prepare(InvariantTransactionData invariant, uint256 price ) { ... } |
Beta Was this translation helpful? Give feedback.
-
After a conversation with @rhlsthrm : To get the profit for a successfully fulfilled transaction, you must pass the following into the
To get the cost of an expired transaction, you must pass in the following:
This is a lot of data to be passed in, and adds unnecessary overhead. If the true requirement is easier ROI, then the better route is to lean on a comprehensive subgraph collation layer (especially since the true ROI would not be available without going between chains anyway). I propose we do not make any contract changes with respect to making it easier to calculate ROI on the subgraph. |
Beta Was this translation helpful? Give feedback.
-
Scrapping! |
Beta Was this translation helpful? Give feedback.
-
Summary
By including fee data in the events, we would be able to get the fees earned from the subgraphs much easier.
Motivation
It is extremely difficult to calculate ROI from the transactions, and being able to include the fees in the event data would be hugely valuable. Right now the easiest way to get that information is by using internal router-monitoring tools (i.e. Prometheus)
Proposed Solution
The
TransactionManager
should be updated to calculate the receiver amount based on itemized fee data passed into theprepare
function:Additionally, the event can include the
gasConsumed
andrelayerFeePaid
by the transaction.Test Cases
The following should be implemented:
Outstanding Questions
routerFee
andgasCosts
be hardcoded into theTransactionManager
? (if hardcoding gas costs, should add the rate of transacting asset to native asset in the fee details)Tasks
TransactionData
to includesendingAmount
VariantTransactionData
to includereceivingAmount
prepare
to calculate the receiving amount properlyBeta Was this translation helpful? Give feedback.
All reactions