Platform: Code4rena
Start Date: 22/04/2021
End Date: 28/04/2021
Period: 7 days
Status: Completed
Pot Size: $120,000 USDC
Participants: 10
Reporter: moneylegobatman
Judge: LSDan
Id: 5
League: ETH
cmichel | 1/10 | $45,038.91 | 44 | 30 | 18 | 12 | 6 | - | - | 0 |
0xRajeev | 2/10 | $40,849.60 | 42 | 24 | 12 | 16 | 10 | - | - | 0 |
pauliax | 3/10 | $7,190.26 | 14 | 4 | 0 | 8 | 0 | - | - | 0 |
jvaqa | 4/10 | $6,202.78 | 10 | 6 | 0 | 2 | 0 | - | - | 0 |
shw | 5/10 | $6,094.54 | 8 | 4 | 2 | 2 | 2 | - | - | 0 |
s1m0 | 6/10 | $4,794.11 | 10 | 6 | 0 | 2 | 0 | - | - | 0 |
a_delamo | 7/10 | $3,034.83 | 6 | 2 | 0 | 2 | 2 | - | - | 0 |
toastedsteaksandwich | 8/10 | $2,288.60 | 5 | 0 | 0 | 4 | 4 | - | 0 | 0 |
JMukesh | 9/10 | $2,247.13 | 4 | 2 | 0 | 0 | 0 | - | - | 0 |
gpersoon | 10/10 | $1,759.15 | 6 | 0 | 0 | 4 | 0 | - | - | 0 |
Auditor per page
This repo will be made public before the start of the contest.
VADER Protocol is an implemenation of the ideas discussed here:
https://docs.google.com/document/d/1O10Pay1ZjBJwEjeHulp924-Cuustjatl7OoH-sGkDs8/edit?usp=sharing
https://terra.money/Terra_White_paper.pdf
https://github.com/thorchain/Resources/blob/master/Audits/THORChain-Gauntlet-CLPReport-Nov2020.pdf
Synthetic Asset && Liquidity Ownership formula:
How to derive liquidity units // Get MEAN P = poolUnits b = baseAdded, B = baseDepthBefore, baseAddedRate = b / B a = assetAdded, A = assetDepthBefore, assetAddedRate = a / A / Get SLIP slipAdjustment = 1- abs(Ba−bA / ((b+B) * (a+A))) // Change in price irrespective of direction // Get units units = P * average(baseAddedRate + assetAddedRate) * slipAdjustment units = P*(( b / B) + ( a / A))/2 * slipAdjustment units = (P (a B + A b))/(2 A B) * slipAdjustment units = (P (a B + A b))/(2 A B) * 1 - abs(Ba−bA / ((b+B) * (a+A))) Special case when a = 0 (such as when minting synths) a = 0 units = (P (0 B + A b))/(2 A B) * 1- abs(B0−bA / ((b+B) * (a0+A))) units = (P (A b))/(2 A B) * 1 - abs(bA / ((b+B) * (A))) units = (P b)/(2 B) * 1 - (b /(b+B)) units = (P b)/(2 (b + B))
transferTo()
function, which interrogates for tx.origin
and skips approvals. The author does not subscribe to the belief that this is dangerous, although users should be warned that they can be phished and stolen from if they interact with attack contracts. Since all these assets are intended to be used in the system itself, the risk of a user interacting with an attack contract is extremely low.tx.origin
will be deprecated, but the author believes that there is a really low chance it will, and if so, it will likely be replaced with tx.orgin = msg.sender
which means the contracts will still work. Compatibility function have been added to anticipate this.VADER is an implementation of various ideas across the space. There is nothing new, just a more cohesive system that takes advantage of several key concepts.
will be updated if this list changes
Ideally, the following is reviewed: