-
Notifications
You must be signed in to change notification settings - Fork 117
Block timestamp not reliable for AMM #4483
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingcrt-v1project_tokenProject tokensProject tokensruntime
Description
Problem
Currently the buy/sell_on_amm extrinsics rely on the pallet_timestamp::get() function for checking the order deadline. However block timestamp is:
- Not Deterministic
- Easily manipulated by the validator
- Doesn' really prevent execution if the order gets executed at the end of the block despite the transaction being the first time-wise.
Solution
Don't use the timestamp logic provided by the pallet_timestamp.
Drop the deadline check or use a offline source for the timestamp value
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcrt-v1project_tokenProject tokensProject tokensruntime