feat(amm)!: add transaction deadlines to swap and liquidity instructions

All mutable AMM instructions now require a `deadline: u64` field (Unix
timestamp in milliseconds). Enforcement uses the LEZ-native timestamp
validity window set on ProgramOutput; the runtime rejects the
transaction if the sequencer submission timestamp is at or past the
deadline.

BREAKING CHANGE: AddLiquidity, RemoveLiquidity, SwapExactInput,
SwapExactOutput, and NewDefinition instruction variants now require a
`deadline` field.

Closes #8
This commit is contained in:
r4bbit
2026-04-30 13:27:21 +02:00
parent 37fc2ea088
commit 216e92d25a
10 changed files with 280 additions and 21 deletions
+7 -3
View File
@@ -2864,10 +2864,11 @@ dependencies = [
[[package]]
name = "spel-framework"
version = "0.2.0"
source = "git+https://github.com/logos-co/spel.git?tag=v0.2.0-rc.2#9005e9fbbd78b0530412f9987273f753ed32eb2d"
source = "git+https://github.com/logos-co/spel.git?rev=9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3#9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3"
dependencies = [
"borsh",
"nssa_core",
"serde_json",
"spel-framework-core",
"spel-framework-macros",
]
@@ -2875,24 +2876,27 @@ dependencies = [
[[package]]
name = "spel-framework-core"
version = "0.2.0"
source = "git+https://github.com/logos-co/spel.git?tag=v0.2.0-rc.2#9005e9fbbd78b0530412f9987273f753ed32eb2d"
source = "git+https://github.com/logos-co/spel.git?rev=9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3#9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3"
dependencies = [
"borsh",
"nssa_core",
"serde",
"serde_json",
"sha2",
"syn 2.0.117",
"thiserror 1.0.69",
]
[[package]]
name = "spel-framework-macros"
version = "0.2.0"
source = "git+https://github.com/logos-co/spel.git?tag=v0.2.0-rc.2#9005e9fbbd78b0530412f9987273f753ed32eb2d"
source = "git+https://github.com/logos-co/spel.git?rev=9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3#9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3"
dependencies = [
"proc-macro2",
"quote",
"serde_json",
"sha2",
"spel-framework-core",
"syn 2.0.117",
]
+1 -1
View File
@@ -10,7 +10,7 @@ name = "token"
path = "src/bin/token.rs"
[dependencies]
spel-framework = { git = "https://github.com/logos-co/spel.git", tag = "v0.2.0-rc.2", package = "spel-framework" }
spel-framework = { git = "https://github.com/logos-co/spel.git", rev = "9e7f2754e1d4cdb3ea36e63b1ff86c3af55488d3", package = "spel-framework" }
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.0-rc1" }
risc0-zkvm = { version = "=3.0.5", default-features = false }
token_core = { path = "../../core" }