Exchange
This is a smart contract to expand KIP7 that is created with every liquidity pair. The Factory deploys this as new pool creation is requested. Although the Factory actually stores the two tokens of a pair and swapping takes place through it, the Exchange Contract must be called for liquidity to be provided or taken.
Code
Github Link: (Will be updated after official launch)
Address
Contract adress after production is deployed (scope link)
Events, Read-Only Functions, and State-Changing Functions
Events
Transfer
KIP7 Standard
Event log of Transfer/Mint/Burn
Approval
KIP7 Standard
Event log of Approvals
ChangeMiningRate
Event log of mining rate change
ChangeFee
Event log of trading fee rate changes
UpdateMiningIndex
Event log of pairs’ mining index changes
lastMined
: Factory.mined() value at the time index is updatedminingIndex
: pairs’ miningIndex value at the time
GiveReward
Event log of when mined KSP is claimed and distributed
user
: address of the user who claimedamount
: the amount of KSP claimedlastIndex
: index result of the pair of the wallet after claimingrewardSum
: The amount of KSP that has been accrued so far
ExchangePos
Event log of POS transactions
tokenA
: Token address delivered by the useramountA
: the amount of tokens delivered by the usertokenB
: token address received by useramountB
: the amount of tokens received by the user
ExchangeNeg
Event log of NEG transactions
tokenA
: token address delivered by the useramountA
: the amount of tokens delivered by the usertokenB
: token address received by the useramountB
: the amount of tokens received by the user
AddLiquidity
Event log of liquidity additions
liquidity
: the amount of LP tokens minted due to additional liquidity
RemoveLiquidity
Event log of liquidity removals
liquidity
: the amount of LP tokens burned due to liquidity removal
Last updated
Was this helpful?