KiiChain
  • Learn
    • What is KiiChain?
    • KiiChain
      • Vision of KiiChain
      • The Problems We Solve
      • Use Cases
      • Roadmap
      • Whitepaper
      • Business Model
    • Tokenomics
      • Intro Coin Details
      • Coin Unlocking Schedule
      • Utility
      • Evergreen Model
    • Getting Started
      • Get a Wallet
      • Download a Mobile Wallet
      • Set Up a Web Wallet
      • Connect Wallet to Explorer App
  • BUILD ON KIICHAIN
    • Developer Hub
    • Testnet Oro
    • Endpoints - Cosmos
      • EVM
        • VM
        • ERC20
        • FeeMarket
      • IBC
      • Kiichain
        • TokenFactory
      • Cosmwasm
      • Cosmos
        • Auth
        • Authz
        • Bank
        • Tendermint
        • Consensus
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Slashing
        • Staking
        • Tx
        • Upgrade
    • Developer Tools
      • RWA Protocol
      • Rust SDK
      • JS/TS SDK
        • Kiijs-evm
        • Kiijs-proto
      • Deploy a smart contract
      • Deploy a dApp
      • Testnet faucet
    • Smart Contracts
    • Modules
      • TokenFactory
      • EVM
  • Validate the Network
    • Getting Started
      • What is a delegator?
      • What is a validator?
    • Run a Validator / Full Node
      • Getting started
      • Step-by-Step Guide
        • Becoming a Validator
        • Recovering Legacy Addresses
      • Maintaining a validator
      • Incentive
      • Technical requirements
      • Validator Security
    • Economics
      • Staking Requirements
      • Delegation / Staking
      • Rewards
      • Block Rewards Formula
      • APR
    • Delegator Information
      • Choosing a validator
      • Directives of delegators
      • Incentive to stake
      • Security considerations
      • Risks to consider
  • KII AMBASSADORS
    • What does it mean to be a KiiAmbassador?
    • Your Core Responsibilities
    • Participation Perks
    • Points System & Performance
    • How to lose the Role
    • Evaluation Process
  • KIIEX
    • Set Up KIIEX Account
      • Contact OTC Desk
    • Connect to KIIEX APIs
      • Introduction
        • New endpoints
        • Revised calls
        • Behavior Changes
        • Revised Calls 3.5.0
      • Background Information
        • Message Frame
        • Standard Response Objects and Common Error Codes
        • Modules
        • Users, Accounts, and Permissions
        • Products and Instruments
        • Quotes and Orders
        • Time– and Date-Stamp Formats
        • The Trading Day
      • Users
        • Activate2FA
        • AddUserAffiliateTag
        • Authenticate2FA
        • AuthenticateUser
        • CancelUserReport
        • GetAllUnredactedUserConfigsForUser
        • GetL2Snapshot
        • GetLevel1
        • GetUnredactedUserConfigByKey
        • GetUserAccountInfos
        • GetUserAccounts
        • GetUserAffiliateCount
        • GetUserAfilliateTag
        • GetUserConfig
        • GetUserDevices
        • GetUserReportTickets
        • GetUserReportWriterResultRecords
        • GetValidate2FARequiredEndpoints
        • LogOut
        • RegisterNewDevice
        • SubscribeAccountEvents
        • SubscribeBlockTrades
        • SuscribeLevel1
        • SubscribeLevel2
        • SubscribeTicker
        • SubscribeTrades
        • UnsuscribeBlockTrades
        • UnsubscribeLevel1
        • UnsubscribeLevel2
        • UnsubscribeTicket
        • UnsuscribeTrades
        • UpdateUserAffiliateTag
        • Validate2FA
      • Accounts
        • GetAccountInfo
        • GenerateTransactionActivityReport
        • GenerateTradeActivityReport
        • GenerateTreasuryActivityReport
        • GetAllAccountConfigs
        • GetAccountPositions
        • GetTreasuryProductsForAccount
        • ScheduleTradeActivityReport
      • Trades
        • GetAccountTrades
        • GetAccountTransactions
        • GetAllOpenTradeReports
        • GetOpenTradeReports
        • GetTickerHistory
        • GetTradesHistory
      • OMS Orders
        • CancelAllOrders
        • CancelOrder
        • CancelQuote
        • CancelReplaceOrder
        • CreateQuote
        • GetOMSFeeTiers
        • GetOpenOrders
        • GetOpenQuotes
        • GetOrderFee
        • GetOrderHistory
        • GetOrderHistoryByOrderId
        • GetOrdersHistory
        • GetOrderStatus
        • ModifyOrder
        • SendOrder
        • SubmitBlockTrade
        • UpdateQuote
      • Products
        • GetProduct
        • GetProducts
      • Instruments
        • GetInstrument
        • GetInstruments
      • Tickets
        • CreateDepositTicket
        • CancelWithdraw
        • CreateWithdrawTicket
        • Deposit withdraw template
        • GetAccountDepositTransactions
        • GetAccountWithdrawTransactions
        • GetAllDepositRequestInfoTemplates
        • GetDeposits
        • GetDepositInfo
        • GetDepositTicket
        • GetDepositRequestInfoTemplate
        • GetOMSWithdrawFees
        • GetStandardTemplateExample
        • GetTetherRPCWithdrawTemplateExample
        • GetWithdrawFee
        • GetWithdraws
        • GetWithdrawTemplate
        • GetWithdrawTemplateTypes
        • GetWithdrawTicket
        • GetWithdrawTickets
        • SubmitDepositTicketComment
        • SubmitWithdrawTicketComment
      • Misc
        • Ping
Powered by GitBook
LogoLogo
On this page
Export as PDF
  1. BUILD ON KIICHAIN
  2. Developer Tools

Precompiled Contracts

KiiChain boasts a sophisticated framework of precompiled smart contracts meticulously crafted to harmonize with the Cosmos SDK functionalities, bolstering the network's efficiency and adaptability.

Last updated 10 months ago

KiiChain Precompiled Contracts

Among these contracts, the "Bank," "Staking," and "Rewards" contracts are integral components seamlessly integrated into Kiichain's operations through the Polaris EVM module, meticulously engineered by Berachain. These contracts play pivotal roles in managing sKII balances, orchestrating staking activities, and computing rewards, thereby fortifying the network's core functions while maintaining compatibility with the Ethereum Virtual Machine standards.

Contract Name
Contract Address
Description

Bank

0x4381dC2aB14285160c808659aEe005D51255adD7

The Bank contract governs the determination of sKII balances associated with individual addresses, serving as the cornerstone for transactional integrity and account management within Kiichain.

Staking

0xd9A998CaC66092748FfEc7cFBD155Aae1737C2fF

The Staking contract intricately manages the staking functionality within Kiichain, including the delegation of sKII tokens to validators and the maintenance of staking balances, ensuring the robustness and security of the network's consensus mechanism.

Rewards

0x55684E2CA2BACE0ADC512C1AFF880B15B8EA7214

The Rewards contract plays a crucial role in computing and distributing accumulated rewards stemming from the staking activity within Kiichain, fostering incentivization and participation among network participants through fair and transparent reward allocation mechanisms.

Swap

0xF948f57612E05320A6636a965cA4fbaed3147A0f (Only Testnet)

The custom-deployed Swap contract facilitates the seamless exchange of sKII tokens to KII and vice versa, enabling fluid token interoperability and liquidity provision within the Kiichain ecosystem, thereby enhancing user accessibility and utility across token functionalities.

Complementing these foundational contracts, the custom-deployed Swap contract serves as a pivotal component in enabling seamless token conversion between sKII and KII, further enriching Kiichain's utility and accessibility. Together, these contracts, spearheaded by the Polaris EVM module developed by Berachain, form the bedrock of Kiichain's operational infrastructure, fostering a cohesive ecosystem conducive to streamlined interactions and value exchange among participants.

To interact with these precompiled contracts, you can view them over at Berachain's Precompiled Contracts Docs.

For the Swap contract, below shows the two function signatures that you would require to interact with if exchanging tokens. NOTE: You will need KII to pay for gas fees when interacting with any of the smart contracts.

// exchange your KII for sKII
function buySkii() external payable

// exchange your sKII for KII
function sellSkii(uint256 amount) external

ABI for the Swap Contract

[
    {
      "inputs": [],
      "name": "bankContractAddress",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "buySkii",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "sellSkii",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ] 

https://github.com/berachain/polaris/tree/main/cosmos/precompile