New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add v0 technical spec #1
Conversation
spec/overview.md
Outdated
} | ||
``` | ||
### Methods | ||
`initiateAuction()` The entry-point which is called by a borrower to start the auction process. This function accepts an auction config, bond config, and collateral config. This is because in order to have a valid aucction, all three of these pices must be valid and set when the auction begins as the lenders need to have this information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at https://ribbon.finance 's contracts (actually ran into one when searching something from the Gnosis Auction), and they interact with Gnosis auction only through what I believe to be the deployed (unchanged) contract. https://github.com/ribbon-finance/ribbon-v2/blob/master/contracts/libraries/GnosisAuction.sol
If we can only wrap the auction that would simplify the surface that we would own, code-wise, and I wonder if there is something important that we would need to change (that isn't configurable).
So in the world that we only are interacting and not changing the gnosis auction code, the flow would look like:
- Create Bond tokens with configuration
- Pass in the bond tokens as the
_auctioningToken
for the auction - Return the
_auctioningToken
at auction end.
For example, if an auctioneer wants to issue a bond for 100m USDC, giving 20m of their token as collateral, a user will bid for 1m USDC and ask for 1.1m worth of bonds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like they are using the Gnosis deployed version
Which means they are paying the 1.5% gnosis auction fee.
So for us - that fee is way too high - we would fork the Gnosis auction and deploy it? Then we can be the owner and change the fee % (or make the fee go to us).
Would we need to not use an upcoming period? https://github.com/porter-finance/product/issues/15
I like the idea of just wrapping the auction and would like to do that if we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I was confused why they used the deployed version. I believe they are paying the fees on it. If we were to use it, I would think deploying it ourselves and being the owner would not be a big deal.
We could use an upcoming period, it would just need to be done on our side. We could take the collateral and not start the actual auction until some period, or we could start the auction with an increased end date, e.g. auctionEndDate = gracePeriod + 1 year
, and dis-allow bids via some auctionStarted
variable.
- Deployed and minted at successful auction settlement | ||
- The auction contract will check that the configuration exists on that bond contract (external call). | ||
- If that config is validated, the auction config itself will be checked. Length, minimum bid, etc. | ||
- The auction contract will lastly check and store the collateral within the auction contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think storing collateral in auction contract makes more sense than the collateral locker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It simplifies things for now. I am not sure what would be best.
- After the predetermined time is up, the auction ends, with all bids recorded. | ||
- The auction is settled, statuses updated to complete, and the winners can claim their order amount. | ||
- Winners pull from their successful orders | ||
- Bidding tokens are pushed to the auctioneer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this push instead of pull?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's currently how it's working on the Auction https://github.com/gnosis/ido-contracts/blob/main/contracts/EasyAuction.sol#L673
uint96 _minBuyAmount | ||
uint256 minimumBiddingAmountPerOrder | ||
uint256 minFundingThreshold | ||
bool isAtomicClosureAllowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you understand why anyone would use isAtomicClosureAllowed
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this
atomic-closure This parameter enables users to close the auction atomically and submit a final bid by calling the settleAuctionAtomically function in the smart contract once the auction-end-date has been reached. The auctioneer determines whether this parameter is on or off by specifying True or False.
This makes sense mainly for tokens with existing liquidity sources and is less suitable for IDOs.
Co-authored-by: RusseII <russell@deephire.com>
Merging in this base - Let's follow up with improvements. |
I think we should follow the auditless specification framework to create a more technical protocol specification.
The purpose of this specification will be two fold:
https://github.com/porter-finance/litepaper#bond-implementation