MasterGarden
Peaches.Finance is focused on providing a fair distribution of PCHS, rewards and on the creation of Synthetic Stock Tokens.
For PCHS distribution a modified version of the SushiSwap farming infrastructure will be used.
A number of changes to the distribution system was made in order to:
    Prevent abuse/exploits.
    Encourage long-term participation in the ecosystem.
    Create locking to reduce deflation and align stakeholders long term.
For example to facilitate locking a Time Lock was added:
1
function lock(address _beneficiary, uint256 _amount, uint256 _releaseTime) external returns(bool success) {
2
3
require(_amount > 0, "0 not valid");
4
require(_releaseTime > block.timestamp, "Not valid");
5
require(_amount <= Peaches.allowance(msg.sender, address(this)), "Allowance not high enough");
6
Peaches.safeTransferFrom(msg.sender, address(this), _amount);
7
8
totalBoxes = totalBoxes.add(1);
9
10
lockBoxes[_beneficiary].push(LockBox({
11
id: totalBoxes,
12
beneficiary: _beneficiary,
13
boxBalance: _amount,
14
releaseTime: _releaseTime
15
}));
16
17
emit BoxLocked(msg.sender, _beneficiary, _amount, _releaseTime);
18
return true;
19
}
Copied!
Because Collector contract will burn 50% of purchased PCHS, burn function was added accesible only by the collector.
1
function burn(uint256 _amount) external {
2
require(msg.sender == collector, "Collector only");
3
Peaches.burn(collector, _amount);
4
5
}
Copied!
This software is experimental please use at your own risk.
Last modified 3mo ago
Copy link