Links

Kyber

If you require assistance or need additional information to integrate Unagii Stake, reach out to us at [email protected].

Stake flow

Unstake flow

get
https://app.unagii.com/api/v1
/kyberdao/staker/allowance/{address}
Get KNC allowance
get
https://app.unagii.com/api/v1
/kyberdao/staking/digest/approve/{address}
Get data to build Approve Token transaction object
const approveTxn = {
from: address,
gasPrice: "20000000000", // 20 Gwei
gas: String(result.gasLimit),
to: result.contractAddress,
value: "0x0",
nonce: "10", // tx nonce
data: result.digest
}
web3.eth.sendTransaction(approveTxn).then( // do something );
get
https://app.unagii.com/api/v1
/kyberdao/staking/digest/deposit/{address}?amount={amount}
Get data to build Stake transaction object
const stakeTxn = {
from: address,
gasPrice: "20000000000", // 20 Gwei
gas: String(result.gasLimit),
to: result.contractAddress,
value: "0x0",
nonce: "10", // tx nonce
data: result.digest
}
web3.eth.sendTransaction(stakeTxn).then( // do something );
The amount of KNC to stake must not be greater than the amount of KNC allowance able to spend on our PoolMaster smart contract.
get
https://app.unagii.com/api/v1
/kyberdao/staking/digest/withdraw/{address}?amount={amount}
Get data to build Unstake transaction object
const unstakeTxn = {
from: address,
gasPrice: "20000000000", // 20 Gwei
gas: String(result.gasLimit),
to: result.contractAddress,
value: "0x0",
nonce: "10", // tx nonce
data: result.digest
}
web3.eth.sendTransaction(unstakeTxn).then( // do something );