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

v6.0.0 Release: #923

Merged
merged 203 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
372bedf
Initial commit
Gauthamastro Dec 1, 2023
a6dcb89
Initial commit
Gauthamastro Dec 1, 2023
98c6d2a
Initial Draft
Gauthamastro Dec 1, 2023
881c745
TODO
Gauthamastro Dec 1, 2023
2ba5fe2
Add Egress message
Gauthamastro Dec 1, 2023
7234c1d
Session handler
Gauthamastro Dec 1, 2023
f6e089d
Added Trading fee handling logic to runtime
Gauthamastro Dec 2, 2023
c79ee95
Add total shares issued in AddLiquidity command
Gauthamastro Dec 3, 2023
d3f2644
Add egress messages to Blockimport
Gauthamastro Dec 3, 2023
314dd40
Add more fields to AddLiquidityResult
Gauthamastro Dec 3, 2023
9793438
Burn fraction
Gauthamastro Dec 3, 2023
61c7151
Remove Liquidity Results
Gauthamastro Dec 3, 2023
3c2f912
Add LP in remove liquidity
Gauthamastro Dec 3, 2023
657db3d
Update Fee Structure ingress variant
Gauthamastro Dec 3, 2023
06a6359
FEE POT PALLET ID CONST
Gauthamastro Dec 3, 2023
8cae4ac
Added logic for handling egress messages and LMP ingress messages
Gauthamastro Dec 7, 2023
79ccb5b
LMP calculations based on trading fee
Gauthamastro Dec 7, 2023
2fbe2ca
Added LMP storage for Fees paid.
Gauthamastro Dec 7, 2023
acab437
Almost there.
Gauthamastro Dec 7, 2023
e71909e
LMP Epoch handling
Gauthamastro Dec 7, 2023
130c2f5
LMP Epoch handling
Gauthamastro Dec 12, 2023
f90e931
LMP score computation
Gauthamastro Dec 16, 2023
a0665a9
LMP score computation
Gauthamastro Dec 18, 2023
d252609
Almost there
Gauthamastro Dec 18, 2023
9a98b2f
TODO list
Gauthamastro Dec 18, 2023
f44247a
OCEX compiles
Gauthamastro Dec 19, 2023
93aab4f
Added egress message support
Gauthamastro Dec 19, 2023
77ee922
Clean up warnings
Gauthamastro Dec 19, 2023
aa956e3
Integrate LiquidityMining trait to OCEX
Gauthamastro Dec 19, 2023
c87f4f8
Almost done
Gauthamastro Dec 19, 2023
b43c064
Almost done
Gauthamastro Dec 19, 2023
06758ae
Here we go LP pallet
Gauthamastro Dec 19, 2023
15d18a3
Make it compile
Gauthamastro Dec 20, 2023
537eb0a
TODOs
Gauthamastro Dec 20, 2023
4b3d001
Rewards ready signal
Gauthamastro Dec 20, 2023
c404b82
Almost there
Gauthamastro Dec 20, 2023
4a57173
Force claim extrinsic
Gauthamastro Dec 20, 2023
d4b591e
I am tired!!!
Gauthamastro Dec 20, 2023
e3f8ff5
Still going
Gauthamastro Dec 20, 2023
7440f70
Calculation of rewards
Gauthamastro Dec 21, 2023
4a4fffe
LMP and CrowdSourceLMP is getting ready.
Gauthamastro Dec 21, 2023
4484f96
Both pallets compile
Gauthamastro Dec 21, 2023
83364a4
Withdraw trading fees every snapshot
Gauthamastro Dec 21, 2023
0f89bf8
Withdraw fees egress message
Gauthamastro Dec 21, 2023
9a9c74c
Remove maxEncodedLen
Gauthamastro Dec 21, 2023
bf8a11e
Fees Transfers to pot account on chain
Gauthamastro Dec 21, 2023
8f9fda7
Add Price oracle map to egress
Gauthamastro Dec 21, 2023
c3213cd
Add Price oracle map to egress
Gauthamastro Dec 21, 2023
c09b08f
Price Oracle is integrated
Gauthamastro Dec 21, 2023
d0f4299
Merge branch 'Develop' into gj/lmp
Gauthamastro Dec 22, 2023
f02b566
Delete old liquidity pallet
Gauthamastro Dec 22, 2023
ec65f19
Push Cargo.lock
Gauthamastro Dec 22, 2023
f880682
Added mock
zktony Jan 2, 2024
69e5623
Added tests
zktony Jan 9, 2024
35157b1
Removed solved todos
zktony Jan 9, 2024
13443b6
Removed solved todos
zktony Jan 9, 2024
8b0426b
Remove comments
zktony Jan 9, 2024
12a2e8a
Added test
zktony Jan 9, 2024
abd76fb
Prevent replay attack on LMP rewards
Gauthamastro Jan 24, 2024
1bf985c
RPC for top LMP accounts
Gauthamastro Jan 24, 2024
3827d33
cargo clippy and fmt
Gauthamastro Jan 24, 2024
42f5596
Try to build runtime
Gauthamastro Jan 24, 2024
98a4054
Merge branch 'gj/lmp' into zk-test-lmp
Gauthamastro Jan 24, 2024
8d7a959
test runtime build
Gauthamastro Jan 24, 2024
0a89e49
crago fmt, clippy
Gauthamastro Jan 25, 2024
31f6869
make cargo test compile
Gauthamastro Jan 25, 2024
c453bb6
taplo fmt
Gauthamastro Jan 26, 2024
ced35a9
Merge remote-tracking branch 'origin/zk-test-lmp' into zk-test-lmp
Gauthamastro Jan 26, 2024
9828ad4
taplo fmt
Gauthamastro Jan 26, 2024
dd33fe1
update fees to 0.1% for both maker and taker
Gauthamastro Feb 7, 2024
df0272d
update fees to 0.1% for both maker and taker
Gauthamastro Feb 7, 2024
f935ab2
make everything stable compatible
Gauthamastro Feb 8, 2024
eca5ebb
make everything stable compatible
Gauthamastro Feb 8, 2024
858bdc4
make everything stable compatible
Gauthamastro Feb 8, 2024
2f8319a
make everything stable compatible
Gauthamastro Feb 8, 2024
c038647
feat: add trade_id getter
nuel77 Feb 12, 2024
d1156b8
hash trade id
Gauthamastro Feb 12, 2024
bc2edf2
Order key
Gauthamastro Feb 13, 2024
7a0cc5a
Order key
Gauthamastro Feb 13, 2024
1655997
Order order
Gauthamastro Feb 13, 2024
18d4cd9
Merge branch 'Develop' into gj/lmp
Gauthamastro Feb 18, 2024
d8a5c83
Bug fix
Gauthamastro Feb 18, 2024
6c4d901
Round off in average price calculation
Gauthamastro Feb 19, 2024
1275457
Add RPCs for frontend
Gauthamastro Feb 20, 2024
479ac90
Add RPCs for frontend
Gauthamastro Feb 20, 2024
c03d27f
add #[allow(dead_code)]
Gauthamastro Feb 20, 2024
3b85cd9
cargo fmt
Gauthamastro Feb 20, 2024
a2aba36
cargo fmt
Gauthamastro Feb 20, 2024
8477af8
Minor changes
Gauthamastro Feb 20, 2024
57eab3d
Fixed formatting
zktony Feb 20, 2024
05ec3a3
Fixed tests
zktony Feb 21, 2024
66e0da1
Added tests for OCEX and LMP Pallet (#895)
zktony Feb 21, 2024
91509ed
cargo clippy
Gauthamastro Feb 22, 2024
3e8b885
cargo fmt
Gauthamastro Feb 22, 2024
81faec1
add #[pallet::compact] for balance parameter
Gauthamastro Feb 22, 2024
f5b47db
add #[pallet::compact] for balance parameter (#917)
Gauthamastro Feb 22, 2024
c3af2b7
Update trading config spec
Gauthamastro Feb 22, 2024
310cea7
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
Gauthamastro Feb 22, 2024
783207a
Added code for auction
zktony Feb 23, 2024
e16e8fe
Create a const for epoch length
Gauthamastro Feb 23, 2024
cbd8056
Merge branch 'gj/lmp' into ksr/fee-auction
zktony Feb 23, 2024
f942698
Updated lmp_config ext
zktony Feb 23, 2024
2869b79
Updated url
zktony Feb 23, 2024
0193d7b
Fix TODOs and Auction
Gauthamastro Feb 24, 2024
3fa830c
Clean up code base
Gauthamastro Feb 24, 2024
5afe264
Remove Withdrawal fees collected storage and extrinsic
Gauthamastro Feb 24, 2024
fe5ebc9
Merge branch 'ksr/fee-auction' of https://github.com/Polkadex-Substra…
zktony Feb 24, 2024
93ad5b3
Fixed lmp config
zktony Feb 26, 2024
abc2d2a
Added test fikes
zktony Feb 26, 2024
0d0ab78
Testnet modifications
Gauthamastro Feb 27, 2024
d9969f7
fix comment
Gauthamastro Feb 27, 2024
259377a
Fix bug
Gauthamastro Feb 27, 2024
9d41d24
Testnet modifications
Gauthamastro Feb 27, 2024
7088c37
Update serde serialize
Gauthamastro Feb 28, 2024
6fc0b06
Added tests
zktony Feb 28, 2024
c08c9bf
Make it compile under no_std
Gauthamastro Feb 28, 2024
1494c0a
Add sanity check
Gauthamastro Feb 28, 2024
996d929
Modify LMP Config settings
Gauthamastro Feb 29, 2024
e0b0b4c
Reorganised Ingress and Egress messages plus LMPEpoch Config rule upd…
Gauthamastro Feb 29, 2024
dd149cc
LMP index and configs
Gauthamastro Feb 29, 2024
69c9ba1
add serde for LMP types
Gauthamastro Feb 29, 2024
a10d9f9
clippy
Gauthamastro Feb 29, 2024
866c978
Added tests
zktony Feb 29, 2024
f1bb3e6
Add serde_as for LMPCOnfig
Gauthamastro Mar 1, 2024
341f9c3
handle corner case of epoch zero in start_new_lmp_epoch
Gauthamastro Mar 1, 2024
bc78977
fix compile
Gauthamastro Mar 1, 2024
d3f488c
Add events for LMP scores
Gauthamastro Mar 1, 2024
ae3f3f8
Fix LMPScoreCalculation
Gauthamastro Mar 2, 2024
c441908
Handle Finalizing epochs in case of engine downtime
Gauthamastro Mar 2, 2024
5b69201
Added more tests
zktony Mar 3, 2024
e11b53d
Make trading pair a string in rpC
Gauthamastro Mar 4, 2024
5d3ba81
Added benchmarks
zktony Mar 4, 2024
0b32a7f
Register Offchain ext in RPC
Gauthamastro Mar 4, 2024
b4dc519
Added benchmark for on_init
zktony Mar 4, 2024
8b33f90
Fixed compilation issues
zktony Mar 4, 2024
88df680
Merge branch 'ksr/lmp-testing' into ksr/ocex-benchmarks
zktony Mar 4, 2024
6a9ed49
Fixed tests
zktony Mar 4, 2024
6eb3045
Add RPCs for LMP scores
Gauthamastro Mar 5, 2024
bf2eeba
Merge branch 'ksr/fee-auction' into ksr/updated-lmp-config-ext
Gauthamastro Mar 5, 2024
f65d1e4
Updated lmp config ext (#919)
Gauthamastro Mar 5, 2024
c0583bf
Added tests
zktony Mar 5, 2024
63c4c45
Updated weights
zktony Mar 5, 2024
4e7deb4
Fixed formatting
zktony Mar 5, 2024
00a33a9
Updated rpcs
zktony Mar 5, 2024
817384a
Fixed rpcs
zktony Mar 5, 2024
b918bd5
Added OCEX Benchmarks and Tests (#920)
zktony Mar 5, 2024
e8896fc
Trading Fee Auction (#918)
zktony Mar 5, 2024
01607f0
Add Rounding off for ocex pallet
Gauthamastro Mar 5, 2024
561dd08
Add Rounding off for ocex pallet
Gauthamastro Mar 5, 2024
2642eca
Fixed constant file tests
zktony Mar 5, 2024
35a4ae0
cargo fmt & fixes
Gauthamastro Mar 5, 2024
8170595
Fixed rpc
zktony Mar 5, 2024
b5f8292
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
Gauthamastro Mar 5, 2024
16f6855
Fixed Epoch issue
zktony Mar 5, 2024
6e8e187
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
Gauthamastro Mar 5, 2024
1b2cb0e
Unpluged CS Pallet
zktony Mar 5, 2024
7a7d449
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
Gauthamastro Mar 5, 2024
0e65cf0
Fixed tests
zktony Mar 5, 2024
9d8b4ff
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
Gauthamastro Mar 5, 2024
af0189b
cargo fmt & fixes
Gauthamastro Mar 5, 2024
1a97dba
Updated weihgts
serhii-temchenko Mar 5, 2024
23a916a
Fixed integration tests
zktony Mar 5, 2024
63504bd
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
zktony Mar 5, 2024
23fb1d6
cargo fmt & fixes
Gauthamastro Mar 5, 2024
7fcd0ac
Renamed to evm_withdraw
zktony Mar 5, 2024
0e46277
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
zktony Mar 5, 2024
f4c4a28
cargo fmt & fixes
Gauthamastro Mar 5, 2024
f0fdc0e
Fixed thea benchmarks
zktony Mar 5, 2024
c1c1522
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
zktony Mar 5, 2024
01a15d6
Fix comments
Gauthamastro Mar 5, 2024
334b025
Fix comments
Gauthamastro Mar 5, 2024
7f92492
Fixed benchmark issue
zktony Mar 5, 2024
24d03a0
Fixed benchmark
zktony Mar 5, 2024
8e23baf
Merge remote-tracking branch 'origin/gj/lmp' into gj/lmp
zktony Mar 5, 2024
0a474bf
Updated pallets weights
serhii-temchenko Mar 5, 2024
369dd1c
cargo fmt
Gauthamastro Mar 6, 2024
632d051
cargo fmt & fixes
Gauthamastro Mar 6, 2024
039df27
taplo fmt
Gauthamastro Mar 6, 2024
8fe6abb
copyrights
Gauthamastro Mar 6, 2024
01c6c71
docs
Gauthamastro Mar 6, 2024
da1ea6e
invalid TODO
Gauthamastro Mar 6, 2024
b8364e4
Add 0.25% constraint in LMP
Gauthamastro Mar 6, 2024
aabb855
cargo fmt
Gauthamastro Mar 6, 2024
0759985
Removed sudo access
zktony Mar 6, 2024
1187ee8
Commented whitelist checking
zktony Mar 6, 2024
f9c8d5a
Fixed test
zktony Mar 6, 2024
b569ae9
Trading Fees, LMP and much more (#884)
Gauthamastro Mar 6, 2024
a151e4d
Reduce withdrawal delay
Gauthamastro Mar 6, 2024
01ad8ad
Merge branch 'mainnet-release' into Develop
Gauthamastro Mar 6, 2024
319ca69
Bump major version
Gauthamastro Mar 6, 2024
601e1dd
Bump major version
Gauthamastro Mar 6, 2024
9e21dfe
Removed sudo access from Asset allowlisting ext (#922)
Gauthamastro Mar 6, 2024
ecaff31
update is_claimed flag
Gauthamastro Mar 6, 2024
1d02d87
added test
zktony Mar 6, 2024
5c18fb7
removed tarpuline file
zktony Mar 6, 2024
e5f262f
Claim reward bug test (#924)
Gauthamastro Mar 7, 2024
871d1c1
Update pallets/ocex/src/validator.rs
Gauthamastro Mar 7, 2024
e109824
Update pallets/ocex/src/benchmarking.rs
Gauthamastro Mar 7, 2024
c5cae1e
Remove old ingress module
Gauthamastro Mar 7, 2024
a1a80e5
Update pallets/ocex/src/settlement.rs
Gauthamastro Mar 7, 2024
428dc15
Update pallets/liquidity-mining/src/tests.rs
Gauthamastro Mar 7, 2024
1c62d60
Remove unused type
Gauthamastro Mar 7, 2024
1a40ca7
fix ci
Gauthamastro Mar 7, 2024
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
89 changes: 58 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ members = [
"rpc/swap",
"rpc/assets/runtime-api",
"pallets/pdex-migration",
"pallets/liquidity-mining",
"pallets/ocex",
"pallets/ocex/rpc",
"pallets/ocex/rpc/runtime-api",
Expand All @@ -40,7 +41,6 @@ members = [
"primitives/thea",
"primitives/bls",
"pallets/thea",
"pallets/liquidity",
"pallets/thea-executor",
"pallets/thea-message-handler",
"pallets/rewards/rpc",
Expand All @@ -61,14 +61,14 @@ default-members = [
"pallets/pdex-migration",
"pallets/ocex",
"pallets/ocex/rpc",
"pallets/liquidity-mining",
"pallets/ocex/rpc/runtime-api",
"pallets/rewards",
"primitives/orderbook",
"primitives/polkadex",
"primitives/thea",
"primitives/bls",
"pallets/thea",
"pallets/liquidity",
"pallets/thea-executor",
"pallets/rewards/rpc",
"pallets/rewards/rpc/runtime-api",
Expand Down
2 changes: 1 addition & 1 deletion check-all-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ cargo build --features try-runtime || exit
cargo build --features runtime-benchmarks || exit
./target/debug/polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 || exit
cargo clippy -- -D warnings || exit
cargo test || exit
RUSTFLAGS="-D warnings" cargo test || exit
2 changes: 1 addition & 1 deletion nodes/mainnet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadex-node"
version = "5.5.0"
version = "6.0.0"
authors = ["Polkadex OÜ <https://polkadex.trade>"]
description = "Polkadex main blockchain"
edition = "2021"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
[package]
name = "liquidity"
authors = ["Polkadex Authors"]
description = "Pallet for adding liquidity through governance"
name = "pallet-lmp"
version = "1.0.0"
authors = ["Gautham J <[email protected]>"]
edition = "2021"
license = "GNU GPL v3"
homepage = "https://polkadex.trade"
version = "1.1.0"
repository = "https://github.com/Polkadex-Substrate/Polkadex/"
description = "Polkadex Liquidity Mining pallet"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
log = "0.4.20"
parity-scale-codec = { workspace = true, default-features = false }
scale-info = { workspace = true, default-features = false, features = ["derive"] }
frame-support = { default-features = false, workspace = true }
frame-system = { default-features = false, workspace = true }
sp-runtime = { default-features = false, workspace = true }
frame-system = { workspace = true, default-features = false }
frame-support = { workspace = true, default-features = false }
sp-std = { workspace = true, default-features = false }
polkadex-primitives = { workspace = true, default-features = false }
frame-benchmarking = { workspace = true, default-features = false, optional = true }
pallet-timestamp = { workspace = true, default-features = false }
sp-io = { workspace = true, default-features = false }
sp-runtime = { workspace = true, default-features = false }
orderbook-primitives = { path = "../../primitives/orderbook", default-features = false }
polkadex-primitives = { path = "../../primitives/polkadex", default-features = false }
rust_decimal = { workspace = true, default-features = false }

[dev-dependencies]
pallet-ocex-lmp = { path = "../ocex", default-features = false }
pallet-assets = { workspace = true, default-features = false }
pallet-balances = { workspace = true, default-features = false }
pallet-ocex-lmp = { path = "../ocex", default-features = false }
sp-core = { workspace = true, default-features = false }
pallet-timestamp = { workspace = true, default-features = false }
sp-application-crypto = { workspace = true }
sp-io = { workspace = true, default-features = false }
sp-core = { workspace = true, default-features = false }

[features]
default = ["std"]
std = [
"sp-core/std",
"sp-io/std",
"pallet-assets/std",
"pallet-balances/std",
"pallet-ocex-lmp/std",
"frame-benchmarking?/std",
"log/std",
"parity-scale-codec/std",
"scale-info/std",
"frame-support/std",
"frame-system/std",
"frame-support/std",
"scale-info/std",
"orderbook-primitives/std",
"polkadex-primitives/std",
"rust_decimal/std",
"sp-runtime/std",
"sp-std/std",
"polkadex-primitives/std",
"pallet-ocex-lmp/std",
"pallet-assets/std",
"pallet-balances/std",
"pallet-timestamp/std",
"sp-io/std",
"sp-application-crypto/std",
"sp-io/std",
"sp-core/std",
]
runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]
runtime-benchmarks = ["sp-runtime/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"]
Loading
Loading