Skip to content

Commit

Permalink
Update comments, revert veto quorum change, fix auction default param…
Browse files Browse the repository at this point in the history
…eter
  • Loading branch information
kanewallmann committed Sep 18, 2024
1 parent bfd30a3 commit fbdeaa1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions contracts/contract/dao/protocol/RocketDAOProtocolVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ contract RocketDAOProtocolVerifier is RocketBase, RocketDAOProtocolVerifierInter
setUint(defeatIndexKey, _index);
}

/// @notice Called by a challenger to claim bonds (both refunded bonds and any rewards paid)
/// @notice Called by a challenger to claim bonds (both refunded bonds and any rewards paid minus the 20% bond burn)
/// @param _proposalID The ID of the proposal
/// @param _indices An array of indices which the challenger has a claim against
function claimBondChallenger(uint256 _proposalID, uint256[] calldata _indices) external onlyLatestContract("rocketDAOProtocolVerifier", address(this)) onlyRegisteredNode(msg.sender) {
Expand Down Expand Up @@ -339,7 +339,7 @@ contract RocketDAOProtocolVerifier is RocketBase, RocketDAOProtocolVerifierInter
}
}

/// @notice Called by a proposer to claim bonds (both refunded bond and any rewards paid)
/// @notice Called by a proposer to claim bonds (both refunded bond and any rewards paid minus the 20% bond burn)
/// @param _proposalID The ID of the proposal
/// @param _indices An array of indices which the proposer has a claim against
function claimBondProposer(uint256 _proposalID, uint256[] calldata _indices) external onlyLatestContract("rocketDAOProtocolVerifier", address(this)) onlyRegisteredNode(msg.sender) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract RocketDAOProtocolSettingsAuction is RocketDAOProtocolSettings, RocketDA
setSettingBool("auction.lot.bidding.enabled", true);
setSettingUint("auction.lot.value.minimum", 1 ether);
setSettingUint("auction.lot.value.maximum", 10 ether);
setSettingUint("auction.lot.duration", 40320); // 7 days
setSettingUint("auction.lot.duration", 50400); // 7 days
setSettingUint("auction.price.start", 1 ether); // 100%
setSettingUint("auction.price.reserve", 0.5 ether); // 50%
// Settings initialised
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ contract RocketDAOProtocolSettingsProposals is RocketDAOProtocolSettings, Rocket
// Must be at least 30 minutes (RPIP-33)
require(_value >= 30 minutes, "Value must be at least 30 minutes");
} else if(settingKey == keccak256(bytes("proposal.quorum"))) {
// Must be >= 15% & < 75%
// Must be >= 15% & < 75% (RPIP-63)
require(_value >= 0.15 ether && _value < 0.75 ether, "Value must be >= 15% & < 75%");
} else if(settingKey == keccak256(bytes("proposal.veto.quorum"))) {
// Must be >= 15% & < 75%
require(_value >= 0.15 ether && _value < 0.75 ether, "Value must be >= 15% & < 75%");
// Must be >= 51% & < 75% (RPIP-33)
require(_value >= 0.51 ether && _value < 0.75 ether, "Value must be >= 51% & < 75%");
} else if(settingKey == keccak256(bytes("proposal.max.block.age"))) {
// Must be > 128 blocks & < 7200 blocks (RPIP-33)
require(_value > 128 && _value < 7200, "Value must be > 128 blocks & < 7200 blocks");
Expand Down
13 changes: 7 additions & 6 deletions test/auction/auction-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ export default function() {
random2,
] = accounts;

const defaultAuctionDuration = 40320;
const auctionDuration = 7200;

// Setup
let scrubPeriod = (60 * 60 * 24); // 24 hours
let minipool;
before(async () => {
// Set settings
await setDAONodeTrustedBootstrapSetting(RocketDAONodeTrustedSettingsMinipool, 'minipool.scrub.period', scrubPeriod, {from: owner});
await setDAOProtocolBootstrapSetting(RocketDAOProtocolSettingsAuction, 'auction.lot.duration', auctionDuration, {from: owner});

// Register node
await registerNode({from: node});
Expand Down Expand Up @@ -247,7 +248,7 @@ export default function() {
await auctionCreateLot({from: random1});

// Wait for duration to end
await mineBlocks(web3, defaultAuctionDuration);
await mineBlocks(web3, auctionDuration);

// Attempt to place bid
await shouldRevert(placeBid(0, {
Expand Down Expand Up @@ -366,7 +367,7 @@ export default function() {
await auctionCreateLot({from: random1});

// Wait for duration to end
await mineBlocks(web3, defaultAuctionDuration);
await mineBlocks(web3, auctionDuration);

// Recover RPL from first lot
await recoverUnclaimedRPL(0, {
Expand All @@ -388,7 +389,7 @@ export default function() {
await auctionCreateLot({from: random1});

// Wait for duration to end
await mineBlocks(web3, defaultAuctionDuration);
await mineBlocks(web3, auctionDuration);

// Attempt to recover RPL
await shouldRevert(recoverUnclaimedRPL(1, {
Expand Down Expand Up @@ -419,7 +420,7 @@ export default function() {
await auctionCreateLot({from: random1});

// Wait for duration to end
await mineBlocks(web3, defaultAuctionDuration);
await mineBlocks(web3, auctionDuration);

// Recover RPL
await recoverUnclaimedRPL(0, {from: random1});
Expand All @@ -440,7 +441,7 @@ export default function() {
await auctionPlaceBid(0, {from: random1, value: '1000'.ether});

// Wait for duration to end
await mineBlocks(web3, defaultAuctionDuration);
await mineBlocks(web3, auctionDuration);

// Attempt to recover RPL again
await shouldRevert(recoverUnclaimedRPL(0, {
Expand Down

0 comments on commit fbdeaa1

Please sign in to comment.