The Curve DAO currently subsidises liquidity pools in exchange for fees. There's some bribing action happening, where external protocols influence veCRV voters in favor of their gauge, but largely the gauge is focussed on AMMs. This is because it's the current paradigm.
With the new generalised cross-chain gauge architecture, Curve inflation can be directed to any arbitrary ERC20 on a sidechain, with any arbitrary on-chain logic (subject to DAO approval). This has the potential to fund more than just subsidised liquidity pools. This product aims to showcase exactly this: a DAO approved crowdfunding endeavor. This also has the potential to position Curve DAO as a decentralised public goods funding source: provided it adds value to the Curve ecosystem.
FundraisingGaugeV1
: the implementation used for fundraising gaugesGaugeFactoryV1
: permissionless gauge factory for deploying fundraising gauges
- python3 version 3.6 or greater, python3-dev
- brownie - tested with version 1.18.1
- ganache-cli - tested with version 6.12.1
To run the unit tests:
$ brownie test -x
To deploy first edit the scripts/deploy.py
file to unlock the appropriate account, then run the following:
$ brownie run deploy --network mainnet
FundraisingGaugeV1
:0xCED78da2c749236309774d7415236B7090B3bF27
GaugeFactoryV1
:0x696B5D296a8AeF7482B726FCf0616E32fe72A53d
Gauge Factory V1
Spec
Below is a list of callable methods on the Gauge Factory V1 contract.
deploy_gauge(_receiver: address, _max_emissions: uint256) -> address: nonpayable
: Deploy a new fundraising gauge
>>> tx = factory.deploy_gauge(alice, 200 * 10 ** 18, {"from": alice, "priority_fee": "2 gwei"})
Transaction sent: 0xaa0af656794ef7bf25ae986b82ccf91c148c5af70869f9cdf7f23ab5cbcb35e6
Gas price: 0.0 gwei Gas limit: 9007199254740991 Nonce: 4
GaugeFactoryV1.deploy_gauge confirmed Block: 14376787 Gas used: 193770 (85.00%)
>>> tx.events["NewGauge"]
OrderedDict([('_instance', '0x521629cbe068e58b43f1aEaB73E47fC43231E67C'), ('_receiver', '0x66aB6D9362d4F35596279692F0251Db635165871'), ('_max_emissions', 200000000000000000000))])
Note: A gauge does not automatically receive emissions, it must be voted in by the Curve DAO and then veCRV voters must allocate voting power to change the gauge weight.
implementation() -> address: view
: Get the implementation address used for creating proxies. This address is fixed at deployment and non-upgradeable
>>> factory.implementation()
0xE7eD6747FaC5360f88a2EFC03E00d25789F69291
get_gauge_count() -> uint256: view
: Get the total number of gauges deployed (these aren't necessarily voted in by the DAO
>>> factory.get_gauge_count()
1
get_gauge_by_idx(_idx: uint256) -> address: view
: Get the address of the gauge deployed at index_idx
. This function returnsZERO_ADDRESS
for indexes pastget_gauge_count()
>>> [factory.get_gauge_by_idx(i) for i in range(factory.get_gauge_count())]
["0x521629cbe068e58b43f1aEaB73E47fC43231E67C"]
Fundraising Gauge V1
Spec
After a gauge is deployed, voted in by the DAO, and receiving emissions, the receiver
must call the Minter
to collect their accumulated CRV.
receiver() -> address: view
: The account which receives emissions from this gauge.
>>> gauge.receiver()
'0x66aB6D9362d4F35596279692F0251Db635165871'
max_emissions() -> uint256: view
: The maximum amount of emissionsreceiver()
will receive, afterwards emissions will not accrue (akin to a supply burn)
>>> gauge.max_emissions()
200000000000000000000
claimable_tokens_write(_user: address) -> uint256: nonpayable
: The amount of CRV currently claimable by_user
. This is a write method, but should be changed in the ABI to be a view method and called viaeth_call
.
>>> gauge.claimable_tokens_write.call(alice)
1180591620717411303424
(c) Curve.Fi, 2020 - All rights reserved.