#contract #controller #emissions #voting #ibc #vote #hub

astroport-emissions-controller-outpost

Astroport vxASTRO Emissions Voting Contract. Outpost version

2 releases (1 stable)

1.0.0 Aug 23, 2024
1.0.0-rc.1 Jun 20, 2024

#28 in #vote

Download history 124/week @ 2024-06-15 22/week @ 2024-06-22 1/week @ 2024-06-29 92/week @ 2024-08-17 39/week @ 2024-08-24

131 downloads per month

GPL-3.0-only

98KB
2K SLoC

Emissions Controller (Outpost)

The Emissions Controller Outpost is a lightweight satellite for the main Emissions Controller located on the Hub. For the vxASTRO staker perspective, this contract has the same API as the main Emissions Controller. However, Outpost can't perform fine-grained sanity checks for voted LP tokens. Same restrictions as on the Hub are applied, like voting every 10 days for up to 5 pools at once. The contract composes a special internal IBC message to the Hub with the user's vote. If sanity checks passed on the Hub, the vote is accepted. In case of IBC failure or timeouts, the user can try to vote again.

Emissions Setting

This endpoint is meant to be called during IBC hook processing. It might be a gas extensive transaction, thus Astroport devs must settle it with supporting relayer operators prior to the vxASTRO launch. The contract has a permissionless endpoint which allows setting ASTRO emissions in the incentives contract for the next epoch. It filters out invalid LP tokens, checks that schedules have >= 1 uASTRO per second, sets reward schedules, and IBC sends leftover funds back to the Hub. Contract call must supply the exact ASTRO amount contained in the schedules.

Permissioned Emissions Setting

In case the chain (for example, Sei) doesn't support IBC hooks, emissions message from the Hub might end up with ASTRO bridged to the chain but not distributed. In that case, the contract owner can call this endpoint along with the emissions voting outcome (schedules) for this specific chain. Same as in permissionless endpoint, this endpoint performs sanity checks, sets reward schedules, and IBC sends leftover funds back to the Hub.

Governance voting

vxASTRO stakers are allowed to vote on registered governance proposals from the Hub. Proposal registration sets proposal start time so contract knows user's voting power at that time. Only Hub's Emissions Contrller can initiate proposal registration via IBC messages.

Dependencies

~15MB
~316K SLoC