Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify all trading events into the one generic one #755

Open
mrq1911 opened this issue Feb 6, 2024 · 5 comments · May be fixed by #910
Open

Unify all trading events into the one generic one #755

mrq1911 opened this issue Feb 6, 2024 · 5 comments · May be fixed by #910
Assignees

Comments

@mrq1911
Copy link
Member

mrq1911 commented Feb 6, 2024

Swapped { 
    who: AccountId, 
    pool: PoolType, 
    operation: ( Buy | Sell ), 
    asset_in: AssetId, 
    asset_out: AssetId, 
    amount_in: Balance, 
    amount_out: Balance,
    fee_rate: Permill
    batch: Option<u256> 
}

batch is nonce that router is setting on start of execution and resetting to None after

add all trading events in the Omnipool, Stableswap, XYK & OTC with this one
depreciate all the old trading related fees (will be removed in future)

@jak-pan
Copy link
Contributor

jak-pan commented Feb 6, 2024

We should probably include fee as part of this

@jak-pan
Copy link
Contributor

jak-pan commented Feb 21, 2024

related to galacticcouncil/Basilisk-node#469

@jak-pan
Copy link
Contributor

jak-pan commented Feb 23, 2024

Add id if the tx was fired from router

@jak-pan
Copy link
Contributor

jak-pan commented Apr 22, 2024

Swapped { 
    who: AccountId, 
    pool: PoolType, 
    operation: ( Buy | Sell ), 
    asset_in: AssetId, 
    asset_out: AssetId, 
    amount_in: Balance, 
    amount_out: Balance,
    fee_rate: Permill
    batch: Option<u256> 
}

batch is nonce that router is setting on start of execution and resetting to None after

add all trading events in the Omnipool, Stableswap, XYK & OTC with this one depreciate all the old trading related fees (will be removed in future)

I am using swap_type: exact_in || exact_out instead of buy | sell + flag partial : bool when user indicated he is ok with partial execution + it doesn't need to be pool - we can have OTC or off chain matched swaps. So I would maybe suggest firing name of the function called in operation. I.E. XYKSell | XYKBuy or just keep the area e.g. XYK | Omnipool. + I would add some kind of id. I see batch nonce is this unique in any way?

@jak-pan
Copy link
Contributor

jak-pan commented Apr 22, 2024

I'm experimenting with some unique swap id for off chain solving as we will probably want to be able to accept multiple non-ordered swaps from one person to be executed once the conditions match. I would probably like to see this info. We will however need to add this to all swap calls to retain this.

@Roznovjak Roznovjak self-assigned this Sep 13, 2024
@Roznovjak Roznovjak linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants