Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
29784de
fix: only change in logic
0xMotto Feb 21, 2023
b03099a
fix: fix _update1 in Pair.sol
0xMotto Mar 3, 2023
d697c98
fix: fix if/else in _update0 & _update1 in Pair.sol
0xMotto Mar 3, 2023
acb79f3
chore: fix comments
0xMotto Mar 3, 2023
877259c
fix: fix type uint -> uint256
0xMotto Mar 3, 2023
95d39c5
fix: remove getVoter function in PairFactory
0xMotto Mar 3, 2023
519b9fc
fix: remove initial_voter_set and initial_tank_set flag in PairFactory
0xMotto Mar 3, 2023
73005d8
fix: remove initalized flag in WrappedExternalBribeFactory
0xMotto Mar 3, 2023
83e44ed
fix: rename wrappedxbribefactory variable in Voter.sol
0xMotto Mar 3, 2023
783ad5f
chore: remove comments
0xMotto Mar 3, 2023
5ac59e3
fix: use IPair interface in Voter instead of Pair contract to call fu…
0xMotto Mar 3, 2023
02d6e9c
chore: remove comment
0xMotto Mar 3, 2023
1f6952c
chore: remove comment
0xMotto Mar 3, 2023
da83099
fix: can only set external bribe once in Pair.sol
0xMotto Mar 3, 2023
49a7b45
chore: remove commented code
0xMotto Mar 3, 2023
36a57bf
fix: remove index tracking in Pair
0xMotto Mar 3, 2023
4c99326
fix: remove claim event in Pair
0xMotto Mar 3, 2023
b3f88b3
fix: remove claimFees in IPair
0xMotto Mar 3, 2023
7e2d94e
fix: remove Pair fees from Pair.sol
0xMotto Mar 3, 2023
2627315
fix: remove PairFees
0xMotto Mar 3, 2023
086457e
fix: remove claimFees in gauge
0xMotto Mar 3, 2023
62d571a
fix: setHasGauge in killGauge and reviveGauge function in Voter.sol
0xMotto Mar 3, 2023
7a7a488
fix: can set fee to zero
0xMotto Mar 3, 2023
c3202ca
fix: add back checking for setFee in PairFactory
0xMotto Mar 3, 2023
4633950
chore: remove comments
0xMotto Mar 3, 2023
0635e3f
fix: fix code error
0xMotto Mar 3, 2023
eea30e9
feat: add event VoterSet in WrappedExternalBribeFactory
0xMotto Mar 3, 2023
421035d
feat: add events in PairFactory
0xMotto Mar 3, 2023
af5fd00
feat: add events in Pair.sol
0xMotto Mar 3, 2023
4e8343e
fix: Forge config deprecated
c001ie Mar 3, 2023
b6b096c
build: Add yarn.lock
c001ie Mar 3, 2023
6616faf
forge install: openzeppelin-contracts
c001ie Mar 3, 2023
020aab1
chore: Remove Redemption logic
c001ie Mar 3, 2023
d3f20bd
chore: Drop cross-chain redemption logic
c001ie Mar 3, 2023
411f88f
forge install: forge-std
c001ie Mar 3, 2023
24e13a4
forge install: solmate
c001ie Mar 3, 2023
808bd90
build: Remove L0 from gitmodules
c001ie Mar 3, 2023
af760d0
fix: Gauge reward token precision based on ERC20 token decimals
c001ie Mar 3, 2023
1ccb1b8
feat: Allow pair fee to be 0
c001ie Mar 3, 2023
3ab00b0
chore: Remove internal bribe
c001ie Mar 3, 2023
0576065
chore: Remove L0 from gitignore
c001ie Mar 3, 2023
b405f1a
test: MockERC20 no longer needs claimFees
c001ie Mar 3, 2023
8176b68
refactor: Merge _update0 and _update1
c001ie Mar 3, 2023
f412322
build: Initial mint 300m
c001ie Mar 3, 2023
ffec16b
feat: Rename token
c001ie Mar 3, 2023
3dd8acf
refactor: Move initialMint to constructor
c001ie Mar 3, 2023
b9bea6f
refactor: Rename Velo to Flow
c001ie Mar 3, 2023
721e615
fix: Remove claim from IFlow
c001ie Mar 3, 2023
584a6ad
docs: Optimism -> Canto
c001ie Mar 3, 2023
c1e7f1f
chore: amend gitignore
0xMotto Mar 4, 2023
0dfc2e0
fix: add changes
0xMotto Mar 4, 2023
9373534
feat: add owner in voting escrow
0xMotto Mar 4, 2023
a3fd6ed
fix: fix failed tests
0xMotto Mar 4, 2023
3d859ba
refactor: Rename VELO to FLOW and fixed a test
c001ie Mar 4, 2023
7a7e5a3
fix: VELO -> FLOW
c001ie Mar 4, 2023
2abd630
refactor: Rename VelodromeLibrary to VelocimeterLibrary
c001ie Mar 4, 2023
8ca5892
test: Extract 4 years as a constant
c001ie Mar 4, 2023
0c4a93c
test: Extract 1 week as a constant
c001ie Mar 4, 2023
5445902
fix: Variable shadowing
c001ie Mar 4, 2023
52c9cd6
test: Restrict mutability
c001ie Mar 4, 2023
954c589
fix: Unused functiona arg
c001ie Mar 4, 2023
d8d96d0
fix: Unused local var
c001ie Mar 4, 2023
8eaeb5a
fix: set hasGauge/external bribe does not work if _pool is not pair
c001ie Mar 4, 2023
327ee1b
fix: Voter cannot change in Pair, so no need to emit setter
c001ie Mar 4, 2023
acdc6db
fix: Failing testMinterWeeklyDistribute
c001ie Mar 4, 2023
b003e5b
build: forge install ds-test
c001ie Mar 4, 2023
54d37e0
fix: Failing testMinterWeeklyDistribute
c001ie Mar 4, 2023
6a5eedc
test: Remove WEVE
c001ie Mar 4, 2023
a4cc42d
build: Canto deployment script
c001ie Mar 4, 2023
a44dafc
refactor: Minter.initialize Claim struct
c001ie Mar 4, 2023
ff436dc
build: Mint initialize in deployment
c001ie Mar 4, 2023
dfba09e
build: Script to get veNFT snapshot
c001ie Mar 4, 2023
f007ddb
feat: Allow minter multiple mint and lock
c001ie Mar 4, 2023
1fd989b
build: Split batch mint tokens + veNFTs
c001ie Mar 4, 2023
d886441
build: Migrate mint script
c001ie Mar 4, 2023
b209f22
build: Update initial weekly emission to 13m
c001ie Mar 4, 2023
8ab83e7
build: Team member vesting
c001ie Mar 4, 2023
b97e150
build: Flow convertor deployment
c001ie Mar 4, 2023
d0ed9fd
chore: Remove TODO
c001ie Mar 4, 2023
1b1426a
build: PairFactory set tank
c001ie Mar 4, 2023
95beaae
build: Voting escrod set ve art proxy
c001ie Mar 4, 2023
323497e
build: Pair factory set X
c001ie Mar 4, 2023
b3da29b
chore: Initial liquid supply should be 82m
c001ie Mar 4, 2023
5c0a9a5
build: Update whitelisted tokens
c001ie Mar 4, 2023
dd64cc2
build: Include snapshotted veNFT holders
c001ie Mar 4, 2023
e1804b7
refactor: Move batch mint to function
c001ie Mar 4, 2023
e905f94
chore: add initial mint for dunks
0xMotto Mar 5, 2023
d9a7d7a
chore: change multi sig claim veNFT from 13 to 14
0xMotto Mar 5, 2023
c2b3ecb
chore: change asset eoa initial mint from 5 to 4
0xMotto Mar 5, 2023
d6bb686
chore: amend initial mint
0xMotto Mar 5, 2023
e79169e
fix: Wrong contract/variable name used
c001ie Mar 5, 2023
723213c
fix: Addresses need to be checksummed
c001ie Mar 5, 2023
339515e
fix: Unused local variable warning
c001ie Mar 5, 2023
6893d33
fix: Duplicated VotingEscrow setVoter
c001ie Mar 5, 2023
1320a91
fix: Wrong function name
c001ie Mar 5, 2023
6889f2d
fix: Typo
c001ie Mar 5, 2023
11cb74e
fix: Addresses need to be checksummed
c001ie Mar 5, 2023
3d78c7a
Added THREE_MILLIONs = 1%
Ceazor Mar 6, 2023
555fabc
Merge pull request #7 from Velocimeter/tokeNumsUpdate
0xMotto Mar 6, 2023
8879d2a
fix: typo
0xMotto Mar 6, 2023
f76d4df
double check on mints,
Ceazor Mar 6, 2023
a5b26e8
remove WAIT Whitelisting. pool shallow
Ceazor Mar 6, 2023
c79dc86
feat: Use Ownable for PairFactory
c001ie Mar 6, 2023
7470e6a
Changes to Roles
Ceazor Mar 6, 2023
84643b2
fix: remove redundant vairables
0xMotto Mar 6, 2023
4b16d9e
Revert "fix: Gauge reward token precision based on ERC20 token decimals"
c001ie Mar 6, 2023
b86bc85
fix: remove isPaused = false in constructor
0xMotto Mar 6, 2023
eb20b3f
chore: Remove governance code
c001ie Mar 6, 2023
140004d
pair fetch tank from PairFactory so all pairs depend on PF tank()
Ceazor Mar 7, 2023
6fdefeb
fix: fix pair tanks
0xMotto Mar 7, 2023
7442dbf
fix: change safeTransferFrom to safeTransfer for v2 tokens in redeem …
0xMotto Mar 7, 2023
d1b5464
fix: use IPairFactory in Pair.sol
0xMotto Mar 8, 2023
d60165e
fix: remove experimental features in router
0xMotto Mar 9, 2023
28db1cb
fix: Handle tax tokens in notifyRewardAmount
c001ie Mar 9, 2023
a7faea6
fix: Handle tax tokens in Gauge.notifyRewardAmount
c001ie Mar 9, 2023
dc8da3e
fix: reduce MAX_REWARD_TOKENS from 16 to 4 in Gauge
0xMotto Mar 9, 2023
52be63b
add TaxTkn notifyReward Logic to wExternalBribe
Ceazor Mar 9, 2023
79212b3
fix: remove unused constant in Minter.sol
0xMotto Mar 10, 2023
c4828cb
refactor: rename FOUR_YEARS in test cases
0xMotto Mar 11, 2023
154032c
refactor: rename variable amount0 to amount in events of Pair.sol
0xMotto Mar 11, 2023
57b7c3f
fix: remove setting owner at constructor of FlowVestor
0xMotto Mar 7, 2023
5966778
refactor: remove optimismConfig.ts
0xMotto Mar 11, 2023
8af1743
fix: fix testGaugeClaimRewards3
0xMotto Mar 17, 2023
381ad83
fix: fix number of elements in the array
0xMotto Mar 18, 2023
811b357
fix: fix testGaugeClaimRewards3
0xMotto Mar 20, 2023
f7c58c4
chore: add comment in pair.t.sol
0xMotto Mar 20, 2023
5eaf7c5
fix: fix reset bug leading to division by 0
0xMotto Mar 23, 2023
c7a8893
fix: remove always true if statement
0xMotto Mar 24, 2023
bc04e4e
feat: add test cases for trading fees directed to tank / bribe contracts
0xMotto Mar 28, 2023
43113ae
fix: add wrapped bribe
0xMotto Apr 20, 2023
21a9c67
fix: add cases in wrapped external bribe
0xMotto Apr 20, 2023
735ab08
feat: add handle left over bribes
0xMotto Apr 20, 2023
b6925e3
fix: add events
0xMotto Apr 20, 2023
5eac340
feat: add updateRewardAmount in wrapped bribe contract for balance di…
0xMotto Apr 23, 2023
9adbcbb
fix: add test case for updateRewardAmount
0xMotto Apr 23, 2023
41c2a97
feat: add autobribe
0xMotto Apr 25, 2023
74f058b
refactor: reuse declared vairables in WrappedBribeFactory
0xMotto Apr 25, 2023
35688ed
added seal()
Ceazor Apr 25, 2023
67a9df8
feat: add seal() in AutoBribe
0xMotto Apr 26, 2023
e6d6939
fix: add identifier for sealed in AutoBribe
0xMotto Apr 27, 2023
f84f957
fix: use non-reserved keyword for variable name in AutoBribe
0xMotto Apr 27, 2023
d6e0dec
feat: update AutoBribe
0xMotto Apr 28, 2023
ced74a0
fix: fix merge error
0xMotto Apr 28, 2023
ca29a68
fix: fix AutoBribe
0xMotto Apr 28, 2023
e16a71c
fix: add tests for setProject
0xMotto Apr 28, 2023
ebc8d31
feat: add last updated in wrapped bribe
0xMotto Apr 28, 2023
62317d5
fix: fix typo
0xMotto Apr 28, 2023
1cc549a
fix: remove createAutoBribe
0xMotto Apr 28, 2023
8f33aed
feat: add AutoBribeFactory
0xMotto Apr 28, 2023
a49b166
fix: remove team in constructor of WrappedBribeFactory
0xMotto Apr 28, 2023
202aa37
fix: fix test cases
0xMotto Apr 28, 2023
a969b07
fix: move math from bribe to deposit
0xMotto Apr 29, 2023
18602b7
fix: set nextWeek to block.timestamp in constructor
0xMotto May 2, 2023
9876ef3
fix: add checking to avoid re-bribing in the same week
0xMotto May 2, 2023
872a64f
fix: amend AutoBribe
0xMotto May 3, 2023
d984cb0
fix: fix data location
0xMotto May 3, 2023
e73ece4
Merge branch 'only-logic-changes' of https://github.com/Velocimeter/c…
Ceazor May 22, 2023
f503781
fix: check bribe token whitelisted in AutoBribe
0xMotto May 23, 2023
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
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
PRIVATE_KEY=
OP_SCAN_API_KEY=
FTM_SCAN_API_KEY=
ALCHEMY_API_KEY=
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ abi
build
scripts/xbribes
# for verify
Flattened.sol
Flattened.sol
lib/openzeppelin-contracts
lib/forge-std
lib/ds-test
9 changes: 4 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.5.0
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/Rari-Capital/solmate
url = https://github.com/transmissions11/solmate
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/LayerZero"]
path = lib/LayerZero
url = https://github.com/LayerZero-Labs/LayerZero
url = https://github.com/Openzeppelin/openzeppelin-contracts
branch = v4.8.2
227 changes: 227 additions & 0 deletions contracts/AutoBribe.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
// SPDX-License-Identifier: MIT

import "openzeppelin-contracts/contracts/access/Ownable.sol";
import "contracts/interfaces/IERC20.sol";
import "contracts/interfaces/IVoter.sol";
import "contracts/WrappedBribe.sol";

pragma solidity ^0.8.13;

// the purpose of this contract is to allow the projects to deposit bribes that will bribe their pools for a period of time
// they will need to set up a public keeper, anyone can send the bribes
// bribes are divided evenly into the amount of weeks designated when they deposit
// each new deposit will NOT make a bribe immediately!
// calling the bribe function is public and is rewarded with a share of the bribe token
// !!!!!!!!!!!this contract handles multiple bribe tokens, and a single bribe contract!!!!!!!!!

contract AutoBribe is Ownable {
address public immutable voter;
address public immutable wBribe;

address public project;
bool public depositSealed;
bool public initialized;
uint256 public nextWeek;
address[] public bribeTokens;
mapping(address => bool) public bribeTokensDeposited;
mapping(address => uint256) public bribeTokenToWeeksLeft;
string public bribeName;

event Deposited(
address indexed _bribeToken,
uint256 _amount,
uint256 _weeks
);
event Bribed(uint256 indexed _timestamp, address _briber);
event EmptiedOut(uint256 indexed _timestamp, address project);
event Sealed(uint256 indexed _timestamp);
event UnSealed(uint256 indexed _timestamp);

constructor(address _voter, address _wBribe, address _team, string memory _name) {
voter = _voter;
wBribe = _wBribe;
nextWeek = block.timestamp;
_transferOwnership(_team);
bribeName = _name;
}

//########################################
//###########PUBLIC FUNCTIONS#############
//########################################

//This public function allows anyone to send the weekly allocation to the bribe contract
//There is a small reward for calling this function
//It can only be called once a week
function bribe() public {
require(block.timestamp >= nextWeek, "already bribed this week");
uint256 length = bribeTokens.length;
address _bribeToken;
for (uint256 i = 0; i < length; ) {
_bribeToken = bribeTokens[i];
uint256 weeksLeft = bribeTokenToWeeksLeft[_bribeToken];
uint256 bribeAmount = balance(_bribeToken) / weeksLeft;
uint256 gasReward = bribeAmount / 200;
_safeTransfer(_bribeToken, msg.sender, gasReward);
WrappedBribe(wBribe).notifyRewardAmount(
_bribeToken,
bribeAmount - gasReward
);
bribeTokenToWeeksLeft[_bribeToken] = weeksLeft - 1;
unchecked {
++i;
}
}
nextWeek = nextWeek + 604800;
emit Bribed(nextWeek, msg.sender);
}

//This just returns the balance of bribe tokens in the contract
function balance(address _bribeToken) public view returns (uint) {
return IERC20(_bribeToken).balanceOf(address(this));
}

//########################################
//########PROJECT ADMIN FUNCTIONS#########
//########################################

//Allows project to deposit bribe tokens and set the weeks of which they are divided up into
function deposit(
address _bribeToken,
uint256 _amount,
uint256 _weeks
) public {
require(msg.sender == project, "only the project can bribe");
require(_amount > 0, "Why are you depositing 0 tokens?");
require(_weeks > 0, "You have to put at least 1 week");
require(
IVoter(voter).isWhitelisted(_bribeToken),
"Bribe Token is not whitelisted"
);
_safeTransferFrom(_bribeToken, msg.sender, address(this), _amount);
uint256 allowance = IERC20(_bribeToken).allowance(
address(this),
wBribe
);
_safeApprove(_bribeToken, wBribe, allowance + _amount);
if (!bribeTokensDeposited[_bribeToken]) {
bribeTokensDeposited[_bribeToken] = true;
bribeTokens.push(_bribeToken);
}
bribeTokenToWeeksLeft[_bribeToken] += _weeks;

emit Deposited(_bribeToken, _amount, _weeks);
}

//Allows the project to retrieve their bribe tokens
function emptyOut() public {
require(msg.sender == project, "only project can empty out");
require(!depositSealed, "deposit is sealed");
uint256 length = bribeTokens.length;
uint256 amount;

for (uint256 i = 0; i < length; ) {
address bribeToken = bribeTokens[i];
amount = balance(bribeToken);
bribeTokenToWeeksLeft[bribeToken] = 0;
_safeTransfer(bribeToken, msg.sender, amount);

unchecked {
++i;
}
}

emit EmptiedOut(block.timestamp, project);
}

//Allows project to seal the vault making it not possible for them to withdraw their tokens
function seal() public {
require(msg.sender == project, "only project can seal");
depositSealed = true;

emit Sealed(block.timestamp);
}

//Allows project to change their controlling wallet
function setProject(address _newWallet) public {
require(msg.sender == project);
project = _newWallet;
}

//########################################
//#######VELOCIMETER ADMIN FUNCTIONS######
//########################################

//Allows Velocimeter to re allow project to withdraw their tokens
function unSeal() public onlyOwner {
depositSealed = false;

emit UnSealed(block.timestamp);
}

function initProject(address _newWallet) public onlyOwner {
require(!initialized, "project wallet can only be set once by team");
if (!initialized) {
initialized = true;
}
project = _newWallet;
}

function inCaseTokensGetStuck(address _token) external onlyOwner {
require(!bribeTokensDeposited[_token], "!bribeToken");
uint256 amount = IERC20(_token).balanceOf(address(this));
_safeTransfer(_token, msg.sender, amount);
}

//########################################
//############RECLOCK FUNCTION############
//########################################

// Allows project or Velocimeter to reset the week to the current block
// This should only be called with consideration as it can allow for double bribes in a single week.
// Best use is to call it BEFORE, bribe() is called in a given week
function reclockBribeToNow() external {
require(
msg.sender == project || msg.sender == owner(),
"you can't call this"
);
nextWeek = block.timestamp;
}

//########################################
//############INTERNAL FUNCTIONS##########
//########################################

function _safeTransfer(address token, address to, uint256 value) internal {
require(token.code.length > 0);
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20.transfer.selector, to, value)
);
require(success && (data.length == 0 || abi.decode(data, (bool))));
}

function _safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
require(token.code.length > 0);
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(
IERC20.transferFrom.selector,
from,
to,
value
)
);
require(success && (data.length == 0 || abi.decode(data, (bool))));
}

function _safeApprove(address token, address spender, uint value) internal {
require(token.code.length > 0);
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20.approve.selector, spender, value)
);
require(success && (data.length == 0 || abi.decode(data, (bool))));
}
}
9 changes: 6 additions & 3 deletions contracts/ExternalBribe.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import 'contracts/libraries/Math.sol';
import "openzeppelin-contracts/contracts/utils/math/Math.sol";
import 'contracts/interfaces/IBribe.sol';
import 'contracts/interfaces/IERC20.sol';
import 'contracts/interfaces/IGauge.sol';
Expand All @@ -16,8 +16,6 @@ contract ExternalBribe is IBribe {
uint internal constant DURATION = 7 days; // rewards are released over the voting period
uint internal constant MAX_REWARD_TOKENS = 16;

uint internal constant PRECISION = 10 ** 18;

uint public totalSupply;
mapping(uint => uint) public balanceOf;
mapping(address => mapping(uint => uint)) public tokenRewardsPerEpoch;
Expand Down Expand Up @@ -292,7 +290,12 @@ contract ExternalBribe is IBribe {
uint adjustedTstamp = getEpochStart(block.timestamp);
uint epochRewards = tokenRewardsPerEpoch[token][adjustedTstamp];

uint256 balanceBefore = IERC20(token).balanceOf(address(this));
_safeTransferFrom(token, msg.sender, address(this), amount);
uint256 balanceAfter = IERC20(token).balanceOf(address(this));

amount = balanceAfter - balanceBefore;

tokenRewardsPerEpoch[token][adjustedTstamp] = epochRewards + amount;

periodFinish[token] = adjustedTstamp + DURATION;
Expand Down
41 changes: 6 additions & 35 deletions contracts/Velo.sol → contracts/Flow.sol
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.13;

import "contracts/interfaces/IVelo.sol";
import "contracts/interfaces/IFlow.sol";

contract Velo is IVelo {
contract Flow is IFlow {

string public constant name = "Velodrome";
string public constant symbol = "VELO";
string public constant name = "Velocimeter";
string public constant symbol = "FLOW";
uint8 public constant decimals = 18;
uint public totalSupply = 0;

mapping(address => uint) public balanceOf;
mapping(address => mapping(address => uint)) public allowance;

bool public initialMinted;
address public minter;
address public redemptionReceiver;
address public merkleClaim;

event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);

constructor() {
constructor(address initialSupplyRecipient) {
minter = msg.sender;
_mint(msg.sender, 0);
_mint(initialSupplyRecipient, 82800140034502500000000000);
}

// No checks as its meant to be once off to set minting rights to BaseV1 Minter
Expand All @@ -32,26 +29,6 @@ contract Velo is IVelo {
minter = _minter;
}

function setRedemptionReceiver(address _receiver) external {
require(msg.sender == minter);
redemptionReceiver = _receiver;
}

function setMerkleClaim(address _merkleClaim) external {
require(msg.sender == minter);
merkleClaim = _merkleClaim;
}

// Initial mint: total 82M
// 4M for "Genesis" pools
// 30M for liquid team allocation (40M excl init veNFT)
// 48M for future partners
function initialMint(address _recipient) external {
require(msg.sender == minter && !initialMinted);
initialMinted = true;
_mint(_recipient, 82 * 1e6 * 1e18);
}

function approve(address _spender, uint _value) external returns (bool) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
Expand Down Expand Up @@ -93,10 +70,4 @@ contract Velo is IVelo {
_mint(account, amount);
return true;
}

function claim(address account, uint amount) external returns (bool) {
require(msg.sender == redemptionReceiver || msg.sender == merkleClaim);
_mint(account, amount);
return true;
}
}
Loading