Closed adamdossa closed 6 years ago
This is a great point you bring up. Actually, an STO should never be reusable across multiple STs, just as you can't really reuse a Crowdsale contract across multiple Tokens. It should always be a 1 to 1 relationship.
Now, what I do believe should be possible is to reuse the "structure" of an STO, that would be the intention of templates. I think the confusion comes from the offering struct having this usedBy field which does not belong in here. an STO should only be usable by one ST.
Believe this is also fixed with STO factories
In
Compliance.sol
there is:mapping(address => Offering) offerings;
which is a mapping from STO contracts to Offering structs.The Offering struct implies that the same STO contract can be used by multiple ST's (i.e.
address[] usedBy
).In practice, that doesn't seem like a good idea - for example what would happen if the same STO was used for two offerings at the same time. The
securityTokenOffering
function inSTO20.sol
kind of allows you to reconfigure the STO for a new ST, but it would be dangerous for this to happen in the middle of an existing STO (we don't guard against this - we could add something where it can only be reconfigured ifnow > _endTime
but this isn't perfect depending on what other state the STO maintains).Perhaps a better approach is to track the reputation of an
auditor
rather than a specific STO contract? We could then require a 1 - 1 relationship between STs and STOs.@pabloruiz55 @satyamakgec @Everhusk thoughts?