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

UpdateOfferPrice

event UpdateOfferPrice(address indexed user, uint256 newPrice)

Emitted when an user updates its BoostOffer price

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 amount, 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

NewAdvisedPrice

event NewAdvisedPrice(uint256 newPrice)

Emitted when the advised price is updated

Read-only methods :

struct BoostOffer

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)

advisedPrice

function advisedPrice() public view returns(uint256)

Price per vote advised by the managers for users that don't handle their pricing themselves

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

canDelegate

function canDelegate(address delegator, uint256 amount) external view returns(bool)

Checks if the delegator has enough available balance & the Offer allows to delegate the given amount

canDelegatePercent

function canDelegatePercent(address delegator, uint256 percent) external view returns(bool)

Checks if the delegator has enough available balance & the Offer allows to delegate the given amount (for a given percent of the Offer)

offersIndex

function offersIndex() external view returns(uint256)

Total amount of BoostOffers currently in the list

estimateFees

function estimateFees( address delegator, uint256 amount, uint256 duration) external view returns (uint256)

Gives an estimate of fees to pay for a given Boost Delegation

Parameters :

estimateFeesPercent

function estimateFeesPercent( address delegator, uint256 percent, uint256 duration) external view returns (uint256)

Gives an estimate of fees to pay for a given Boost Delegation

Parameters :

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 :

Returns : bool : success

updateOffer

function updateOffer( uint256 pricePerVote, uint64 maxDuration, uint64 expiryTime, uint16 minPerc, uint16 maxPerc, bool useAdvicePrice) external returns(bool)

Updates an user BoostOffer parameters

Parameters :

Returns : bool : success

updateOfferPrice

function updateOfferPrice( uint256 pricePerVote, bool useAdvicePrice) external returns(bool)

Updates an user BoostOffer Price parameters

Parameters :

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 :

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

buyDelegationBoostPercent

function buyDelegationBoost( address delegator, address receiver, uint256 percent, uint256 duration, uint256 maxFeeAmount ) external returns(uint256)

Buy a Delegation Boost from a Delegator BoostOffer

Parameters :

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

claim

function claim() external returns(bool)

Claims all earned fees

Returns : bool : success

Last updated