Docs
Search…
Smart Contract

Methods :

Events :

Registred
event Registred(address indexed user, uint256 price)
Emitted when an user registers a new BoostOffer
​
UpdateOffer
event UpdateOffer(address indexed user, uint256 newPrice)
Emitted when an user updates its BoostOffer
​
Quit
event Quit(address indexed user)
Emitted when an user removes its BoostOffer
​
BoostPurchase
event BoostPurchase( address indexed delegator, address indexed receiver, uint256 tokenId, uint256 percent, uint256 price, uint256 paidFeeAmount, uint256 expiryTime )
Emitted when a Boost is purchased
​
Claim
event Claim(address indexed user, uint256 amount)
Emitted when an user claims the fees earned
​

Read-only methods :

​
struct BoostOffer
type
name
desc
address
user
Address of the user making the offer
uint256
pricePerVote
Price per vote per second, set by the user
uint16
minPerc
Minimum percent of users voting token balance to buy for a Boost (in BPS)
uint16
maxPerc
Maximum percent of users total voting token balance available to delegate (in BPS)
​
feeToken
function feeToken() public view returns(address)
ERC20 used to pay for DelegationBoost
​
votingEscrow
function votingEscrow() public view returns(address)
Address of the votingEscrowToken to delegate
​
delegationBoost
function delegationBoost() public view returns(address)
Address of the Delegation Boost contract (veBoost)
​
feeReserveRatio
function feeReserveRatio() public view returns(address)
Ratio of fees to be set as Reserve (in BPS)
​
minPercRequired
function minPercRequired() public view returns(address)
Min Percent of delegator votes to buy required to purchase a Delegation Boost (in BPS)
​
minDelegationTime
function minDelegationTime() public view returns(address)
Minimum delegation time, taken from veBoost contract (currently 1 week)
​
offers
function offers(uint256 index) public view returns(BoostOffer)
Returns the BoostOffer for a given index
​
userIndex
function userIndex(address user) public view returns(uint256)
Index of the user in the offers array
​
earnedFees
function earnedFees(address user) public view returns(uint256)
Amount of fees earned by users through Boost selling
​
offersIndex
function offersIndex() external view returns(uint256)
Total amount of BoostOffers currently in the list
​
estimateFees
function estimateFees( address delegator, uint256 percent, uint256 duration) external view returns (uint256)
Gives an estimate of fees to pay for a given Boost Delegation
Parameters :
name
type
desc
delegator
address
Address of the delegator for the Boost
percent
uint256
Percent of the delegator balance to delegate (in BPS)
duration
uint256
Duration (in weeks) of the Boost to purchase
​
​
claimable
function claimable(address user) external view returns (uint256)
Returns the amount of fees earned by the user that can be claimed
​

State-changing methods :

register

function register( uint256 pricePerVote, uint16 minPerc, uint16 maxPerc ) external returns(bool)
Registers a new user wanting to sell its delegation
Parameters :
name
type
desc
pricePerVote
uint256
Price of 1 vote per second (in wei)
minPerc
uint16
Minimum percent of users voting token balance to buy for a Boost (in BPS)
maxPerc
uint16
Maximum percent of users total voting token balance available to delegate (in BPS)
Returns : bool : success
​
​
updateOffer
function updateOffer( uint256 pricePerVote, uint16 minPerc, uint16 maxPerc ) external returns(bool)
Updates an user BoostOffer parameters
Parameters :
name
type
desc
pricePerVote
uint256
Price of 1 vote per second (in wei)
minPerc
uint16
Minimum percent of users voting token balance to buy for a Boost (in BPS)
maxPerc
uint16
Maximum percent of users total voting token balance available to delegate (in BPS)
Returns : bool : success
​
quit
function quit() external returns(bool)
Remove the BoostOffer of the user, and claim any remaining fees earned
Returns : bool : success
​

buyDelegationBoost

function buyDelegationBoost( address delegator, address receiver, uint256 percent, uint256 duration, uint256 maxFeeAmount ) external returns(uint256)
Buy a Delegation Boost from a Delegator BoostOffer
Parameters :
name
type
desc
delegator
address
Address of the delegator for the Boost
receiver
address
Address of the receiver of the Boost
percent
uint256
Percent of the delegator balance to delegate (in BPS)
duration
uint256
Duration (in weeks) of the Boost to purchase
maxFeeAmount
uint256
Maximum amount of feeToken available to pay to cover the Boost Duration (in wei)
Returns : uint256 : tokenId of the newly minted veBoost
The maxFeeAmount value must be approved in the feeToken ERC20 for Warden before this transaction
The Buyer will then need to call the user_checkpoint() method on all Curve V4 & Factory Gauges currently farming, to apply the newly received Boost
​
​
cancelDelegationBoost
function cancelDelegationBoost(uint256 tokenId) external returns(bool)
Cancels a veBoost (wrapper for the cancel_boost & burn method from the veBoost contract)
Parameters :
name
type
desc
tokenId
uint256
Id of the DelegationBoost token to cancel
Returns : bool : success
​
claim
function claim() external returns(bool)
Claims all earned fees
Returns : bool : success
​
claim
function claim(uint256 amount) external returns(bool)
Claims an amount of earned fees through Boost Delegation selling
Returns : bool : success
​
claimAndCancel
function claimAndCancel() external returns(bool)
Claims all earned fees, and cancel all expired Delegation Boost for the user
Returns : bool : success
​
​
​
​