Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Invalid

checkpoint() does not create checkpoints

protocol attempts to implement a time-weighted weight which should change the weight of a guage in respect to time.

function checkpoint() external updateReward(msg.sender) {
emit Checkpoint(msg.sender, block.timestamp);
}

but when checkpoint is called it only emits an event, no action is performed.

Proof of Concept

it("should update weights through checkpointing", async () => {
await baseGauge.checkpoint();
const period = await baseGauge.weightPeriod();
- expect(period.startTime).to.be.gt(0);
+ expect(period.startTime).to.be.equal(0);
});

Impact

weights would not be updated through checkpointing.

Recommendation

calculate the time-weighted weights and update weight through checkpoint

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.