Skip to content

Conversation

@KillariDev
Copy link
Collaborator

@KillariDev KillariDev commented Oct 23, 2025

  • adds forkable share tokens
  • factory structure that creates contracts
  • no really tests for share tokens yet

@KillariDev KillariDev changed the base branch from rename-0xString to make-things-immutable October 23, 2025 09:53
Base automatically changed from make-things-immutable to security-pool-draft October 23, 2025 10:01
@KillariDev KillariDev force-pushed the sharetokens-and-new-factory-deployment-process branch from aebcddb to 5683be8 Compare October 23, 2025 10:05
@KillariDev KillariDev marked this pull request as ready for review October 23, 2025 15:35
@KillariDev KillariDev requested a review from MicahZoltu October 23, 2025 15:35
Comment on lines -12 to +19
address immutable owner;
address public owner;

event Participated(address user, uint256 repAmount, uint256 ethAmount, uint256 totalRepPurchased);
event FinalizedAuction(address user, uint256 repAmount, uint256 ethAmount);
event AuctionStarted(uint256 ethAmountToBuy, uint256 repAvailable);

constructor(address _owner) {
function setOwner(address _owner) external {
require(owner == address(0x0), 'owner already set!');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way to remove the cyclic dependency that results in this being necessary? I really don't like mutable variables if there is any option for immutability. IIUC, the owner should never change, this is just necessary because you have a cyclic dependency between this contract and another?

uint256 tokenId = shareToken.getTokenId(universeId, outcome);
uint256 amount = shareToken.burnTokenId(tokenId, msg.sender);
uint256 totalSupply = shareToken.totalSupplyForUniverse(universeId);
uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong
uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // TODO: this is wrong

uint256 ethValue = amount * completeSetCollateralAmount / completeSet.totalSupply();
completeSet.burn(msg.sender, amount);
uint256 totalSupply = shareToken.totalSupplyForUniverse(universeId);
uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // this is wrong
uint256 ethValue = amount * completeSetCollateralAmount / totalSupply; // TODO: this is wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants