Loot
Contract hosting the Loot reward logic. A Loot is a struct holding the data for PAL & extra rewards allocated to an user based on distribution, user voting rewards from Quest and boosting power from their hPAL locks. The PAL rewards in the Loot are vested for a given duration, and can be claimed beforehand but are slashed based on the remaining duration of the vesting. The extra rewards are not vested and not slashed.
LootData
Loot Data strcut
pal
PAL token
extraToken
Extra reward token
tokenReserve
Address of the Reserve contract holding token to be distributed
lootCreator
Loot Creator contract
vestingDuration
Duration of vesting for Loots
userLoots
List of Loot for each user
LootCreated
Event emitted when a Loot is created
LootClaimed
Event emitted when a Loot is claimed
VestingDurationUpdated
Event emitted when the vesting duration is updated
LootCreatorUpdated
Event emitted when the Loot Creator address is updated
setInitialLootCreator
Sets the Loot Creator contract address
Parameters
_lootCreator
address
Address of the Loot Creator contract
getLootData
Returns the data of a Loot for a user & an id
Parameters
user
address
Address of the user
id
uint256
ID of the Loot
Return Values
palAmount
uint256
(uint256) : Amount of PAL
extraAmount
uint256
(uint256) : Amount of extra token
startTs
uint256
(uint256) : Timestamp at which the vesting starts
endTs
uint256
(uint256) : Timestamp at which the vesting ends
claimed
bool
(uint256) : Is Loot already claimed
getAllUserLootIds
Returns all the user Loot IDs
Parameters
user
address
Address of the user
Return Values
[0]
uint256[]
uint256[] : List of Loot IDs
getAllActiveUserLootIds
Returns all the user active Loot IDs
Parameters
user
address
Address of the user
Return Values
[0]
uint256[]
uint256[] : List of active Loot IDs
getAllUserLoot
Returns all the user Loots
Parameters
user
address
Address of the user
Return Values
[0]
struct Loot.LootData[]
LootData[] : List of Loots
getAllActiveUserLoot
Returns all the user active Loots
Parameters
user
address
Address of the user
Return Values
[0]
struct Loot.LootData[]
LootData[] : List of active Loots
createLoot
Creates a new Loot for a user
Parameters
user
address
Address of the user
startTs
uint256
Timestamp at which the vesting starts
palAmount
uint256
Amount of PAL
extraAmount
uint256
Amount of extra token
claimLoot
Claims a Loot for a user
Parameters
id
uint256
ID of the Loot
receiver
address
Address to receive the PAL & extra token
claimMultipleLoot
Claims multiple Loots for a user
Parameters
ids
uint256[]
List of Loot IDs
receiver
address
Address to receive the PAL & extra token
Last updated