Skip to main content

Module xp

Module xp 

Source
Expand description

Time-weighted staked DOJO balance → XP accrual (pairs with S2P stake in vesting). Activity rewards (PvP, recruit, upgrades, dine, …) use add_reward_points_xp — same dojo.xp / claim_xp_rewards pool as Fren-style “points.” PvP wins use xp_from_battle_points_moved so XP scales with BP transferred (Fren: ETH rewards tied to point moves).

Functions§

accrue_stake_xp
Accrue XP from staked DOJO × elapsed slots. Updates last_xp_accrual_slot to now.
add_reward_points_xp
Add reward points toward claim_xp_rewards SOL share (PvP wins, recruit, upgrades, first dine per slot, …).
xp_from_battle_points_moved
Reward XP from a PvP win — scales with points_moved (Bps crate::consts::XP_BATTLE_BP_TO_REWARD_BPS).