diff --git a/KIPs/kip-226.md b/KIPs/kip-226.md index 0efaea0..1c969ad 100644 --- a/KIPs/kip-226.md +++ b/KIPs/kip-226.md @@ -2,7 +2,7 @@ kip: 226 title: Consensus liquidity for Kaia author: Lewis (@hyeonLewis), Ian (@ian0371), Ollie (@blukat29), Lake (@hyunsooda), and Aidan (@aidan-kwon) -discussions-to: TBD +discussions-to: https://github.com/kaiachain/kips/issues/35 status: Draft type: Core created: 2024-11-07 @@ -23,6 +23,7 @@ requires: 81, 82 - [CLDEX](#cldex) - [Consensus](#consensus) - [On-chain Governance](#on-chain-governance) +- [JSON-RPC API](#json-rpc-api) - [Rationale](#rationale) - [Backward Compatibility](#backward-compatibility) - [Copyright](#copyright) @@ -135,6 +136,7 @@ The CLDEX is a decentralized exchange on Kaia for consensus liquidity based on U - The 7-day period begins automatically upon LP token creation - No separate withdrawal request is required + - Additional staking or partial withdrawal is allowed but it'll reset the 7-day period 2. There are separate steps needed for staking and unstaking. - Providing LP Token leads to staking automatically. @@ -226,6 +228,50 @@ The on-chain governance will be maintained except using `StakingTrackerV2` inste 3. After the proposal is approved, the new `StakingTrackerV2` contract will be set for Voting 4. Replace all `StakingTracker` contracts of `CnStaking` with `StakingTrackerV2` +## JSON-RPC API + +### `kaia_getStakingInfo` + +The new field `clStakingInfo` will be added to the response of `kaia_getStakingInfo` to provide the CLStaking information. + +- Example + + ```json + // Request + curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"kaia_getStakingInfo", "params":["latest"],"id":1}' http://localhost:8551 + // Response + { + "jsonrpc":"2.0", + "id":1, + "result": { + KIRAddr: "0x6c38302e00dbac91712d93ab94b4a827698be6f1", + PoCAddr: "0xc8757a6b5b427ddcd5781c9faa5e41318d32336a", + blockNum: 109, + clStakingInfos: [{ + clNodeId: "0x4e37f45ab0385782afbbc713f4b0d5f936ba2201", + clPoolAddr: "0x07987c97befca39f6fcf884271cc65f85d8d1a5b", + clRewardAddr: "0x10fd8bf375208e62077016d58329d2986eed45ce", + clStakingAmount: 5000000 + }, { + clNodeId: "0x681f56e59003172201d155ca8a5dbe0ad0993641", + clPoolAddr: "0xe1f42e74dbf400affd54553a7c258b88ab3e2a8f", + clRewardAddr: "0x7b056bafbddb86de6090afb572880d34451a46d0", + clStakingAmount: 10000000 + }], + councilNodeAddrs: ["0x4e37f45ab0385782afbbc713f4b0d5f936ba2201", "0x681f56e59003172201d155ca8a5dbe0ad0993641", "0x7fcd59726eb6560f385c195ff33db9385aadf644", "0x15245589f68c14690cbcc3131256aeb594a006f7"], + councilRewardAddrs: ["0x1ffdee22fa4df55d66dea1d9435343be2c0d3b12", "0xf411483d602620203bbfc9ba87e38bcfb6430b90", "0x2836a57c4fc95537ba2c3b1587d2a7d195a278e6", "0x6b4679e1a0aa81ffcab3e0b70044b3c0928b7f44"], + councilStakingAddrs: ["0xcf24c0f2e12c534046f32d1bd072e9eabbe1012d", "0xd08ace335231e523c5cf7c0b1078a7365f3a606d", "0x2c701c0bf6792a4643dc095547494357b92b5d72", "0x4539ccc933283507d11aff505ea3fb47fad1d282"], + councilStakingAmounts: [5000000, 10000000, 15000000, 20000000], + gini: 0.13, + kcfAddr: "0x6c38302e00dbac91712d93ab94b4a827698be6f1", + kefAddr: "0x6c38302e00dbac91712d93ab94b4a827698be6f1", + kffAddr: "0xc8757a6b5b427ddcd5781c9faa5e41318d32336a", + kifAddr: "0xc8757a6b5b427ddcd5781c9faa5e41318d32336a", + useGini: false + } + } + ``` + ## Rationale ### Separate Reward Address