referral argument of a stake. The commission is calculated off-chain and paid by the Powfi team.
How it works
1
Register your partner address with the team
Agree on the partner address you will use, your commission rate (y%), and the settlement schedule.
2
Stake with your address as referral
Your frontend or integration calls
stakeAlphWithReferral with your partner address. Use the same address for every stake.3
Yield accrues to your stakers
The xALPH exchange rate rises as protocol rewards are distributed. Your stakers earn that yield like any other xALPH holder.
4
Settlement and payment
Each period, the team computes the yield earned by the xALPH attributed to you and pays you y% of it in ALPH.
Stake with a referral
stakeAlph (it attaches amount + MINIMAL_CONTRACT_DEPOSIT ALPH), and the staker receives the same amount of xALPH.
The official Powfi frontend does not currently accept a referral parameter. To attribute stakes to your address, build your own staking page or integration that calls
stakeAlphWithReferral.What the contract does with referral
- No validation, no registration on-chain.
XAlphToken.stake(amount, referral)accepts any address and only records it in theStakedevent. - The referral receives no tokens. Because nothing is transferred to it, the referral does not appear in the explorer’s transaction view. It is only visible in the event.
- The stake must come from a wallet.
stakerequires the caller to be an asset (wallet) address, so contracts cannot stake on a user’s behalf. - The event is
Staked(to, referral, alphAmount, xAlphAmount): staker, referral, ALPH deposited, xALPH minted.
Verify attribution
Anyone can check which referral a stake was attributed to by reading the transaction’s events from a node::<group> suffix in the event. That is the same address.
How commission is calculated
For each settlement period:- Attributed xALPH: sum the
xAlphAmountof everyStakedevent whosereferralis your address. - Rate increase:
yieldRateDelta = rate(end of period) − rate(end of previous period), whererate = totalDepositedAlph / totalXAlphSupply(see Staking). - Gross yield:
attributed xALPH × yieldRateDelta, in ALPH. - Your commission:
gross yield × y%.
- Only the xALPH minted at stake time counts. Later xALPH transfers and unstakes are not tracked.
- Staking does not move the rate. New stakes mint xALPH at the current rate. The rate only rises when rewards are deposited.
- Rewards depend on protocol revenue. The rate rises when
RewardFeeCollector.distributeRewards()runs. It distributestotalDepositedAlph × rewardRate × elapsed time / 1 year(an annual rate), capped by the ALPH the collector holds from trading fees. The treasury share and the burn share are taken out first, and the rest raises the xALPH rate. If there is little trading volume, there is little yield to share.
Payment
Commission is an off-chain amount owed to you, not an on-chain transfer triggered by the stake. The team pays it in ALPH from the treasury according to your agreement. Because every input (theStaked events and the xALPH rate) is public on-chain, you can recompute your commission independently. Ask the team for the verification page that lists your settlements.