Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5e120e9
add vyper support to hardhat
t0mcr8se Jun 14, 2022
1564ecd
add veVOLT contract
t0mcr8se Jun 14, 2022
d86797e
add veVOLT deployment script
t0mcr8se Jun 14, 2022
0a49fd7
add force_withdraw and unlock feature
t0mcr8se Jun 24, 2022
6844d87
add veVOLT tests
t0mcr8se Jun 24, 2022
ca79c36
add MINTIME of 1 month
t0mcr8se Jun 24, 2022
246dcff
fix some tests
t0mcr8se Jun 27, 2022
b01ef06
fix more tests
t0mcr8se Jun 28, 2022
483a3de
more detail for max_penalty
t0mcr8se Jun 30, 2022
9b3c25c
ignore smart wallet checker
t0mcr8se Jun 30, 2022
4567172
test force_withdraw()
t0mcr8se Jun 30, 2022
e754478
test max_penalty
t0mcr8se Jun 30, 2022
26fa6c2
detailed error message for force_withdraw()
t0mcr8se Jul 1, 2022
35e6192
test is_unlocked and emergency withdraw
t0mcr8se Jul 1, 2022
befbc62
store addresses + bulk balance method + tests
t0mcr8se Jul 4, 2022
778f22d
veVOLT deployment
t0mcr8se Jul 5, 2022
836a4ca
fix batch balances method
t0mcr8se Jul 12, 2022
3d5cd21
finalize contract with deployment script
t0mcr8se Jul 12, 2022
054a0eb
add PenaltyHandler.sol
t0mcr8se Jul 15, 2022
faff983
add PenaltyHandler deployment script and logs
t0mcr8se Jul 15, 2022
022b09c
adapt tests to PenaltyHandler
t0mcr8se Jul 15, 2022
59c9a85
approve tokens before donating to PenaltyHandler
t0mcr8se Jul 15, 2022
154a0f6
fix approve and burn address
t0mcr8se Jul 15, 2022
930850f
update burn address
t0mcr8se Jul 15, 2022
66dcf5f
add RewardPool.vy
t0mcr8se Jul 19, 2022
a6eff9c
deploy RewardPool.vy
t0mcr8se Jul 19, 2022
6c86932
lower gas price
t0mcr8se Jul 20, 2022
a930f53
add GaugeProxy
t0mcr8se Jul 20, 2022
5102451
deploy GaugeProxy
t0mcr8se Jul 20, 2022
673076a
shortcut to get rewards
t0mcr8se Jul 26, 2022
892a387
add tests for GaugeProxy.sol
t0mcr8se Jul 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
694 changes: 694 additions & 0 deletions contracts/GaugeProxy.sol

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions contracts/PenaltyHandler.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.7; //^0.7.5;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract PenaltyHandler is Ownable {
address public BURN_ADDRESS = 0x0000000000000000000000000000000000000001;
uint256 public HUNDRED = 10000;

address public feeDistributor;
IERC20 public token;
uint256 public burnPercent;

constructor (address _feeDistributor, uint256 _burnPercent, address _token) public {
require(burnPercent <= HUNDRED);
require(_feeDistributor != address(0) && _token != address(0));
feeDistributor = _feeDistributor;
burnPercent = _burnPercent;
token = IERC20(_token);
}

function setFeeDistributor(address _feeDistributor) public onlyOwner {
feeDistributor = _feeDistributor;
}

function setBurnPercent(uint256 _burnPercent) public onlyOwner {
require(_burnPercent <= HUNDRED);
burnPercent = _burnPercent;
}

function donate(uint256 amount) public returns (bool) {
uint256 toBurn = amount * burnPercent / 10000;
uint256 toDonate = amount * (10000 - burnPercent) / 10000;
require(token.transferFrom(msg.sender, BURN_ADDRESS, toBurn));
require(token.transferFrom(msg.sender, feeDistributor, toDonate));
return true;
}

}
Loading