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

AMM proofs. #9

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions amm/Move.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
# @generated by Move, please check-in and do not edit manually.

[move]
version = 2
manifest_digest = "BA60742D989FA8AAF0ABA277B527703746AE7603E919D2A793FFE9C95313894D"
version = 3
manifest_digest = "D77321333DFC6F49090706CFA7ACA2A51801DCDA5C05B251759DCD2B9681C720"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ name = "Sui" },
{ id = "Sui", name = "Sui" },
]

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }
id = "MoveStdlib"
source = { local = "../../sui/crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }
id = "Prover"
source = { local = "../../sui/crates/sui-framework/packages/prover" }

dependencies = [
{ name = "MoveStdlib" },
{ id = "MoveStdlib", name = "MoveStdlib" },
]

[[move.package]]
id = "Sui"
source = { local = "../../sui/crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
{ id = "Prover", name = "Prover" },
]

[move.toolchain-version]
compiler-version = "1.32.2"
compiler-version = "1.39.0"
edition = "2024.beta"
flavor = "sui"
3 changes: 2 additions & 1 deletion amm/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name = "AMM"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }
# Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }
Sui = { local = "../../sui/crates/sui-framework/packages/sui-framework", override = true }

[addresses]
amm = "0x0"
10 changes: 10 additions & 0 deletions amm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ In case of AMMs we want a single smart contract to be able to create multiple di
In this implementation, (1.) was used. This is because currently there's no way to dynamically create types in Move so acquiring a new one time witness necessary for the pool creation in (2.) would require publishing a new module each time. This would mean that it would not be possible (or would be difficult) to enable users to create new pools from the client side.

The limitation of (1.) though is that there can be only one `Pool` per token pair.

## Sui Move Prover
* generate boogie
```
sui-move build --generate-boogie
```
* verify boogie
```
boogie -doModSetAnalysis -vcsCores:12 -verifySeparately -vcsMaxKeepGoingSplits:12 -vcsSplitOnEveryAssert -vcsFinalAssertTimeout:600 output.bpl
```
Loading