Claiming Rewards
Three different things on Superhero are called "claiming a reward". One is automatic, one is a contract call you sign, and one is signed by a one-time key embedded in an invite link.
The three payout paths
| Reward | How it reaches you | Who signs | Gas |
|---|---|---|---|
| X posting rewards | Sent automatically to your connected wallet after a successful scan | Nobody: the backend pays out | None for you |
| Affiliate rewards | You press Collect rewards, which calls withdraw() on the AffiliationTreasury | You | An ordinary æternity transaction fee |
| An invite link's AE gift | You open the link and press Claim reward | The invite's one-time key, not your wallet | Covered by the redemption_fee_cover the inviter funded |
X posting rewards: nothing to claim
There is no claim button for the Superhero Rewards Program.
Press Check rewards on /trends/invite, sign the ownership challenge with your wallet,
and the backend scans your posts and sends AE to your connected wallet. There is no
transaction for you to sign and no gas for you to pay.
What can go wrong:
- The button is greyed out with a countdown. The recheck is rate-limited. The status
response carries
next_check_allowed_at; a submit past the cap returns HTTP 429 and the scan is skipped. Wait for the countdown and try again. - The check succeeds but nothing arrives. A recheck that returns HTTP 200 can still carry
an
errorstring: below the follower minimum, the X identity was already rewarded on a different address, or the payout transaction itself failed. The card shows that string in a red banner; read it rather than retrying blindly. - You rejected the signature. The client leaves the state unchanged. Press the button again and approve the signature request.
Affiliate rewards: the withdraw call
Affiliate rewards accrue in the AffiliationTreasury contract as your invitees trade.
The gate: four direct invitees must each have spent at least 10 AE, cumulatively, in token sales. The Collect Rewards card reads this live from the contract, shows a progress bar out of four, and lists each invitee's spend against the 10 AE threshold.
The claim window: rewards accumulate in 30-day periods. withdraw() pays the current and
previous period; earlier periods are no longer claimable. A given reward is claimable for
between 30 and 60 days depending on where in a period it landed, so withdraw at least monthly.
The arithmetic is on The Affiliation System.
To withdraw:
- Open
https://superhero.com/trends/inviteand connect the wallet that created the invites. Rewards accrue to the inviter address, not to any other account. - Scroll to Collect your rewards. The card shows Available Rewards, the value of
get_accumulated_rewards(<your address>), converted from aettos. - If the progress bar reads 4/4 and the balance is above zero, the button is enabled. Press
Collect rewards and confirm the transaction in your wallet. It calls
withdraw().
| Button reads | Meaning |
|---|---|
| Not eligible yet | Fewer than four invitees have crossed 10 AE |
| No rewards yet | Threshold reached, but get_accumulated_rewards returns zero |
| Collect rewards | Eligible; the call will go through |
| Withdrawing... | Transaction submitted, waiting on the wallet and the chain |
withdraw() takes no arguments and always pays the whole two-period balance. There is no
partial withdrawal. Its only requirement is the ThresholdReached check; it does not require
a non-zero balance, so a withdraw with nothing accrued succeeds, spends zero, and still costs
the transaction fee.
Contract errors the card translates:
MINIMUM_ACCOUNTS_THRESHOLD_NOT_REACHEDandMINIMUM_OF_4_ACCOUNTS_SHALL_BUYboth render as "you need 4 direct invitees who each spent at least 10 AE in token sales". If you see this while the bar shows 4/4, reload: the on-chain state and the cached UI have diverged.- A
Key does not existorMaps:error fromget_unique_inviteemeans the contract has no entry for your address yet. The card treats that as zero progress. It is the normal state for an account that has never invited anyone.
An invite link's AE gift: claimed by the link, not by you
When someone opens an invite link, the app reads invite_code out of the URL fragment,
reconstructs a one-time account from the secret it contains, and shows a claim card with the
funded amount and who sent it.
Pressing Claim reward calls redeem_invitation_code(<your wallet address>) signed by
the invite's one-time key, not by your wallet. That is why the inviter funds a
redemption_fee_cover alongside the gift: the one-time account needs enough AE to pay for
its own redemption transaction. Your wallet only has to be connected so the contract knows
where to send the AE and whom to attach to the affiliation tree.
| Error | What happened |
|---|---|
ALREADY_REDEEMED | The link was already claimed. The card also detects this up front by reading the third field of get_invitation_code. |
INVITEE_ALREADY_REGISTERED | Your wallet address is already attached to an inviter. One account can only be invited once. |
INVITER_EQUAL_INVITEE | You are redeeming your own code into your own wallet. |
Trying to call undefined function | You are on the wrong network: the treasury at that address does not exist on the network your wallet is set to. |
A message mentioning Secret key | The secret in the link is in a format the SDK cannot load. The link is malformed or truncated. |
If you are the inviter and you open your own link, the card switches to Revoke
invitation instead of Claim, and calls revoke_invitation_code with your wallet. Revoking
returns the invitation_amount to you. An unclaimed invite link does not expire; it
stays claimable until you revoke it.
Related
- Superhero Rewards Program: the milestones that trigger the automatic payouts.
- The Affiliation System: what
withdraw()pays out and how it accrued. - Invite Links: creating and revoking the links whose gifts are claimed here.
- AE and gas: why the withdraw call costs a fee and how fees work.
- Refer & Earn on superhero.com (opens in a new tab): the page with both the Collect Rewards card and the Check rewards button.