
Implementation
Yield Basis follows a classical veToken model pioneered by Curve. The process whereby the user receives YB via the liquidity mining is mostly described in the token page of ybBTC, but here we must provide a further crucial detail.
As there can be multiple gauges that receive YB allocations from the same general source, the allocation must be split somehow. It is done via gauge voting, as in Curve.
Any user can invoke create_lock()
to lock his YB tokens in the Voting Escrow crontract, whereupon he becomes able to manage his lock (increase time & amount and withdraw()
upon the lock expiry). He can then place votes on the gauges for the purposes of YB distribution by invoking the vote_for_gauge_weights()
function of the Gauge Controller contract (see the scheme above).