xdefilab / xdefi-governance-token

XDeFi Yield Farming & XDEX on Ethereum
https://farm.xdefi.com
MIT License
11 stars 3 forks source link

BSC Parameters @ FarmMaster.sol #24

Open tturbulence opened 3 years ago

tturbulence commented 3 years ago

Ethereum Version:

mapping(bytes32 => uint256) private lpIndexInPool;

/*
 * In [0, 60000) blocks, 160 XDEX per block, 9600000 XDEX distributed;
 * In [60000, 180000) blocks, 80 XDEX per block, 9600000 XDEX distributed;
 * In [180000, 420000) blocks, 40 XDEX per block, 9600000 XDEX distributed;
 * In [420000, 900000) blocks, 20 XDEX per block, 9600000 XDEX distributed;
 * After 900000 blocks, 8 XDEX distributed per block.
 */
uint256[4] public bonusEndBlocks = [60000, 180000, 420000, 900000];

// 160, 80, 40, 20, 8 XDEX per block
uint256[5] public tokensPerBlock = [
    uint256(160 * ONE),
    uint256(80 * ONE),
    uint256(40 * ONE),
    uint256(20 * ONE),
    uint256(8 * ONE)
];

BSC Version: BSC block speed is 400% of ETH, so emission is 25%

This part is 10% of Ethereum, For ETH version reduced 80% emission, 10% moved to BSC, but tail emission is half of the original plan (1 per BSC block == 4 per ETH block == 50%* 8 per ETH Block


mapping(bytes32 => uint256) private lpIndexInPool;

/*
 * In [0, 60000) blocks, at most 16 XDEX per block, 960000 XDEX distributed;
 * In [60000, 180000) blocks, at most 8 XDEX per block, 960000 XDEX distributed;
 * In [180000, 420000) blocks, at most 4 XDEX per block 40 XDEX per block, 960000 XDEX distributed;
 * In [420000, 900000) blocks, 2 XDEX per block, 960000 XDEX distributed;
 * After 900000 blocks, 1 XDEX distributed per block.
 */
uint256[4] public bonusEndBlocks = [60000, 180000, 420000, 900000];

// 16, 8, 4, 2, 1 XDEX per block
uint256[5] public tokensPerBlock = [
    uint256(16 * ONE),
    uint256(8 * ONE),
    uint256(4 * ONE),
    uint256(2 * ONE),
    uint256(1 * ONE)
];

===========================================

And in xHalfLifeStream.sol

Parameters should be

//unlock k block for Voting Pool
uint256 private constant unlockKBlocksV = 2160;
// key: recipient, value: Locked Stream
mapping(address => LockStream) private votingStreams;

//funds for Normal Pool
uint256 private constant unlockKBlocksN = 240;
// key: recipient, value: Locked Stream
mapping(address => LockStream) private normalStreams;
xdefilab commented 3 years ago

https://github.com/xdefilab/xdefi-governance-token/commit/a7cccda1751e12f6b9dbdba2b8b7d5a0c119f301 已更新