Skip to main content

Smart Contracts

Addresses#

The contracts are currently deployed on the following networks:

Binance Smart Chain - Mainnet#

v.1#

ContractAddress
DEKA Token0x992d63281EbF61061fd79623F294d0F0296BeF81
DEKA Protocol0x88629f11e22861043B2E701207a19Aeb743562F9
DEKA App0xEA9776dAA746d0d29424ff1a251f03c8F95A0693

v.2#

ContractAddress
DEKA Token0xcc043fF110ec01beB2e33C2713Af5924A19aB723
DEKA Protocol0x0757733c26f1364Ae096E6F21eeE6281789ab7cD
DEKA App0x9D8d758Bfc999d0404718c7b95381365Aa40C6D5

Binance Smart Chain - Testnet#

v.1#

ContractAddress
DEKA Token0x992d63281EbF61061fd79623F294d0F0296BeF81
DEKA Protocol0x88629f11e22861043B2E701207a19Aeb743562F9
DEKA App0xEA9776dAA746d0d29424ff1a251f03c8F95A0693

v.2#

ContractAddress
DEKA Token0xcc043fF110ec01beB2e33C2713Af5924A19aB723
DEKA Protocol0x0757733c26f1364Ae096E6F21eeE6281789ab7cD
DEKA App0x9D8d758Bfc999d0404718c7b95381365Aa40C6D5

DEKA Protocol#

NOTE

"A handful of individuals control the algorithms of the world. It's time to decentralize." - Tyler Winklevoss

Given the above quote, smart contracts are computer code that define how money moves, so we put the security and simplicity as top priority while building the DEKA protocol.

State functions#

Those are the functions that require transacting on the Binance Smart Chain network.

Stake#

function stake(uint256 amountIn, uint256 days, address receiver, bytes calldata data) external returns (uint256 mintedAmount, uint256 matchedAmount, bytes32 id);

Unstake#

function unstake(bytes32 id) external returns (uint256 withdrawAmount);

Unstake Early#

function stake(uint256 amountIn, uint256 days, address receiver, bytes calldata data) external returns (uint256 minte

View functions#

Those are the functions that can be used to fetch data from the protocol.

Get Stake Balance#

function balances(address staker) external view returns (uint256);

Get DPY ratio#

function getDPY(uint256 amountIn) external view returns (uint256);

Get Mint Amount#

function getMintAmount(uint256 amountIn, uint256 expiry) external view returns (uint256);

Get Stake By ID#

function stakes(bytes32 id) external view returns (uint256 amountIn, uint256 expiry, uint256 expireAfter,

Events#

A list of all events emitted by the DEKA protocol.

Staked#

event Staked(
bytes32 id,
uint256 amountIn,
uint256 expiry,
uint256 expireAfter,
uint256 mintedAmount,
address indexed staker,
address indexed receiver
);
  • id: This is the stake id. With the stake id you can fetch the stake data from the protocol.
  • amountIn: This is the $DKA amount that the user has staked.
  • expiry: The time after which the stake will expire (e.g. 86400 = 1 expiration)
  • expireAfter: The block timestamp after which the stake will expire.
  • mintedAmount: The amount of minted $DKA - this is basically the yield being redirected to the DEKA receiver.
  • taker: The address of the user.
  • receiver: The address of the yield destination.

Unstaked#

event Unstaked(bytes32 id, uint256 amountIn, address indexed staker);
  • id: This is the stake id. With the stake id you can fetch the stake data from the protocol.
  • amountIn: This is the $DKA amount that the user has staked.
  • staker: The address of the user.
Last updated on