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:
function lock(address _beneficiary, uint256 _amount, uint256 _releaseTime) external returns(bool success) {
require(_amount > 0, "0 not valid");
require(_releaseTime > block.timestamp, "Not valid");
require(_amount <= Peaches.allowance(msg.sender, address(this)), "Allowance not high enough");
Peaches.safeTransferFrom(msg.sender, address(this), _amount);
totalBoxes = totalBoxes.add(1);
lockBoxes[_beneficiary].push(LockBox({
id: totalBoxes,
beneficiary: _beneficiary,
boxBalance: _amount,
releaseTime: _releaseTime
}));
emit BoxLocked(msg.sender, _beneficiary, _amount, _releaseTime);
return true;
}
Because Collector contract will burn 50% of purchased PCHS, burn function was added accesible only by the collector.
function burn(uint256 _amount) external {
require(msg.sender == collector, "Collector only");
Peaches.burn(collector, _amount);
}
This software is experimental please use at your own risk.
Copy link